Re: [R] Glmnet survival cox predict

2019-11-16 Thread Amir Hadanny
Thank you, both train and test are originated from the same data object. attached the missing code: data<-read.csv("old4.csv", header=TRUE) library(imputeMissings) data<-impute(data,object = NULL ,method = "median/mode") for (i in col[13:68]) { data[i]<-lapply(data[i], factor) } for (i in col

[R] Adaptive resampling in r

2019-11-16 Thread Neha gupta
How the hyperparameter settings via adaptive resampling is different from the one obtained from grid search or random search? Both grid and random searches provide best parameters values and the same is achieved using adaptive resampling. [[alternative HTML version deleted]] _

Re: [R] Remove highly correlated variables from a data frame or matrix

2019-11-16 Thread Ana Marija
Hi Peter, Thank you so much!!! I will use complete linkage clustering because Mendelian Randomization function (https://cran.r-project.org/web/packages/MendelianRandomization/vignettes/Vignette_MR.pdf) I plan to use allows for correlations but not as high as 0.9 or more. I got 40 SNPs out of 246 s

Re: [R] Labeling Stacked Bar Plots Representing Percentages with Count Data

2019-11-16 Thread Rui Barradas
Hello, In geom_text change to position = position_fill(vjust=0.5). What's important is to have position = "fill" in geom_bar match geom_text. Something like : library(dplyr) library(ggplot2) data(mtcars) mtcars %>% group_by(cyl, gear) %>% summarise(count = n()) %>% ggplot(aes(factor(cyl

Re: [R] Labeling Stacked Bar Plots Representing Percentages with Count Data

2019-11-16 Thread Jim Lemon
Hi Josh, I couldn't work out how to do this in ggplot, but here is a possible solution: tagSummary<-read.csv(text="speciesSci,recvDeployName,nDet Arenaria interpres,Bucktoe Preserve,96 Arenaria interpres,CHDE,132 Arenaria interpres,Fortescue,22133 Arenaria interpres,Mispillion,2031 Arenaria i

[R] Can't get facet_grid_paginate() from ggforce to work.

2019-11-16 Thread Rolf Turner
Clearly there's something that I'm not understanding, but facet_grid_paginate() seems to be ignoring the "ncol" argument. Here's a reprex: library(ggforce) X <- dget("testData.txt") ncols <- length(levels(X$LifeStage)) npages <- length(levels(X$degC)) plotObj <- vector("list",npages) for(page

[R] Supplying names to vars() in ggplot2.

2019-11-16 Thread Rolf Turner
I need to call ggplot() from another function with the names of the faceting variables supplied as arguments to the calling function. These names (which are names of columns in the relevant data frame) are given as character arguments, say "rowName" and "colName". Suppose that rowName is equ

[R] (no subject)

2019-11-16 Thread imran damkar
I want to check if boot strapping can prove helpful in improving homogeneity of variance. If it does so, I would like to perform hypothesis testing on same transformed data( bootstrapped data),by using non-parametric anova . How can I store new bootstrapped data set in data frame? Data is 5 point