Re: [R] Help with lapply and tapply

2017-03-10 Thread Bert Gunter
In short, you really need to study the Help files carefully for both, as you are using both tapply and lapply incorrectly. If that doesn't work, I think you should spend some time with one of the many excellent R tutorials on the web. You need to beef up your understanding of the syntax. But

[R] Help with lapply and tapply

2017-03-10 Thread Fadhah
Dear all, Thank you in advance for your time and help. I quite new to R and face a problem with lapply and tapply functions. I simulated data and run the simulation 10 times to get 10 different simulated data. I have also built up my function and would like to apply this function to these 10

[R] reading form data from pdf forms

2017-03-10 Thread Vijayan Padmanabhan
Dear R-Help group Is there any way that I can programmatically extract form field values from a pdf form (either saved as pdf or fdf) in R? I would wish to not be dependent on any Paid tool for this purpose. Any guidance would be much appreciated. Regards VP [[alternative HTML version

Re: [R] Interpretation of lme results with intercorrelation between fixed factors

2017-03-10 Thread David Winsemius
> On Mar 10, 2017, at 3:22 AM, Vasillis Papathanasiou > wrote: > > I�m running a mixed model analysis with 2 fixed factors that are > intercorrelated using the lme function and I�m having difficulties in > interpreting the results. > As I�m quite novice I�ll try

Re: [R] New package: remindR

2017-03-10 Thread Bert Gunter
Thanks, Marc. That is puzzling, as I did not. Ergo: my bad! However, I'm happy to be wrong, and want to note publicly that I am, so people don't waste any time wondering why. Hopefully, no harm done. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming

[R] New package: remindR

2017-03-10 Thread Bert Gunter
Note: The following post to r-packages seems not to have made it to r-help for some reason. So I am replicating it explicitly here. -- Bert Gunter remindR is a simple, small package with essentially a single purpose: to Insert/extract text "reminders" into/from function source code comments or

Re: [R] display UTF8 characters in pdf

2017-03-10 Thread Olivier CROUZET
Hi, AFAICT, you need to use a Cairo device for being able to display some Unicode characters in a plot. From my experience, the CairoPDF() from library(Cairo) does not work (and I don't understand the difference with cairo_pdf()), but the cairo_pdf() from grDevices does work perfectly well

Re: [R] display UTF8 characters in pdf

2017-03-10 Thread Ista Zahn
install.packages("emojifont") library(emojifont) ... # plot as before. Best, Ista On Fri, Mar 10, 2017 at 11:06 AM, Thierry Onkelinx wrote: > Dear all, > > I'd like to use some UTF-8 characters in a plot. Some of them are not > rendered with saving the plot as pdf.

Re: [R] Forecasting and demography

2017-03-10 Thread Bert Gunter
Please search before such posting! googling "R demography" immediately brought up the "demography" package (including references therein, I'm sure). "Forecasting population in R" brought up additional hits. etc. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people

Re: [R-es] Gracias a RStudio!...Una breve historia del "Grupo de Usuarios de R de Madrid"...

2017-03-10 Thread José Luis Cañadas
Estupendo. Gracias Carlos. El 10 de marzo de 2017, 20:33, Carlos Ortega escribió: > Buenas a todos, > > RStudio nos acaba de publicar una entrada en su blog (RViews) en la que > hemos contado brevemente la historia del "Grupo de Usuarios de R de > Madrid". > >

[R-es] Gracias a RStudio!...Una breve historia del "Grupo de Usuarios de R de Madrid"...

2017-03-10 Thread Carlos Ortega
Buenas a todos, RStudio nos acaba de publicar una entrada en su blog (RViews) en la que hemos contado brevemente la historia del "Grupo de Usuarios de R de Madrid". https://www.rstudio.com/rviews/2017/03/10/madrid-r-user-group-a-brief-history/ ​Gracias a todos los han hecho posible que nos

Re: [R] "found 4 marked UTF-8 strings" during check of package... but where !

2017-03-10 Thread Duncan Murdoch
On 10/03/2017 10:44 AM, Marc Girondot via R-help wrote: Thanks Duncan and Michael, Indeed I have data file with utf-8 characters inside. In the DESCRIPTION, I have the line Encoding: UTF-8 but it seems to not be sufficient. That line describes how text files in your package are to be

Re: [R] "found 4 marked UTF-8 strings" during check of package... but where !

2017-03-10 Thread Marc Girondot via R-help
Thanks Duncan and Michael, Indeed I have data file with utf-8 characters inside. In the DESCRIPTION, I have the line Encoding: UTF-8 but it seems to not be sufficient. In each R page for these data, I have also : #' @docType data #' @encoding UTF-8 But I still have the notes during check when

[R] Forecasting and demography

2017-03-10 Thread Peter Thuresson
Hello R users, I wonder if anybody have some info about interesting forecastning population packages/books in R. It is specifically about demographics, i e models for handling fertility rates, mortality and migration etc, i'm interested. Best regards/Peter [[alternative HTML version

[R] plotting longitudinal data with ggplot

2017-03-10 Thread Rayt Chiruka
i am trying to convert a dataset from wide to long format using package tidyr- (seems to have been done) wen in try and plot the long dataset using ggplot i keep getting errors here is the code *library(tidyr) ht.long<-gather(ray.ht ,age,height,X0:X84,factor_key = TRUE)

Re: [R] matrix merge, or something else?

2017-03-10 Thread Evan Cooch
Slick -- thanks. On 3/10/2017 1:26 AM, Jeff Newmiller wrote: test2[ , colnames( test1 ) ] <- test1 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] concatenating range of columns in dataframe

2017-03-10 Thread Evan Cooch
On 3/10/2017 2:24 AM, Ulrik Stervbo wrote: Hi Evan, the unite function of the tidyr package achieves the same as Jim suggested, but in perhaps a slightly more readable manner. Ulrik I use perl for scripting, so readability isn't a big factor. ;-) Thanks!

Re: [R] concatenating range of columns in dataframe

2017-03-10 Thread Evan Cooch
On 3/10/2017 1:48 AM, Jim Lemon wrote: Hi Evan, How about this: df2<-data.frame(Trt=df[,1],Conc=apply(df[,2:5],1,paste,sep="",collapse="")) Jim Thanks! __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] concatenating range of columns in dataframe

2017-03-10 Thread Evan Cooch
On 3/10/2017 2:23 AM, Bert Gunter wrote: I think you need to spend some time with an R tutorial or two, especially with regard to indexing. Unless I have misunderstood (apologies if I have), df$Conc <- apply(df[,-1],1,paste,collapse="") does it. -- Bert \ Thanks -- sage advice.

[R] Error in .jcall

2017-03-10 Thread Shivi Bhatia
Hi Team, I am creating an n-gram analysis on a text mining data however receving the error as:- Error in .jcall("RWekaInterfaces", "[S", "tokenize", .jcast(tokenizer, : java.lang.NullPointerException I have used the function: Ngramtok= function(x)NGramTokenizer(x, Weka_control(min=1, max=5))

[R] display UTF8 characters in pdf

2017-03-10 Thread Thierry Onkelinx
Dear all, I'd like to use some UTF-8 characters in a plot. Some of them are not rendered with saving the plot as pdf. Any suggestions? library(ggplot2) symbols <- c("\U1F697", "\U00A9", "\U24DA", "\U00C1") test <- data.frame( x = seq_along(symbols) %% ceiling(sqrt(length(symbols))), y =

Re: [R] heat maps with qplot

2017-03-10 Thread Jeff Newmiller
This could be as simple as looking at the parameter "axis.text.x" and thinking "maybe there is another parameter called axis.text.y that I could try" and reading the ggplot2 help pages for the theme and element_text functions. If not then you need to make your example complete enough (including

Re: [R] heat maps with qplot

2017-03-10 Thread greg holly
Thanks Ulrik for this, This is my first experience in heat maps. Yours advise for the theme would be appreciated. Greg On Fri, Mar 10, 2017 at 10:08 AM, Ulrik Stervbo wrote: > Hi Greg, > > ?theme > > You can use the axis.text and axis.title if y and x are to be

Re: [R] heat maps with qplot

2017-03-10 Thread Ulrik Stervbo
Hi Greg, ?theme You can use the axis.text and axis.title if y and x are to be identical, or axis.text.x, axis.text.y, axis.title.x, axis.title.y if you need different font size. HTH Ulrik On Fri, 10 Mar 2017 at 15:47 greg holly wrote: > Hi all; > > The followings are

Re: [R] problem with PCA

2017-03-10 Thread David L Carlson
This is more a question about principal components analysis than about R. You have 4 variables and they are moderately correlated with one another (weight and hole are only .2). When the data consist of measurements, this usually suggests that the overall size of the object is being partly

[R] heat maps with qplot

2017-03-10 Thread greg holly
Hi all; The followings are my R codes for heat maps in ggplot2. I need to specify the font size for the y-axis (x-axis works) as well as font size for label y and x too. Your help highly appreciated. Thanks, Greg qplot(x=Var1, y=Var2, data=melt(cor(a, use="p")), fill=value, geom="tile") +

Re: [R] Unable to Load package Rcmdr after installation

2017-03-10 Thread Paul Bernal
Dear John, Hope you are doing great. Thank you for your kind reply. Fortunately yes, I was able to solve the issue. I believe that the issue was due to the fact that I had several R versions installed on my computer, and, when browsing through the folders, I noticed that there were some packages

Re: [R] "found 4 marked UTF-8 strings" during check of package... but where !

2017-03-10 Thread Duncan Murdoch
On 10/03/2017 2:52 AM, Marc Girondot via R-help wrote: Dear members, I want submit to CRAN a new version of a package that I maintain. When I check locally "as-cran" no note or error are reported but the link after submission reports several notes and one warning: For example: using R Under

Re: [R] Unable to Load package Rcmdr after installation

2017-03-10 Thread Fox, John
Dear Paul, It would be easier to help you if you provided more information, both about your computer system and about what exactly you did. With respect to the former, you can report the output of Sys.info() and sessionInfo(). With respect to the latter, did install.packages('Hmisc') succeed? If

Re: [R] restructuring data frame

2017-03-10 Thread PIKAL Petr
Thanks Ulrik. separate_rows is interesting, but it results in data frame with rows with offending numbers stored in V4 variable. > separate_rows(evid, V4, sep = ";#") V2 V3 V4 1test vodivosti

Re: [R] "found 4 marked UTF-8 strings" during check of package... but where !

2017-03-10 Thread Michael Friendly
Try: tools:::showNonASCIIfile(file) On 3/10/2017 5:52 AM, Marc Girondot via R-help wrote: Based on the message, "Note: found 4 marked UTF-8 strings", it seems that "4 marked UTF-8 strings" are present in the package and it is a problem... Is there any solution to know in which file?

Re: [R] write.xlsx

2017-03-10 Thread Michael Dewey
Dear Paul Have you defined a variable T or F somewhere? Rather than look to find out why not replace T by TRUE and F by FALSE and see if that solves your problem. On 10/03/2017 07:58, Paul Anthony Frontéri wrote: Hey. I am trying to append a sheet to an existing file using write.xlsx, see

[R] Interpretation of lme results with intercorrelation between fixed factors

2017-03-10 Thread Vasillis Papathanasiou
I�m running a mixed model analysis with 2 fixed factors that are intercorrelated using the lme function and I�m having difficulties in interpreting the results. As I�m quite novice I�ll try to use a very simple example. My model is lme(Y~A*B). A has 3 levels (1, 2 and 3) and B has 2 levels (I

[R] write.xlsx

2017-03-10 Thread Paul Anthony Frontéri
Hey. I am trying to append a sheet to an existing file using write.xlsx, see code under: write.xlsx(x = data1,file = filename,sheetName = "data1", asTable = FALSE, col.names = T,row.names = F,append = F) write.xlsx(x = data2,file = filename,sheetName = "data2", asTable = FALSE, col.names =

[R] first readline() instance getting skipped on windows with R 3.3.3

2017-03-10 Thread Anthony Damico
hi, i'm curious if anyone else has noticed a change in behavior of readline()? i have a function in an R package that calls readline() here: https://github.com/ajdamico/lodown/blob/master/R/mics.R#L126 after upgrading to 3.3.3, the function appeared to start ignoring that readline() call. my

[R] "found 4 marked UTF-8 strings" during check of package... but where !

2017-03-10 Thread Marc Girondot via R-help
Dear members, I want submit to CRAN a new version of a package that I maintain. When I check locally "as-cran" no note or error are reported but the link after submission reports several notes and one warning: For example: using R Under development (unstable) (2017-03-05 r72309) using

[R] problem with PCA

2017-03-10 Thread Denis Francisci
Hi all. I'm newbie in PCA by I don't understand a behaviour of R. I have this data matrix: >mx_fus height diam hole weight 12.3 3.5 1.1 18 22.0 3.5 0.9 17 33.8 4.3 0.7 34 42.1 3.4 0.9 15 52.3 3.8 1.0 19 62.2 3.8 1.0 19 73.2 4.4 0.9 34 8

Re: [R] restructuring data frame

2017-03-10 Thread Ulrik Stervbo
Hi Petr, maybe library("splitstackshape") cSplit(evid, "V4", "#", direction = "long") or library("tidyr") separate_rows(evid, V4, sep = "#") is helpful. Best, Ulrik On Fri, 10 Mar 2017 at 08:32 PIKAL Petr wrote: Dear all I have some data with following structure