Re: [R] Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?

2013-03-06 Thread Anna Zakrisson
Dear John, thank you so much for your time! The tip regarding the position of the legend was extremely useful: theme(legend.position = c(.5, .5) Also, how to get the shape fill hollow: scale_shape(solid = FALSE) your long script helped me with several issues that I have had particularly tweaki

Re: [R] Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?

2013-03-06 Thread Anna Zakrisson
Dear Stephen, thank you for the tip regarding Incskape. I had never heard of it before. It looks extremely useful! With kind regards Anna Zakrisson Braeunlich PhD student Department of Ecology Environment and Plant Sciences Stockholm University Svante Arrheniusv. 21A SE-106 91 Stockholm Sweden

Re: [R] Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?

2013-03-06 Thread Anna Zakrisson
Dear Thierry, thank you! this was exactly what I wanted. Just one question: If I use the facet_wrap(~Grouping, ncol=2) and not ncol=3, how can I add an x-axis to the plot that is missing one? I think that the ncol=2 looks nicer (like you have suggested) than the ncol=3, which would avoid this p

Re: [R] multiple plots and looping assistance requested (revised codes)

2013-03-06 Thread Irucka Embry
Hi Arun, that worked perfectly for the smaller data set, but it has failed to plot in the whole data set where I have missing columns (either 1 or 2 columns missing). How can I ask any NAs not to be plotted? I have attempted to use na.omit(temper2[[i]]), but it did not work. See below: pdf("Seaso

[R] create vector from indices interpolated values

2013-03-06 Thread e-letter
Readers, Is it possible to create a plot command based upon the indices of missing values in a data set? dataset1<-read.table(text=' 10 2 20 NA 30 5 40 7 50 NA 60 NA 70 2 80 6 90 NA 100 9 ') dataset2<-read.table(text=' 0.2 0.4 0.1 0.9 0.2 0.3 1.1 0.7 0.9 0.6 0.4 ') The 'approx' function is used

[R] why package ZIGP is not there anymore?

2013-03-06 Thread lili puspita rahayu
Mr/Mrs I am Lili Puspita Rahayu, student from Bogor Agriculture University. I wanna ask that why package ZIGP (Zero inflated Generalized Poisson) is not there anymore? is there any other packages that can analyze ZIGP? I am very grateful for the assistance of R. I am looking forward to hearing

Re: [R] multiple plots and looping assistance requested (revised codes)

2013-03-06 Thread arun
HI, Try this:  temp1<-lapply(temp,function(x) x[complete.cases(x),])  temp2<-lapply(temp1,function(tempNew) lapply(names(tempNew)[-1], function(i){x1<-cbind(tempNew[,1],tempNew[,i]); colnames(x1)<- c("CYEAR_DECIMAL",i);x1})) pdf("Irucka3.pdf")  par(mfrow=c(1,2)) lapply(names(temp2),function(i) la

Re: [R] multiple plots and looping assistance requested (revised codes)

2013-03-06 Thread arun
HI Irucka, Try this: temp1<-lapply(temp,function(x) x[complete.cases(x),])  temp2<-lapply(temp1,function(tempNew) lapply(tempNew[,-1],function(x) {x1<-cbind(CYEAR_DECIMAL=tempNew[,1],x)})) pdf("Irucka2.pdf")  par(mfrow=c(1,2)) lapply(names(temp2),function(i) lapply(temp2[[i]],function(x) {plo

[R] Read Content from URL to XML format

2013-03-06 Thread R_Antony
Hi, i want to know how to read a table values from a URL and get it as XML content. Could anyone please help me out ASAP ? Thanks, Antony. -- View this message in context: http://r.789695.n4.nabble.com/Read-Content-from-URL-to-XML-format-tp4660561.html Sent from the R help mailing list archi

[R] Help using system() command to execute Perl script through MSDOS

2013-03-06 Thread pdbarry
I am working on creating a program for some simulations I need to do and I want to execute a Perl script that I wrote using the system() command in R. I have spent a couple days trying to figure this out and it appears that my problem occurs when sending the perl script file path through R to MSDO

Re: [R] (no subject)

2013-03-06 Thread Peter Maclean
Is there a R package that use sampling weights in multilevel modeling? The survey package does not handle multilevel modeling and the weight option in lmer and nlmer functions from lme4 (used for multilevel modeling) is for weighted least squares estimation. Suggestion from one with experience

[R] Multivariate Power Test?

2013-03-06 Thread Charles Determan Jr
Generic question... I am familiar with generic power calculations in R, however a lot of the data I primarily work with is multivariate. Is there any package/function that you would recommend to conduct such power analysis? Any recommendations would be appreciated. Thank you for your time, Char

Re: [R] Help with a function and text

2013-03-06 Thread David Winsemius
On Mar 6, 2013, at 3:44 PM, Eliano wrote: > Thanks. Btw are you able to help with my issue? Thanks, Eliano I'm sorry, I was too busy answering the question from 'Eliano' over on StackOverflow. I didn't have time to address this one. (Please do note that cross-posting questions to Rhelp is

Re: [R] multiple plots and looping assistance requested (revised codes)

2013-03-06 Thread arun
Hi Irucka, I tried it and was able to plot it without any errors.  Here, your code indicates you need two lines. temper[[i]][1]  temper[[1]][1] # which is the column 1.   Month 1 1 2 2 3 3  temper[[1]][2] #  Data1 #1   1.5 #2  12.3 #3  11.4 Suppose I use names(temper) instead of

Re: [R] Fwd: How to conditionally remove dataframe rows?

2013-03-06 Thread arun
Hi, dfrm<- read.table(text="     Point_counts  Psi_Sp 1    A  0 2    A  1 3    B  1 4    B  2 5    B  0 6    C  1 7  

Re: [R] Fwd: How to conditionally remove dataframe rows?

2013-03-06 Thread David Winsemius
On Mar 6, 2013, at 3:21 PM, Francisco Carvalho Diniz wrote: > Hi, > > I have a data frame with two columns. I need to remove duplicated rows in > first column, but I need to do it conditionally to values of the second > column. > > Example: > >Point_counts Psi_Sp > > 1

Re: [R] How to transpose it in a fast way?

2013-03-06 Thread Ista Zahn
On Wed, Mar 6, 2013 at 7:56 PM, Peter Langfelder wrote: > On Wed, Mar 6, 2013 at 4:18 PM, Yao He wrote: >> Dear all: >> >> I have a big data file of 6 columns and 6 rows like that: >> >> AA AC AA AA ...AT >> CC CC CT CT...TC >> .. >> ...

Re: [R] How to transpose it in a fast way?

2013-03-06 Thread Peter Langfelder
On Wed, Mar 6, 2013 at 4:18 PM, Yao He wrote: > Dear all: > > I have a big data file of 6 columns and 6 rows like that: > > AA AC AA AA ...AT > CC CC CT CT...TC > .. > . > > I want to transpose it and the output is a new like that > A

Re: [R] Help with a function and text

2013-03-06 Thread Eliano
Thanks. Btw are you able to help with my issue? Thanks, Eliano Sent from my iPhone On 6 Mar 2013, at 23:41, "David Winsemius [via R]" < ml-node+s789695n4660547...@n4.nabble.com> wrote: On Mar 6, 2013, at 11:25 AM, Eliano Marques wrote: > Hi, can I understand why this message was rejected ? > T

[R] Fwd: How to conditionally remove dataframe rows?

2013-03-06 Thread Francisco Carvalho Diniz
Hi, I have a data frame with two columns. I need to remove duplicated rows in first column, but I need to do it conditionally to values of the second column. Example: Point_counts Psi_Sp 1A 0 2A 1 3B

Re: [R] How to combine conditional argument and logical argument in R to create subset of data...

2013-03-06 Thread HJ YAN
Hi Arun Massive thanks for the hints of making use of 'paste0'! But coincidentally there were no pair of data exactly same in indxTem1 and indxTem2 in the previous example. I changed data as below which is very likely to be in my real data... V1<-rep(c(rep(111,5),rep(222,5),rep(333,5)),2) # V1

Re: [R] Inverse function using FDA

2013-03-06 Thread zoe richards
I am trying to register unemployment rate and inverse of inflation rate to investigate the phillips curve by looking at the resulting warping function. On Wed, Mar 6, 2013 at 5:17 PM, Peter Ehlers wrote: > On 2013-03-06 12:54, zoe richard

Re: [R] Help with a function and text

2013-03-06 Thread David Winsemius
On Mar 6, 2013, at 11:25 AM, Eliano Marques wrote: > Hi, can I understand why this message was rejected ? > Thanks, > Eliano First hit on a Markmail search: http://markmail.org/message/5xog3ayx4amprsdx?q=list:org%2Er-project%2Er-help+nabble+rejected -- David. > > Sent from my iPhone > > On

Re: [R] How to combine conditional argument and logical argument in R to create subset of data...

2013-03-06 Thread arun
Hi, I am not sure I understand it correctly. In the example you gave, there are duplicated rows in Tem1, ie. (222 6 ), (222 7), (333 11), but these rows are also present in Tem2 Is there any chance of triplicates etc.. Also, you wanted to have rows that are not common in Tem1 and Tem2. ie. (111

Re: [R] Inverse function using FDA

2013-03-06 Thread Peter Ehlers
On 2013-03-06 12:54, zoe richards wrote: Hi, Does anyone know how (or whether or not it's possible) to output an inverse of a functional object? I haven't found a way, but since derivatives etc. can be computed using the "fda" package it seems like this should be possible using this package or

Re: [R] how to get xmlToList() to retry if http fails

2013-03-06 Thread Ben Tupper
Hi, On Mar 6, 2013, at 4:12 PM, Waichler, Scott R wrote: > Hi, > > I am using xmlToList() in a loop with a call to a webservice, per the code > below. > > # Loop thru target locs > for(i in 1:num.target.locs) { >url <- paste(sep="/", "http://www.earthtools.org/timezone";, lat[i], lon[i

Re: [R] How to combine conditional argument and logical argument in R to create subset of data...

2013-03-06 Thread HJ YAN
Dear Arun Thanks a million for your prompt reply and I love all four ways in your reply. Tried the code and just realised an issue here: in my real work, my data is about 4GB large and I'm sure that there are many duplicated values in V2, so that is to say my V1 and V2 should be something like

[R] Inverse function using FDA

2013-03-06 Thread zoe richards
Hi, Does anyone know how (or whether or not it's possible) to output an inverse of a functional object? I haven't found a way, but since derivatives etc. can be computed using the "fda" package it seems like this should be possible using this package or another designed for functional data analys

Re: [R] How to combine conditional argument and logical argument in R to create subset of data...

2013-03-06 Thread arun
Hi, How about this: indxTem1<-paste0(Tem1[,1],Tem1[,2])  indxTem2<-paste0(Tem2[,1],Tem2[,2]) Tem1[!indxTem1%in%indxTem2,] #   V1 V2  #[1,] 333 11  #[2,] 111 16  #[3,] 111 17  #[4,] 111 20  #[5,] 222 21  #[6,] 222 22  #[7,] 222 23  #[8,] 222  1  #[9,] 222  2 #[10,] 333  3 #[11,] 333  4 #[12,]

Re: [R] Issue when reading a table into R

2013-03-06 Thread Sarah Goslee
Since nobody else has mentioned it: if you are seeing that message when you are reading data in, then you probably failed to assign the data to an R object. mydata <- read.table("somefile") # correct read.table("somefile") # will simply print your data to the console, not save it I'm not entirely

Re: [R] chi square exact test

2013-03-06 Thread David L Carlson
Actually, the http://www.sussex.ac.uk/its/pdfs/SPSS_Exact_Tests_20.pdf file indicates that for small samples and a one-way chi square test, SPSS uses a multinomial distribution to tabulate the distribution of chi square for a given N, K, and probability of membership in each group. In package st

[R] how to get xmlToList() to retry if http fails

2013-03-06 Thread Waichler, Scott R
Hi, I am using xmlToList() in a loop with a call to a webservice, per the code below. # Loop thru target locs for(i in 1:num.target.locs) { url <- paste(sep="/", "http://www.earthtools.org/timezone";, lat[i], lon[i]) tmp <- xmlToList(url) df$time.offset[i] <- tmp$offset sys

Re: [R] Issue when reading a table into R

2013-03-06 Thread jim holtman
just a limitation on the printing of the data to the console. Change the 'max.print' option if you want more lines output to the console. On Wed, Mar 6, 2013 at 3:58 PM, Paul Bernal wrote: > Hello everyone, > > I was reading a table into R, and when trying to retrieve it the following > message

Re: [R] Issue when reading a table into R

2013-03-06 Thread Duncan Murdoch
On 06/03/2013 3:58 PM, Paul Bernal wrote: Hello everyone, I was reading a table into R, and when trying to retrieve it the following message appeared: [ reached getOption("max.print") -- omitted 469376 rows ] Does this mean that R left out 469376 rows? Or R is taking those 469376 rows as wel

Re: [R] Issue when reading a table into R

2013-03-06 Thread Rich Shepard
On Wed, 6 Mar 2013, Paul Bernal wrote: I was reading a table into R, and when trying to retrieve it the following message appeared: [ reached getOption("max.print") -- omitted 469376 rows ] Does this mean that R left out 469376 rows? Or R is taking those 469376 rows as well and the limitation

[R] Issue when reading a table into R

2013-03-06 Thread Paul Bernal
Hello everyone, I was reading a table into R, and when trying to retrieve it the following message appeared: [ reached getOption("max.print") -- omitted 469376 rows ] Does this mean that R left out 469376 rows? Or R is taking those 469376 rows as well and the limitation is only for printing pur

[R] Course: Beginner's Guide to MCMC, GLM and GAM with R

2013-03-06 Thread Highland Statistics Ltd
There are a few places left on the following course: Beginner's Guide to MCMC, GLM and GAM with R When: 10 - 13 June 2013 Where: SAMS, Oban, Scotland Further information: http://www.highstat.com/statscourse.htm Flyer: http://www.highstat.com/Courses/Flyer2013June_SAMS.pdf Kind regards,

Re: [R] Troubles with labeling x axis

2013-03-06 Thread Peter Ehlers
On 2013-03-06 06:07, iDa wrote: Hi! I have problems with labeling x axis while plotting time series data. I have 40 monthly measurement. One period lasts 4 months. I'd like to have 40 ticks on x axis (10 larger, the rest smaller) and labels just at the beginning of each period, just like in the

Re: [R] Learning the R way – A Wish

2013-03-06 Thread Patrick Burns
On 06/03/2013 07:20, Andrew Hoerner wrote: Dear Patrick-- After the official Core Team's R manuals and the individual function help pages, I have found "The R Inferno" to be the single most useful piece of documentation when I have gotten stuck with a R problems. It is the only introduction that

Re: [R] Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?

2013-03-06 Thread John Kane
Replying to my own post RStudio is doing this fine once I had rebooted R. I must have had some strange stuff loaded that I had not realised was there. John Kane Kingston ON Canada > -Original Message- > From: jrkrid...@inbox.com > Sent: Wed, 6 Mar 2013 11:16:28 -0800 > To: a...@ecology

Re: [R] Help with a function and text

2013-03-06 Thread Eliano Marques
Hi, can I understand why this message was rejected ? Thanks, Eliano Sent from my iPhone On 6 Mar 2013, at 19:18, Eliano wrote: > Hi everyone, > > I am writing some code to generate a function. I am passing that code to a > dataset which i'm importing in R, e.g. > Test=read.table('C:/test.txt',

Re: [R] Graph from Glantz

2013-03-06 Thread John Kane
No link and/ no attached file. The list tends to strip most attachments to reduce virus attacks. John Kane Kingston ON Canada > -Original Message- > From: angeloscozzare...@tiscali.it > Sent: Wed, 6 Mar 2013 19:53:18 +0100 > To: r-help@r-project.org > Subject: [R] Graph from Glantz >

Re: [R] chi square exact test

2013-03-06 Thread Milan Bouchet-Valat
Le mercredi 06 mars 2013 à 18:38 +0100, Knut Krueger a écrit : > Am 06.03.2013 18:29, schrieb Milan Bouchet-Valat: > > Le mercredi 06 mars 2013 à 18:03 +0100, Knut Krueger a écrit : > >> Am 06.03.2013 14:27, schrieb Nicole Ford: > >> Dear Nicole, > >> my be you are wondering about, but I know Googl

Re: [R] Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?

2013-03-06 Thread John Kane
Placing a legend. z <- ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) + geom_point() z + theme(legend.position = c(.5, .5)) Currently this does not appear to work in RStudio but seems fine if I use gedit or if I run R in a terminal session. John Kane Kingston ON Canada > -Ori

[R] Graph from Glantz

2013-03-06 Thread Angelo Scozzarella Tiscali
Hi, I'd like to draw a graph like this one from Stanton Glantz book, Primer of Biostatistics. Thanks Angelo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

Re: [R] robustbase adjbox segfault - memory not mapped

2013-03-06 Thread Baan
Glad to know. Thanks. Regards Baan On Wednesday 06 March 2013 02:15 PM, Martin Maechler wrote: "B" == Baan on Mon, 4 Mar 2013 22:47:10 +0530 writes: B> Thank you Martin. Look forward to the fix. Committed to the R-forge version of robustbase. It was a simple integer overflow, ind

[R] need help using read.fortran

2013-03-06 Thread jsdroyster
Hello kind and R-knowledgeable souls! I am trying to use read.fortran to read in old datasets in 80-column-card format with no separators between variables (just 80 columns of solid digits). I comprehend the instructions for specifying the columns for each variable, but I can't understand how t

Re: [R] need help using read.fortran

2013-03-06 Thread Duncan Murdoch
On 06/03/2013 12:57 PM, jsdroyster wrote: Hello kind and R-knowledgeable souls! I am trying to use read.fortran to read in old datasets in 80-column-card format with no separators between variables (just 80 columns of solid digits). I comprehend the instructions for specifying the columns for ea

Re: [R] Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?

2013-03-06 Thread John Kane
For the simplist of the issues use scale_shape(solid = FALSE) to get hollow points Using your data (below) this seems to work p1 <- ggplot(SummAB, aes(factor3, mean, colour = factor1, group = factor1,shape = factor1)) + scale_y_continuous(guide_legend(legend.position=c(4 ,6)

[R] Random Sampling

2013-03-06 Thread Angelo Scozzarella Tiscali
When the population values are not distributed symmetrically about the mean, reporting the mean and standard deviation can give the reader an inaccurate impression of the distribution of values in the population. I'd like generating random samples with same mean and standard deviation, but not

Re: [R] chi square exact test

2013-03-06 Thread Knut Krueger
Am 06.03.2013 18:29, schrieb Milan Bouchet-Valat: > Le mercredi 06 mars 2013 à 18:03 +0100, Knut Krueger a écrit : >> Am 06.03.2013 14:27, schrieb Nicole Ford: >> Dear Nicole, >> my be you are wondering about, but I know Google an I am using google >> before I am asking here. >> >> If you are mor

Re: [R] chi square exact test

2013-03-06 Thread Milan Bouchet-Valat
Le mercredi 06 mars 2013 à 18:03 +0100, Knut Krueger a écrit : > Am 06.03.2013 14:27, schrieb Nicole Ford: > Dear Nicole, > my be you are wondering about, but I know Google an I am using google > before I am asking here. > > If you are more familiar with googl,e please help me to find the search

Re: [R] lm Regression takes 24+ GB RAM - Error message

2013-03-06 Thread Milan Bouchet-Valat
Le mercredi 06 mars 2013 à 09:18 -0800, Jonas125 a écrit : > Length(Datasplit) = 7100 > > I did a regression for Datasplit[[1]] and the calculated columns --> the > object size is 70 MB. Quite large 7100*70/1024 = 485 (GB) No wonder why you run out of memory quite fast. You probably do not n

Re: [R] lm Regression takes 24+ GB RAM - Error message

2013-03-06 Thread Jonas125
Length(Datasplit) = 7100 I did a regression for Datasplit[[1]] and the calculated columns --> the object size is 70 MB. Quite large Assuming that R cannot handle inf values in regressions (didn't have the time to google it) How can I avoid the calculation of infinite values? Like "If the deno

[R] rainbow producing colors that do not differ sufficiently

2013-03-06 Thread Fisher Dennis
R 2.15.2 OS X Colleagues, I often use rainbow to select colors. I encountered a surprise with rainbow(11). It yielded three greens (in positions 4-6). The first two of these are quite similar. The man pages suggest that this might be the case: equispaced hues in RGB space tend to c

Re: [R] chi square exact test

2013-03-06 Thread Knut Krueger
Am 06.03.2013 14:27, schrieb Nicole Ford: Dear Nicole, my be you are wondering about, but I know Google an I am using google before I am asking here. If you are more familiar with googl,e please help me to find the search term where I can find the R function for chi square exact usable for on

Re: [R] About basic logical operators

2013-03-06 Thread William Dunlap
> > > x[x<0.2] > > [1] -1.00 -0.98 -0.96 -0.94 -0.92 -0.90 -0.88 -0.86 -0.84 -0.82 -0.80 > > -0.78 This is a bit off the original topic, but you should really put spaces around the "<". Otherwise you might be surprised when you compare x to -0.2 instead of +0.2: > x<-seq(-1,1,by=0.02) >

Re: [R] lm Regression takes 24+ GB RAM - Error message

2013-03-06 Thread Milan Bouchet-Valat
Le mercredi 06 mars 2013 à 08:31 -0800, Jonas125 a écrit : > The datatable (and the split obviously) only contain characters and numeric > data. > > I found that 4 regression in a row work if I don't use the calculated > columns as variables but 2 of the original columns. > RAM usage stays below

Re: [R] lm Regression takes 24+ GB RAM - Error message

2013-03-06 Thread Jonas125
The datatable (and the split obviously) only contain characters and numeric data. I found that 4 regression in a row work if I don't use the calculated columns as variables but 2 of the original columns. RAM usage stays below 3GB! --> Why does R has such problems with the calculated columns? Thei

Re: [R] CARET and NNET fail to train a model when the input is high dimensional

2013-03-06 Thread James Jong
Thank you Max. I presume that in order to use caret with nnet and MaxNWts, I would have to write my custom method for train that supports this new argument. >From what I read, when writing my custom method, I would need to define functions "parameters", "model", "prediction", "prob" and "sort" and

Re: [R] print justify

2013-03-06 Thread MacQueen, Don
I don't know about justify as an arg to print, but the following should qualify as a hint. > format(c('a','aa','aaa'), justify='left') [1] "a " "aa " "aaa" > tmp <- data.frame(a=c('a','aa','aaa')) > print(tmp,justify='left') a 1 a 2 aa 3 aaa > tmp$b <- format(c('a','aa','aaa'),justif

Re: [R] How to combine conditional argument and logical argument in R to create subset of data...

2013-03-06 Thread arun
Just to add: Tem1[Tem1[,2]%in%setdiff(Tem1[,2],Tem2[,2]),] A.K. - Original Message - From: arun To: HJ YAN Cc: R help Sent: Wednesday, March 6, 2013 11:06 AM Subject: Re: [R] How to combine conditional argument and logical argument in R to create subset of data... Hi, No problem. V

Re: [R] How to combine conditional argument and logical argument in R to create subset of data...

2013-03-06 Thread arun
Hi, No problem. V1<-rep(c(rep(111,5),rep(222,5),rep(333,5)),2)  length(V1) #[1] 30  V2<- c(1:30) #should be the same length as V1 Tem1<- cbind(V1,V2) Tem2<-Tem1[1:20,] Tem1[!Tem1[,2]%in%Tem2[,2],]  # V1 V2  #[1,] 222 21  #[2,] 222 22  #[3,] 222 23  #[4,] 222 24  #[5,] 222 25  #[6,] 333 26  #

[R] print justify

2013-03-06 Thread Berry Boessenkool
Hi everyone, I'm trying to print a table justified to the left, but it doesn't work. Any hints? KennArt <- data.frame(NR=c(171,172,174,175,176,177,181,411,980), TYP=c("Körnermais",  "Corn Cob Mix", "Zuckermais", "Mischanbau (Silo)Mais/Sonnenblumen",  "Mais mit Bejagungsschneise in gutem landw

Re: [R] About basic logical operators

2013-03-06 Thread Duncan Murdoch
On 05/03/2013 7:53 PM, Victor hyk wrote: Hello everyone, I have a basic question regarding logical operators. > x<-seq(-1,1,by=0.02) > x [1] -1.00 -0.98 -0.96 -0.94 -0.92 -0.90 -0.88 -0.86 -0.84 -0.82 -0.80 -0.78 [13] -0.76 -0.74 -0.72 -0.70 -0.68 -0.66 -0.64 -0.62 -0.60 -0.58 -0.

[R] R Gui frond has stopped working

2013-03-06 Thread lefelit
I use R (2.15.2) on a windows 7 (64) for data mining with xcms package. This is a routine process for me and didn't encount any problems until few weeks ago when I got an error message for "R GUI frond end has stopped working". The following information was given by windows to describe the error.

[R] Difficulty in caper: Error in phy$node.label[which(newNb > 0) - Ntip]

2013-03-06 Thread Nicole Thompson
Hello, I'm doing a comparative analysis of mammal brain and body size data. I'm following Charlie Nunn and Natalie Cooper's instructions for "Running PGLS in R using caper". I run into the following error when I create my comparative dataset, combining my phylogenetic tree (mammaltree) and taxon

Re: [R] Understanding lm-based analysis of fractional factorial experiments

2013-03-06 Thread Peter Claussen
On Mar 6, 2013, at 4:46 AM, Kjetil Kjernsmo wrote: > All, > > I have just returned to R after a decade of absence, and it is good to see > that R has become such a great success! I'm trying to bring Design of > Experiments into some aspects of software performance evaluation, and to > teach

Re: [R] Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?

2013-03-06 Thread ONKELINX, Thierry
Dear Anna, Is this what you would like? Summ <- ddply(mydata, .(factor3,factor1), summarize, mean = mean(var1, na.rm = FALSE), sdv = sd(var1, na.rm = FALSE), se = 1.96*(sd(var1, na.rm=FALSE)/sqrt(length(var1 Summ$Grouping

[R] Friedman test in R

2013-03-06 Thread chet83
Dear R users, I am new to R and looking into using a Friedman test in R with post-hoc analysis for a time series datset in which I am looking at changes in multiple features over three time points in a number of individuals. As well as detecting if there is an overall difference in features betwe

Re: [R] How to combine conditional argument and logical argument in R to create subset of data...

2013-03-06 Thread HJ YAN
Hi Arun Thank you so much for the help, that's really helpful!! Also I have a quick question about the code below where I can not see why it doesn't work... I know the I shou V1<-c(rep(111,4),rep(222,4),rep(333,4),rep(111,4),rep(222,4),rep(333,3)) V2<-c(1:23) Tem1<-cbind(V1,V2) So Tem 1 look

[R] Troubles with labeling x axis

2013-03-06 Thread iDa
Hi! I have problems with labeling x axis while plotting time series data. I have 40 monthly measurement. One period lasts 4 months. I'd like to have 40 ticks on x axis (10 larger, the rest smaller) and labels just at the beginning of each period, just like in the image

Re: [R] Understanding lm-based analysis of fractional factorial experiments

2013-03-06 Thread Peter Claussen
On Mar 6, 2013, at 9:23 AM, Kjetil Kjernsmo wrote: > On 03/06/2013 04:18 PM, Peter Claussen wrote: >> I'll ignore the rest of your question, in the hope that this will answer >> them sufficiently. > > OK! > >> You probably want a simple linear model, specified in R using "+" instead of >> "*

Re: [R] Understanding lm-based analysis of fractional factorial experiments

2013-03-06 Thread Kjetil Kjernsmo
On 03/06/2013 04:18 PM, Peter Claussen wrote: I'll ignore the rest of your question, in the hope that this will answer them sufficiently. OK! You probably want a simple linear model, specified in R using "+" instead of "*". >leaf.lm <- lm(yavg ~ B + C + D + E + Q, data=leaf) >leaf.lm Cal

Re: [R] Understanding lm-based analysis of fractional factorial experiments

2013-03-06 Thread Peter Claussen
On Mar 6, 2013, at 4:46 AM, Kjetil Kjernsmo wrote: > All, > > I have just returned to R after a decade of absence, and it is good to see > that R has become such a great success! I'm trying to bring Design of > Experiments into some aspects of software performance evaluation, and to > teach

Re: [R] combining column having same values

2013-03-06 Thread Rui Barradas
Hello, Try x <- scan(text = " 1 1 3 2 3 1 1 2 3 3 2") sapply(unique(x), function(.x) which(x == .x)) Hope this helps, Rui Barradas Em 06-03-2013 11:26, eliza botto escreveu: Dear useRs, I have a matrix in the following form [,1] [,2]

Re: [R] CARET and NNET fail to train a model when the input is high dimensional

2013-03-06 Thread Max Kuhn
James, I did a fresh install from CRAN to get caret_5.15-61 and ran your code with method.name = "nnet" and grid.len = 3. I don't get an error, although there were issues: In nominalTrainWorkflow(dat = trainData, info = trainInfo, ... : There were missing values in resampled performance

Re: [R] Understanding lm-based analysis of fractional factorial experiments

2013-03-06 Thread Bert Gunter
As Ista indicates, the basic issue is that the OP does not understand linear modeling and is therefore just thrashing around with lm. For example, the statement about effects being double coefficient is only true with the orthogonal (-1,1) parameterization of the contrasts. So I suggest the OP eit

Re: [R] Understanding lm-based analysis of fractional factorial experiments

2013-03-06 Thread Kjetil Kjernsmo
On 03/06/2013 02:50 PM, Ben Bolker wrote: Just a quick thought (sorry for removing context): what happens if you use sum-to-zero contrasts throughout, i.e. options(contrasts=c("contr.sum", "contr.poly")) ... ? That works (except for the sign)! What would this mean? Kjetil

Re: [R] lm and Formula tutorial

2013-03-06 Thread Bert Gunter
I may be wrong, but I believe what makes it difficult is that the Help file assumes some linear model statistics that you may not have. I suggest that you look for a tutorial on linear models first and then re-read the Help. Incidentally, the provenance of the syntax is GLIM (correction requested i

Re: [R] Generating unique filenames.

2013-03-06 Thread Ben Tupper
Hello, On Mar 6, 2013, at 9:20 AM, Sahana Srinivasan wrote: > Hi, > I am trying to create unique filenames for my output text file. The idea is > that I would like to append a string to ".zsc.txt" so that all my files are > uniquely named but with a similar format. I have tried adding the string

Re: [R] Generating unique filenames.

2013-03-06 Thread Uwe Ligges
On 06.03.2013 15:20, Sahana Srinivasan wrote: Hi, I am trying to create unique filenames for my output text file. The idea is that I would like to append a string to ".zsc.txt" so that all my files are uniquely named but with a similar format. I have tried adding the string variable to ".zsc.tx

[R] Generating unique filenames.

2013-03-06 Thread Sahana Srinivasan
Hi, I am trying to create unique filenames for my output text file. The idea is that I would like to append a string to ".zsc.txt" so that all my files are uniquely named but with a similar format. I have tried adding the string variable to ".zsc.txt" while creating the output file name, i.e. write

Re: [R] Understanding lm-based analysis of fractional factorial experiments

2013-03-06 Thread Ista Zahn
Hi, On Wed, Mar 6, 2013 at 5:46 AM, Kjetil Kjernsmo wrote: > All, > > I have just returned to R after a decade of absence, and it is good to see > that R has become such a great success! I'm trying to bring Design of > Experiments into some aspects of software performance evaluation, and to > tea

Re: [R] Function completely locks up my computer if the input is too big

2013-03-06 Thread Milan Bouchet-Valat
Le mardi 05 mars 2013 à 15:19 -0800, Benjamin Caldwell a écrit : > Hi all, > > Thanks for the suggestions. Updating the function as below to break the > problem into chunks seemed to do the trick - perhaps there is a relatively > small limit to the size of a vector that R can work with? On the con

Re: [R] How to combine conditional argument and logical argument in R to create subset of data...

2013-03-06 Thread arun
Hi, You can also try this:  Tem3<- list()  for(i in unique(Tem1[,1])) {  Tem3[[i]]<- subset(Tem1,Tem1[,1]==i)  Tem4<- do.call(rbind,Tem3)  } head(Tem4) #  V1 V2 #[1,] 111  1 #[2,] 111  2 #[3,] 111  3 #[4,] 111  4 #[5,] 111 13 #[6,] 111 14 #or Tem3<-c(NA,NA)  for(i in unique(Tem1[,1])) {  Tem2

Re: [R] Understanding lm-based analysis of fractional factorial experiments

2013-03-06 Thread Ben Bolker
Kjetil Kjernsmo ifi.uio.no> writes: > > All, > > I have just returned to R after a decade of absence, and it is good to > see that R has become such a great success! I'm trying to bring Design > of Experiments into some aspects of software performance evaluation, and > to teach myself that,

Re: [R] Finding the knots in a smoothing spline using nknots

2013-03-06 Thread Mike Nielsen
Thanks, David! That makes sense. I shall re-read the manual page again. Regards, Mike Nielsen On Wed, Feb 27, 2013 at 12:19 PM, David Winsemius wrote: > > On Feb 27, 2013, at 6:39 AM, Mike Nielsen wrote: > > > Hi r-helpers. > > > > Please forgive my ignorance, but I would like to plot a smoo

Re: [R] How to combine conditional argument and logical argument in R to create subset of data...

2013-03-06 Thread arun
Hi HJ, Tem2<- as.data.frame(Tem1)  res<-do.call(rbind,split(Tem2,Tem2$V1))  row.names(res)<- 1:nrow(res) head(res,7) #   V1 V2 #1 111  1 #2 111  2 #3 111  3 #4 111  4 #5 111 13 #6 111 14 #7 111 15 A.K. From: HJ YAN To: arun Cc: r-help@r-project.org Sent: W

Re: [R] chi square exact test

2013-03-06 Thread Nicole Ford
A quick google search produces multiple results. Good luck. :) ~Nicole Ford Ph.D. Student Graduate Assistant/ Instructor Department of Government and International Affairs University of South Florida office: SOC 012M Sent from my iPhone On Mar 6, 2013, at 6:30 AM, Knut Krueger wrote: > SPPS

Re: [R] Good practice for data() for R-packages

2013-03-06 Thread Uwe Ligges
On 05.03.2013 11:21, Johannes Radinger wrote: Hi, I am compiling a R-package and have two tables (.rda files) that are used by the functions in my package. In the manual for ?data (http://stat.ethz.ch/R-manual/R-patched/library/utils/html/data.html), there is a chapter on good practice for suc

[R] chi square exact test

2013-03-06 Thread Knut Krueger
SPPS is offering a chi square exact test for one dimensional data with small sample size (<6). What is the comparable function in R? Kind Regards Knut __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?

2013-03-06 Thread Stephen Sefick
Look at the function melt and use the factor columns as id variables. You should be able to do what you want with facet_grid. I have found inkscape useful to build legends and modify axes labels. I know this is only a partial answer, but I hope this helps. Stephen On Wed 06 Mar 2013 06:32:4

Re: [R] combining column having same values

2013-03-06 Thread arun
Hi, Try this: mat1<- as.matrix(read.table(text=" 1  1  3  2  3  1  1  2  3  3  2 ",sep="",header=FALSE))  res<-lapply(1:3,function(i) which(mat1==i))  names(res)<- c("a","c","b")  res #$a #[1] 1 2 6 7 #$c #[1]  4  8 11 #$b #[1]  3  5  9 10 A.K. - O

[R] Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?

2013-03-06 Thread Anna Zakrisson
Hi, # For publications, I am not allowed to repeat the axes. I have tried to remove the axes using: # yaxt="n", but it did not work. I have not understood how to do this in ggplot2. Can you help me? # I also do not want loads of space between the graphs (see below script with Dummy Data). # If

Re: [R] Plotting time data for various countries in same graph

2013-03-06 Thread Rui Barradas
Hello, You've forgot to use a geom. Also, to have Time be the x axis variable you need to do a conversion. library(ggplot2) dat <- read.table(text = " Time Country Values 2010Q1India 5 2010Q2India

Re: [R] lm Regression takes 24+ GB RAM - Error message

2013-03-06 Thread R. Michael Weylandt
On Wed, Mar 6, 2013 at 9:51 AM, Jonas125 wrote: > Hello, > > I am a rather unexperienced r-user (learned the language 1 month ago) and > run into the following problem using a local computer with 6 cores & 24 GB > RAM and R 2.15 64-bit. I didn't install any additional packages > > 1. Via the read.

Re: [R] boxplot with frequencies(counts)

2013-03-06 Thread Jim Lemon
On 03/06/2013 12:45 AM, km wrote: Dear All, I have a table as following position type count 1 2 100 1 3 51 1 5 64 1 8 81 1 6 32 2 2 41 2 3 85 and so on Normally if would have a vector of 2,

Re: [R] combining column having same values

2013-03-06 Thread ONKELINX, Thierry
Dear Eliza, You question is not very clear. I think you are looking for the which() function. Best regards, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Klin

Re: [R] lm and Formula tutorial

2013-03-06 Thread Eva Prieto Castro
Dear Alex, Here you have some url's: http://data.princeton.edu/R/linearModels.html http://www.r-bloggers.com/r-tutorial-series-simple-linear-regression/ Regards, Eva --- El mié, 6/3/13, Alaios escribió: De: Alaios Asunto: [R] lm and Formula tutorial Para: "R help" Fecha: miércoles, 6 de ma

  1   2   >