Re: [R] Removing a data subset

2017-11-29 Thread Ivan Calandra
Hi David, You "just" need to learn how to subset your data.frame, see functions like ?subset and ?"[", as well as a good guide to understand the subtleties! Some graphic functions also have a built-in argument to subset within the function (e.g. argument 'subset' in 'plot.formula'), although

Re: [R] 2^3 confounded factorial experiment

2017-11-29 Thread David Winsemius
> On Nov 29, 2017, at 9:20 AM, Jyoti Bhogal wrote: > > The following R commands were written: >> help.search("factorial") >> data(npk) >> npk >> coef(npk.aov) > > In the output of coef command, please explain me the interpretation of > coefficients of block1 to block 6 in

Re: [R] Data cleaning & Data preparation, what do R users want?

2017-11-29 Thread Jim Lemon
Hi again, Typo in the last email. Should read "about 40 standard deviations". Jim On Thu, Nov 30, 2017 at 10:54 AM, Jim Lemon wrote: > Hi Robert, > People want different levels of automation in the software they use. > What concerns many of us is the desire for the

Re: [R] Data cleaning & Data preparation, what do R users want?

2017-11-29 Thread Jim Lemon
Hi Robert, People want different levels of automation in the software they use. What concerns many of us is the desire for the function "figure-out-what-this-data-is-import-it-and-get-rid-of-bad-values". Such users typically want something that justifies its use by being written by someone who

Re: [R] dplyr - add/expand rows

2017-11-29 Thread Martin Morgan
On 11/29/2017 05:47 PM, Tóth Dénes wrote: Hi Martin, On 11/29/2017 10:46 PM, Martin Morgan wrote: On 11/29/2017 04:15 PM, Tóth Dénes wrote: Hi, A benchmarking study with an additional (data.table-based) solution. I don't think speed is the right benchmark (I do agree that correctness

Re: [R] dplyr - add/expand rows

2017-11-29 Thread Tóth Dénes
Hi Martin, On 11/29/2017 10:46 PM, Martin Morgan wrote: On 11/29/2017 04:15 PM, Tóth Dénes wrote: Hi, A benchmarking study with an additional (data.table-based) solution. I don't think speed is the right benchmark (I do agree that correctness is!). Well, agree, and sorry for the

Re: [R] Removing a data subset

2017-11-29 Thread Rainer Schuermann
Reading in the data from the file x <- read.csv( "ExampleData.csv", header = TRUE, stringsAsFactors = FALSE ) Subsetting as you want x <- x[ x$Location != "MW01", ] This selects all rows where the value in column 'Location' is not equal to "MW01". The comma after that ensures that

Re: [R] dplyr - add/expand rows

2017-11-29 Thread Martin Morgan
On 11/29/2017 04:15 PM, Tóth Dénes wrote: Hi, A benchmarking study with an additional (data.table-based) solution. I don't think speed is the right benchmark (I do agree that correctness is!). For the R-help list, maybe something about least specialized R knowledge required would be

Re: [R] dplyr - add/expand rows

2017-11-29 Thread Tóth Dénes
Hi, A benchmarking study with an additional (data.table-based) solution. Enjoy! ;) Cheers, Denes -- ## packages ## library(dplyr) library(data.table) library(IRanges) library(microbenchmark) ## prepare example dataset ### ## use

[R] Removing a data subset

2017-11-29 Thread David Doyle
Say I have a dataset that looks like LocationYear GW_Elv MW011999 546.63 MW021999 474.21 MW031999 471.94 MW041999466.80 MW012000545.90 MW022000546.10 The whole dataset is at

[R] 2^3 confounded factorial experiment

2017-11-29 Thread Jyoti Bhogal
The following R commands were written: >help.search("factorial") >data(npk) >npk >coef(npk.aov) In the output of coef command, please explain me the interpretation of coefficients of block1 to block 6 in this 2^3 confounded factorial experiment. Thanks. [[alternative HTML version

Re: [R] SAMseq errors

2017-11-29 Thread Jeff Newmiller
A) This list is a general interest list on the R language... you have posed your question as if you were looking for domain experts such as you might be more likely to find on the Bioconductor mailing list. B) Example is not reproducible. [1][2][3] C) Just because your data don't have missing

[R] SAMseq errors

2017-11-29 Thread array chip via R-help
Sorry forgot to use plain text format, hope this time it works: Hi, I am trying to using SAMseq() to analyze my RNA-seq experiment (2 genes x 550 samples) with survival endpoint. It quickly give the following error: > library(samr) Loading required package: impute Loading required package:

[R] SAMseq errors

