Re: [R] not allocate of vactor size

2015-11-23 Thread jim holtman
​I am not sure how the 2GB file might expand when you read it into R. I would suggest that you take a portion, e.g., 500MB, and read it in and see how large the resulting object is in R. Continue and process this smaller size to see how memory utilization changes. This will provide information a

Re: [R] Is manova() correct for this analysis?

2015-11-23 Thread Bert Gunter
This list is about R programming. Yours is a statistical question. Although there is certainly a nonempty intersection (and someone may attempt a response), statistical questions are better directed to a statistical list like stats.stackexchange.com. Cheers, Bert Bert Gunter "Data is not inform

Re: [R] how to write this summation n R

2015-11-23 Thread Jeff Newmiller
You seem to have forgotten to show us any version of "this equation". You could link to a Web site that shows it, or you could use LaTeX notation. -- Sent from my phone. Please excuse my brevity. On November 23, 2015 3:05:44 PM PST, Sherouk Moawad via R-help wrote: >Dear R experts do you hav

[R] Is manova() correct for this analysis?

2015-11-23 Thread angelo.arc...@virgilio.it
Dear list members, I have to perform the following analysis but I do not know which function in R must be used. My guess is to use manova(). During an experiment I presented participants with some sound stimuli and I asked them to modify two parameters of the sound (Centroid and Sound_Level_Pea

Re: [R] subset data using a vector

2015-11-23 Thread DIGHE, NILESH [AG/2362]
Michael: I tried using your suggestion of using length and still get the same error: Error in m1[[i]] : subscript out of bounds I also checked the length of m1 and x and they both are of same length (64). After trying several things, I was able to extract the list but this was done outside the

[R] how to write this summation n R

2015-11-23 Thread Sherouk Moawad via R-help
Dear R experts do you have any idea about how this equation can be written in R?? __ 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 http://www.R-project.org/

Re: [R] summarize_ (NSE) in combination with quantile not working

2015-11-23 Thread Tobias Byland
Hi SD, thanks, that was exactly what I was looking for! Much appreciated :) Regards, Tobi On 11/23/2015 9:59 PM, Sébastien Durier wrote: Hello, A more explicit response can be found in : https://cran.r-project.org/web/packages/lazyeval/vignettes/lazyeval.html where it is explained that : "qu

[R] R: Re: Question about lme syntax

2015-11-23 Thread angelo.arc...@virgilio.it
Dear Prof. Andrew Robinson, I am very grateful to you for your enlightening answer All the best Angelo Messaggio originale Da: a.robin...@ms.unimelb.edu.au Data: 23-nov-2015 20.50 A: "angelo.arc...@virgilio.it" Cc: "R help (r-help@r-project.org)" Ogg: Re: [R] Question about lme

Re: [R] summarize_ (NSE) in combination with quantile not working

2015-11-23 Thread Sébastien Durier
Hello, A more explicit response can be found in : https://cran.r-project.org/web/packages/lazyeval/vignettes/lazyeval.html where it is explained that : "quoted called and strings don’t have environments associated with them, so as.lazy() defaults to using baseenv(). This will work if the expres

Re: [R] Question about lme syntax

2015-11-23 Thread Andrew Robinson
Hi Angelo, it's dangerous to fit a model that includes interaction effects but omits main effects. Among other things, what can happen is that the statistical tests become scale dependent, which is most unattractive. I think that you should include the main effects in your model, even as nuisanc

Re: [R] diff-ing .rds files

