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
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
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")
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
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:
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
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
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,
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:
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
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
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)
+ }
+
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,
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
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:
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
16 matches
Mail list logo