Re: [ESS] Hang when opening remote session

2018-08-27 Thread Marcora, Edoardo via ESS-help
Looking at the TRAMP debug buffer, this is where things hang... 11:53:28.096969 tramp-send-string (10) # cd /hpc/users/XXX/projects/ad.myeloid/2018-08-22.hgnc_reannot/ && exec env PS1\=/ssh\:XXX\@bode.hpc.mssm.edu\:/hpc/users/XXX/projects/ad.myeloid/2018-08-22.hgnc_reannot/\ \#\$\ TERMCAP\=

Re: [R] r-data partitioning considering two variables (character and numeric)

2018-08-27 Thread Ahmed Attia
Thanks Bert, worked nicely. Yes, genotypes with only one ID will be eliminated before partitioning the data. Best regards Ahmed Attia On Mon, Aug 27, 2018 at 8:09 PM, Bert Gunter wrote: > Just partition the unique stand_ID's and select on them using %in% , say: > > id <-

Re: [R-es] Media

2018-08-27 Thread Eric
Con la libreria data.table: as.data.table(tus.datos) tus.datos[, mean(Long), by=Año] Suerte !!! eric. On 27/08/18 19:23, Carlos Ortega wrote: Hola, Puedes hacerlo de muchas formas, pero por seguir lo que más se utiliza últimamente de "dplyr"... library(dplyr) my_res <- talla %>%

Re: [R] r-data partitioning considering two variables (character and numeric)

