Re: [R] cannot open file '--no-restore.matrix'

2019-11-23 Thread Ana Marija
Thank you so much this indeed solved my issue! On Sat, Nov 23, 2019 at 3:05 PM Henrik Bengtsson wrote: > > Looking at the https://github.com/eleporcu/TWMR/blob/master/README.txt, > it looks like you should pass a single argument when you call the MR.R > script and it should be the name of a

Re: [R] cannot open file '--no-restore.matrix'

2019-11-23 Thread Henrik Bengtsson
Looking at the https://github.com/eleporcu/TWMR/blob/master/README.txt, it looks like you should pass a single argument when you call the MR.R script and it should be the name of a gene, e.g. 'ENSG0154803'. You are passing two arguments and they look like filenames. Update the script, because

Re: [R] cannot open file '--no-restore.matrix'

2019-11-23 Thread Ana Marija
it is confusing because in documentation they say this is how you run the script: https://github.com/eleporcu/TWMR I tried changing this on the script: cmd_args=commandArgs(TRUE) print(cmd_args) gene<-cmd_args[3] Ngwas<-239087 N_eQTLs<-32000 out<-c("gene","alpha","SE","P","Nsnps","Ngene")

Re: [R] cannot open file '--no-restore.matrix'

2019-11-23 Thread Henrik Bengtsson
Maybe it would help to add: file<-paste(gene,"matrix",sep=".") if (!file.exists(file)) stop("File not found: ", file) filecluster<-read.table(file,header=T,sep=" ",dec=".") /Henrik On Sat, Nov 23, 2019 at 11:55 AM Duncan Murdoch wrote: > > On 23/11/2019 1:21 p.m., Ana Marija wrote: > > Hi

Re: [R] cannot open file '--no-restore.matrix'

2019-11-23 Thread Duncan Murdoch
On 23/11/2019 1:21 p.m., Ana Marija wrote: Hi Duncan, thanks, I just did, Rscript --no-save MR.R ENSG0154803.ld ENSG0154803.matrix [1] "ENSG0154803.ld" "ENSG0154803.matrix" Error in file(file, "rt") : cannot open the connection Calls: read.table -> file In addition:

Re: [R] cannot open file '--no-restore.matrix'

2019-11-23 Thread Ana Marija
Hi Duncan, thanks, I just did, Rscript --no-save MR.R ENSG0154803.ld ENSG0154803.matrix [1] "ENSG0154803.ld" "ENSG0154803.matrix" Error in file(file, "rt") : cannot open the connection Calls: read.table -> file In addition: Warning message: In file(file, "rt") : cannot open

Re: [R] cannot open file '--no-restore.matrix'

2019-11-23 Thread Duncan Murdoch
On 23/11/2019 11:05 a.m., Ana Marija wrote: Hi Ben, I am not sure what you mean when you say to print, is it this? cmd_args=commandArgs(TRUE) print(cmd_args) character(0) cmd_args=commandArgs() print(cmd_args) [1] "/software/linux-el7-x86_64/compilers/r-3.6.1/lib64/R/bin/exec/R" I changed

[R] Why does `[<-.matrix` not exist in base R

2019-11-23 Thread David Disabato
Whenever going from working with a data.frame to a matrix, I get annoyed that I cannot assign and subset at the same time with matrices - like I can with data.frames. For example, if I want to add a new column to a data.frame, I can do something like `myDataFrame[, "newColumn"] <- NA`. However,

Re: [R] cannot open file '--no-restore.matrix'

2019-11-23 Thread Ana Marija
Hi Ben, I am not sure what you mean when you say to print, is it this? > cmd_args=commandArgs(TRUE) > print(cmd_args) character(0) > cmd_args=commandArgs() > print(cmd_args) [1] "/software/linux-el7-x86_64/compilers/r-3.6.1/lib64/R/bin/exec/R" I changed in the first line of this script:

Re: [R] cannot open file '--no-restore.matrix'

2019-11-23 Thread Duncan Murdoch
On 23/11/2019 10:26 a.m., Ana Marija wrote: HI Ben, I tried it but it doesn't work: Rscript --no-save MR.R ENSG0154803.ld ENSG0154803.matrix Error in file(file, "rt") : cannot open the connection Calls: read.table -> file In addition: Warning message: In file(file, "rt") : cannot

Re: [R] cannot open file '--no-restore.matrix'

2019-11-23 Thread Ana Marija
HI Ben, I tried it but it doesn't work: Rscript --no-save MR.R ENSG0154803.ld ENSG0154803.matrix Error in file(file, "rt") : cannot open the connection Calls: read.table -> file In addition: Warning message: In file(file, "rt") : cannot open file '--no-restore.matrix': No such file or

Re: [R-es] pawer law

2019-11-23 Thread Carlos Ortega
Hola, Una forma de hacerlo es esta: #- > my_pol <- function( n = 100, grad_ini = 1, grad_end = 5) { + val_rnd <- rnorm(n) + df <- data.frame(c(0)) + for( i in grad_ini:grad_end) { +df_tmp <- as.data.frame(val_rnd^i) +df <- cbind(df, df_tmp) + } +

[R] giving priority to stats package

2019-11-23 Thread Gabor Grothendieck
library and require have new args in 3.6 giving additional control over conflicts. This seems very useful but I was wondering if there were some, preferabley simple, way to give existing loaded packages priority without knowing the actual conflicts in advance. For example library(dplyr,

[R-es] pawer law

2019-11-23 Thread Manuel Mendoza
Buenos días erreros, ¿sabe alguien cómo generar una df cuyas variables sigan una ley de potencias? Gracias [[alternative HTML version deleted]] ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es

Re: [R] cannot open file '--no-restore.matrix'

2019-11-23 Thread Ben Tupper
Hi, I think you want this order... Rscript [options for R] script_file.R argument_1 argument_2 ... So, like this ... Rscript --no-save MR.R ENSG0154803.ld ENSG0154803.matrix Cheers, Ben On Fri, Nov 22, 2019 at 8:59 PM Ana Marija wrote: > > HI Ben, > > thank you so much , I did this:

[R-es] Error in plot.new() : figure margins too large.

2019-11-23 Thread Manuel Mendoza
Olvidadlo, me había equivocado al hacer la matriz. [[alternative HTML version deleted]] ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es