2015-11-23 Thread Will Hopper
I was envisioning something involving write.csv(), but this is a better idea, thanks! On Mon, Nov 23, 2015 at 3:31 PM, William Dunlap wrote: > Your any-RDS-to-ASCII-converter could be the R function >toASCIIRDS <- function (fromRDS, toRDS) >{ > saveRDS(readRDS(fromRDS), file = toRD

Re: [R] diff-ing .rds files

2015-11-23 Thread William Dunlap
Your any-RDS-to-ASCII-converter could be the R function toASCIIRDS <- function (fromRDS, toRDS) { saveRDS(readRDS(fromRDS), file = toRDS, ascii = TRUE, compress = FALSE) } which you can call from Rscript with appropriate input and output file names. Bill Dunlap TIBCO Software wdunl

Re: [R] Extract an number from a character

2015-11-23 Thread David Wolfskill
On Mon, Nov 23, 2015 at 12:20:53PM -0800, Sam Albers wrote: > Hello, > > I have a problem to which I am certain grep or gsub or that family of > functions are the solution. However, I just can't seem to wrap my mind > around exactly how. I have a dataframe below that has the dimensions > of a net.

Re: [R] diff-ing .rds files

2015-11-23 Thread Will Hopper
Thanks for the input Jeff and Burt, and I could have been more clear about what I was looking for. You are of course right that there is nothing preventing me from using plain text files, I initially went with compressed binary files because they were, of course, smaller. What I was curious about

[R] Extract an number from a character

2015-11-23 Thread Sam Albers
Hello, I have a problem to which I am certain grep or gsub or that family of functions are the solution. However, I just can't seem to wrap my mind around exactly how. I have a dataframe below that has the dimensions of a net. I am given the data is the "W X H" format. For calculations I'll like t

Re: [R] diff-ing .rds files

2015-11-23 Thread Jeff Newmiller
You are sending contradictory signals... do you or do you not want plain text files? You have not indicated what advantage you are getting from having binary files in your repository. By far the best answer I see to your dilemma is to save in ASCII format instead of the default binary format.

Re: [R] subset data using a vector

2015-11-23 Thread Michael Dewey
Try looking at your function and work through what happens if the length is what I suggested. >> x <- length(plot.id) >> >> for (i in (1:x)) { >> >> m2[i] <- m1[[i]] So unless m1 has length at least x you are doomed. On 23/11/2015 16:26, DIGHE, NILESH [AG/2362] wrote: Mi

Re: [R] diff-ing .rds files

2015-11-23 Thread Bert Gunter
?dput or ?dump perhaps. (and dget() and source() ) I realize that these may not do what you want, but exactly what you want is a bit unclear (to me, anyway) depending on exactly what your saved results are. Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. And kn

Re: [R] Converting time zones in R using metadata file information of video files, help needed.

2015-11-23 Thread Law, Jason
The "lubridate" package will help simplify these time zone conversions. It provides two simple functions with_tz and force_tz that conceptually make things simpler. library(lubridate) > x <- as.POSIXct("2015-06-22 01:53:28", 'Europe/Berlin') > with_tz(x, 'America/Toronto') [1] "2015-06-21 19:53:

[R] diff-ing .rds files

2015-11-23 Thread Will Hopper
Hi all, I'm posting to see if anyone knows of any existing resources that auto-magically converts r objects in saved in .rds files to a plain text representation, suitable for diffing? I often save the results of long running calculation as .rds files, and since I use git for source control, it w

Re: [R] unique identifier for number sequence

2015-11-23 Thread Eik Vettorazzi
cumsum(c(x[1],pmax(0,diff(x*x Am 23.11.2015 um 15:59 schrieb PIKAL Petr: > Dear all > > I have a vector ones and zeroes like that > x<-c(rep(0,5), rep(1,5), rep(0,10), rep(1,8)) > > and I need to get result like that > x.i<-c(rep(0,5), rep(1,5), rep(0,10), rep(2,8)) > > It means I need an u

Re: [R] subset data using a vector

2015-11-23 Thread DIGHE, NILESH [AG/2362]
Michael: I like to use the actual range id's listed in column "rangestouse" to subset my data and not the length of that vector. Thanks. Nilesh -Original Message- From: Michael Dewey [mailto:li...@dewey.myzen.co.uk] Sent: Monday, November 23, 2015 10:17 AM To: DIGHE, NILESH [AG/2362];

[R] Fwd: Re: knn - random result although use.all=TRUE

2015-11-23 Thread itziar irigoien
Thank you very much for your prompt response. Now I see why the results have a random part: although all units with tied distances are included in the neighbourhood, the votes have to be broken at random. Thank you! Itziar Irigoien On or., 2015.eko azaren 20a 16:40, David L Carlson wrote: Chan

Re: [R] Spectral density estimations for irregular time-series

2015-11-23 Thread Valery Khamenya
Jeff, many thanks for your answer. On Sun, Nov 22, 2015 at 8:40 PM, Jeff Newmiller wrote: > Since you seem to have trouble reading (the Posting Guide warns you to post > here using plain text format emails.. doing so will be to your benefit when > we can see what you posted clearly), the body

Re: [R] Spectral density estimations for irregular time-series

2015-11-23 Thread Jeff Newmiller
Well, that response was much more clear than your original email was. 1. The automatically-generated plain text component of an email is usually much less intelligible than a directly-generated text. In particular, line breaks and faux highlighting corrupt example code in the plain text versi

Re: [R] subset data using a vector

2015-11-23 Thread Michael Dewey
length(strsplit(as.character(mydata$ranges2use), ",")) was that what you expected? I think not. On 23/11/2015 16:05, DIGHE, NILESH [AG/2362] wrote: Dear R users, I like to split my data by a vector created by using variable "ranges". This vector will have the current range (r

Re: [R] unique identifier for number sequence

2015-11-23 Thread William Dunlap
> f <- function(x)cumsum(c(x[1]==1, x[-length(x)]==0 & x[-1]==1)) * (x==1) > f(x) [1] 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 > f(rev(x)) [1] 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 0 0 0 0 0 Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Nov 23, 2015 at 6:59 AM, PIK

[R] subset data using a vector

2015-11-23 Thread DIGHE, NILESH [AG/2362]
Dear R users, I like to split my data by a vector created by using variable "ranges". This vector will have the current range (ranges), preceding range (ranges - 1), and post range (ranges + 1) for a given plotid. If the preceding or post ranges in this vector are outside the l

[R] R: RE: How to plot results from lme in presence of a significant interaction

2015-11-23 Thread angelo.arc...@virgilio.it
Dear prof. Fox, thank you very much Best regards Angelo >Messaggio originale >Da: j...@mcmaster.ca >Data: 23-nov-2015 12.50 >A: "angelo.arc...@virgilio.it" >Cc: "r-help@r-project.org" >Ogg: RE: [R] How to plot results from lme in presence of a significant interaction > >Dear Angelo, >

Re: [R] unique identifier for number sequence

2015-11-23 Thread jim holtman
Forgot to check if it starts with '1'; this should fix it. > x<-c(rep(1,2), rep(0,5), rep(1,5), rep(0,10), rep(1,8)) > x [1] 1 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 > > # mark changes from 0->1 and create increments > # added a fix if it starts with '1' > indx <- cumsum(c(x[1L

Re: [R] unique identifier for number sequence

2015-11-23 Thread PIKAL Petr
Hi Cool, thanks. I knew I am missing some obvious way. Cheers Petr From: jim holtman [mailto:jholt...@gmail.com] Sent: Monday, November 23, 2015 4:14 PM To: PIKAL Petr Cc: r-help@r-project.org Subject: Re: [R] unique identifier for number sequence Here is one way of doing it: > x<-c(rep(0,5),

Re: [R] unique identifier for number sequence

2015-11-23 Thread jim holtman
Here is one way of doing it: > x<-c(rep(0,5), rep(1,5), rep(0,10), rep(1,8)) > x [1] 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 > > # mark changes from 0->1 and create increments > indx <- cumsum(c(FALSE, diff(x) == 1)) > > # keep just matches with '1' > x.i <- ifelse(x == 1, indx, 0

[R] unique identifier for number sequence

2015-11-23 Thread PIKAL Petr
Dear all I have a vector ones and zeroes like that x<-c(rep(0,5), rep(1,5), rep(0,10), rep(1,8)) and I need to get result like that x.i<-c(rep(0,5), rep(1,5), rep(0,10), rep(2,8)) It means I need an unique identifier for each sequence of ones. It probably can be done by rle, cumsum and some fid

Re: [R] RGL Problem

2015-11-23 Thread Duncan Murdoch
On 23/11/2015 7:45 AM, Stefan Evert wrote: On 23 Nov 2015, at 11:50, Duncan Murdoch wrote: The OSX binary version of rgl on CRAN is ancient. You'll need to reinstall it from source for a current one. Since you bring up this point: any chance of getting Mac binaries from CRAN again? Y

Re: [R] How to plot results from lme in presence of a significant interaction

2015-11-23 Thread Fox, John
Dear Angelo, You might try the Effect() function in the effects package: plot(Effect(c("Weight", "Height"), lme_Centroid)) . I hope this helps, John - John Fox, Professor McMaster University Hamilton, Ontario Canada L8S 4M4 Web: socserv.mcmaster.ca/jfox > -Or

Re: [R] RGL Problem

2015-11-23 Thread Stefan Evert
> On 23 Nov 2015, at 11:50, Duncan Murdoch wrote: > > The OSX binary version of rgl on CRAN is ancient. You'll need to reinstall > it from source for a current one. Since you bring up this point: any chance of getting Mac binaries from CRAN again? Rgl is a particularly nice tool because of

Re: [R] Problems installing biocLite on Fedora 23

2015-11-23 Thread Morgan, Martin
This is in reference to Bioconductor, and should be addressed to the Bioconductor support site https://support.bioconductor.org The problem is not with biocLite per se, but with installation of Rsamtools. My guess is that Rsamtools wraps a library 'samtools', and tries to re-map samtool's us

[R] Problems installing biocLite on Fedora 23

2015-11-23 Thread Knut Hansen
I'm running Fedora 23 with KDE 5.16. I'm trying to install biocLite using the commands source("https://bioconductor.org/biocLite.R";) biocLite() as root. During installation I get error messages like this: gcc -m64 -I/usr/include/R -DNDEBUG -I/usr/local/include - I"/usr/lib64/R/library/S4Vect

Re: [R] RGL Problem

2015-11-23 Thread Duncan Murdoch
On 22/11/2015 11:56 PM, Margarette Bayron Arcelay via R-help wrote: Dear List, Im using Rstudio on a macbook pro OS X Yosemite version 10.10.5 and im trying to open the package geomorph but a warning message related to rgl shows up. Whoops, I forgot one thing. The OSX binary version of rgl o

Re: [R] RGL Problem

2015-11-23 Thread Duncan Murdoch
On 22/11/2015 11:56 PM, Margarette Bayron Arcelay via R-help wrote: Dear List, Im using Rstudio on a macbook pro OS X Yosemite version 10.10.5 and im trying to open the package geomorph but a warning message related to rgl shows up. library(geomorph) Loading required package: rgl Warning mess

[R] Question about lme syntax

2015-11-23 Thread angelo.arc...@virgilio.it
Dear list, I need an help to understand the syntax of lme to fit my model according to the analysis I want to perform. My dependent variable resulted from a perceptual experiment in which responses of participants were measured twice for each provided stimulus. My goal is to verify whether the

[R] R: Re: How to plot results from lme in presence of a significant interaction

2015-11-23 Thread angelo.arc...@virgilio.it
Dear Bert and R list, actually I had tried the interaction plot function, but I deduced that it was not the correct function since it gave me an empty plot (no lines). This should not be correct because as you can see from the results of the analysis I reported in the previous e-mail, there is