2018-08-27 Thread Bert Gunter
Sorry, my bad -- careless reading: you need to do the partitioning within genotype. Something like: by(dataGenotype, dataGenotype$Genotype, function(x){ u <- unique(x$standID) tst <- x$x2 %in% sample(u, floor(length(u)/2)) list(test = x[tst,], train = x[!tst,] }) This will give a

Re: [R] r-data partitioning considering two variables (character and numeric)

2018-08-27 Thread MacQueen, Don via R-help
And yes, I ignored Genotype, but for the example data none of the stand_ID values are present in more than one Genotype, so it doesn't matter. If that's not true in general, then constructing the grp variable is a little more complex, but the principle is the same. -- Don MacQueen Lawrence

Re: [R] r-data partitioning considering two variables (character and numeric)

2018-08-27 Thread MacQueen, Don via R-help
You could start with split() grp <- rep('', nrow(mydata) ) grp[mydata$stand_ID %in% c(7,9,67)] <- 'A-training' grp[mydata$stand_ID %in% c(3,18,20,21,32)] <- 'B-testing' split(mydata, grp) or perhaps grp <- ifelse( mydata$stand_ID %in% c(7,9,67) , 'A-training', 'B-testing' ) split(mydata, grp)

Re: [R] r-data partitioning considering two variables (character and numeric)

2018-08-27 Thread Bert Gunter
Just partition the unique stand_ID's and select on them using %in% , say: id <- unique(dataGenotype$stand_ID) tst <- sample(id, floor(length(id)/2)) wh <- dataGenotype$stand_ID %in% tst ## logical vector test<- dataGenotype[wh,] train <- dataGenotype[!wh,] There are a million variations on this

[R] r-data partitioning considering two variables (character and numeric)

2018-08-27 Thread Ahmed Attia
I would like to partition the following dataset (dataGenotype) based on two variables; Genotype and stand_ID, for example, for Genotype H13: stand_ID number 7 may go to training and stand_ID number 18 and 21 may go to testing. Genotypestand_IDInventory_date stemC mheight H13

Re: [R-es] Media

2018-08-27 Thread Carlos Ortega
Hola, Puedes hacerlo de muchas formas, pero por seguir lo que más se utiliza últimamente de "dplyr"... library(dplyr) my_res <- talla %>% group_by(Año) %>% summarise( val_avg = mean(Long), n = n()) my_res Saludos, Carlos Ortega www.qualiytexcellence.es El 27

Re: [R] Warning: unable to access index for repository...

2018-08-27 Thread Tully Holmes
Thanks Bert, I'll reference this repository to determine the firewall rules we will need. -- Tully Holmes Business Applications Analyst State of Wyoming Wyoming Community College Commission 2300 Capitol Ave., 5th Floor, Suite B Cheyenne, WY 82002 307-777-6832 On Mon, Aug 27, 2018 at

[R-es] Media

2018-08-27 Thread MAURICIO MARDONES
Estimada lista la pregunta es muy básica, pero necesito saber la Long media para cada año. Estoy pillando en el bucle. > head(talla) X Long Año 1 1 56 2016 2 2 58 2016 3 3 58 2016 4 4 58 2016 5 5 58 2016 6 6 58 2016 > tail(talla) X Long Año 2567630

Re: [R] importing .v8x file in R

2018-08-27 Thread John Kane via R-help
A simple google would have let you here SAS Enterprise Guide Implemented at MDACC.It looks like you have a SAS transport file . Check out the SASxport package. It may do what you want. | | | | SAS Enterprise Guide Implemented at MDACC | | | On Thursday, August 23, 2018,

Re: [R] Cant schedule R job using taskscheduleR

2018-08-27 Thread John Kane via R-help
A quick guess it that your version of R is outdated.sessionInfo() R version 3.5.0 package ‘taskscheduleR’ was built under R version 3.5.1 I don't know if that is the source of the error but I'd suggest updating to 3.5.1 as a first step. On Friday, August 24, 2018, 9:12:36 a.m. EDT,

Re: [R] Warning: unable to access index for repository...

2018-08-27 Thread Bert Gunter
The main CRAN repository is at: https://cran.r-project.org/ A full list of repositories can be found under the "Mirrors" link there. Cheers, Bert On Mon, Aug 27, 2018 at 1:19 PM Tully Holmes wrote: > Good afternoon, > > I'm trying to install a package with the "install.packages" command in

[R] Warning: unable to access index for repository...

2018-08-27 Thread Tully Holmes
Good afternoon, I'm trying to install a package with the "install.packages" command in RGUI, and get the following error message: > install.packages ("tidyverse") Warning: unable to access index for repository https://mran.microsoft.com/snapshot/2017-05-01/src/contrib: cannot open URL ''

Re: [R] "use of NULL environment is defunct" when trying to lock a reference class

2018-08-27 Thread Eric Berger
Hi Ivan, Unfortunately I cannot answer your question. However, I do have quite a bit of experience using R's reference classes and you might want to consider the more recent R6 package. It provides R6 classes which have advantages over reference classes. See for example: 1. Hadley Wickham on R6

[R] "use of NULL environment is defunct" when trying to lock a reference class

2018-08-27 Thread Ivan Krylov
Hi! I'm trying to create a persistent memoising class with a destructor and an option to evaluate cache misses in parallel. I want to lock all its fields because it doesn't make sense to change them after the filename, the environment object and the function are set in the object. (I'm not sure

Re: [R] NaN in Scoring Sentiment

2018-08-27 Thread Shivi Bhatia
Thanks you Petr. This worked.  Regards, Shivi  Sent from Yahoo Mail for iPhone On Monday, August 27, 2018, 14:31, PIKAL Petr wrote: Hi the output seems to me rather weird. Unles you have NaNs in input data frame you should not get NaN as a result. Anyway, your aggregate will give you NA

Re: [R] NaN in Scoring Sentiment

2018-08-27 Thread PIKAL Petr
Hi the output seems to me rather weird. Unles you have NaNs in input data frame you should not get NaN as a result. Anyway, your aggregate will give you NA or NaN even when there is only one NA or NaN in your input data frame. So I suggest to use sentiments_per_Category <-

Re: [R] Help with DNA Methylation Analysis

2018-08-27 Thread Eric Berger
Your problem is that the command you entered > the_data<-read.csv(file=“c:/file_name.csv,header=TRUE,sep=“,”) is missing a double quote after the .csv. The statement should be > the_data<-read.csv(file=“c:/file_name.csv",header=TRUE,sep=“,”) The '+' sign is a prompt from R that indicates it