2017-11-29 Thread array chip via R-help
Hi, I am trying to using SAMseq() to analyze my RNA-seq experiment (2 genes x 550 samples) with survival endpoint. It quickly give the following error: > library(samr)Loading required package: imputeLoading required package: > matrixStats Attaching package: ‘matrixStats’ The following

Re: [R] Data cleaning & Data preparation, what do R users want?

2017-11-29 Thread Robert Wilkins
Christopher, OK, well what about a range of functions in an R package that automatically, with very little syntax, pulls in data from a variety of formats (CSV, SQLite, and so on) and converts them to an R data frame. You seem to be pointing to something like that. Something like that, in some

Re: [R] Data cleaning & Data preparation, what do R users want?

2017-11-29 Thread Bert Gunter
Oh Crap! I mistakenly replied onlist. PLEASE IGNORE -- these are only my ignorant opinions. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Nov

Re: [R] Data cleaning & Data preparation, what do R users want?

2017-11-29 Thread Christopher W. Ryan
Great question. What do I want? I want my co-workers to stop using Excel spreadsheets for data entry, storage, and sharing! I want them to understand the value of data discipline. But alas . . . . I work in a county health department in the US. Between dplyr, stringr, grep, grepl, and the base R

Re: [R] Data cleaning & Data preparation, what do R users want?

2017-11-29 Thread Bert Gunter
I don't think my view is of interest to many, so offlist. I reject this: " I would consider data analysis work to be three stages: data preparation, statistical analysis, and producing the report." For example, there is no such thing as "outliers" -- data to be removed as part of

[R] Data cleaning & Data preparation, what do R users want?

2017-11-29 Thread Robert Wilkins
R has a very wide audience, clinical research, astronomy, psychology, and so on and so on. I would consider data analysis work to be three stages: data preparation, statistical analysis, and producing the report. This regards the process of getting the data ready for analysis and reporting,

Re: [R] Preventing repeated package installation, or pre installing packages

2017-11-29 Thread Thierry Onkelinx
Dear Larry, Have a look at https://github.com/inbo/rstable That is a dockerfile with a stable version of R and a set of packages. Best regards, ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE

Re: [R] Preventing repeated package installation, or pre installing packages

2017-11-29 Thread Rainer Krug
> On 29 Nov 2017, at 15:28, Larry Martell wrote: > > I have a R script that I call from python using rpy2. It uses dplyr, doBy, > and ggplot2. The script has install.packages commands for these 3 packages. > Even thought the packages are already installed it still

Re: [R] Preventing repeated package installation, or pre installing packages

2017-11-29 Thread Michael Dewey
Dear Larry As far as your first question is concerned I think one of require or requireNamespace may be what you need. Michael On 29/11/2017 14:28, Larry Martell wrote: I have a R script that I call from python using rpy2. It uses dplyr, doBy, and ggplot2. The script has install.packages

[R] Preventing repeated package installation, or pre installing packages

2017-11-29 Thread Larry Martell
I have a R script that I call from python using rpy2. It uses dplyr, doBy, and ggplot2. The script has install.packages commands for these 3 packages. Even thought the packages are already installed it still downloads, builds, and installs them, which is very time consuming. Is there a way to have

Re: [R] DeSolve Package and Moving Average

2017-11-29 Thread Eric Berger
Since you only provide pseudo-code I will give a guess as to the source of the problem. It is easy to get "burned" by use of the ifelse statement. Its results have the same "shape" as the first argument. My suggestion is to try replacing ifelse by a standard if ( ) { } else { } HTH, Eric

[R] DeSolve Package and Moving Average

2017-11-29 Thread Werning, Jan-Philipp
Dear all, I am using the DeSolve Package to simulate a system dynamics model. At the problematic point in the model, I basically want to decide how many products shall be produced to be sold. In order to determine the amount a basic forecasting model of using the average of the last 12 time

Re: [R-es] Búsqueda de palabras en una variable de R

2017-11-29 Thread Carlos J. Gil Bellosta
readLines() El mié., 29 nov. 2017 5:51, escribió: > Muchas gracias, > > Estoy intentado ejecutar el paquete y necesito importar el archivo txt, > pero necesito importarlo de modo que cada línea sea una observación y no > un texto único (tengo unas 63,000 lineas). No

Re: [R] How to extract coefficients from sequential (type 1), ANOVAs using lmer and lme

2017-11-29 Thread Phillip Alday
(This time with the r-help in the recipients...) Be careful when mixing lme4 and lmerTest together -- lmerTest extends and changes the behavior of various lme4 functions. From the help page for lme4-anova (?lme4::anova.merMod) > ‘anova’: returns the sequential decomposition of the