similar to: passing command line arguments to 'R CMD BATCH myScript.R'

Displaying 20 results from an estimated 600 matches similar to: "passing command line arguments to 'R CMD BATCH myScript.R'"

2010 Nov 02
2
get the scripname within the executed myscript.r
Dear R-users! Is there a way to obtain the name of the executed myscript.r, i.e. when cmd> rscript myscript.r is executed? (The name of the script in this case is "myscript.r") Here is the explanation of why I would like to get that: Why: I have prepared a set of scripts (decompose_data.r, plot_with_higher_resolution.r, plot_3D.r, etc.) placed in a root directory at one place. I
2005 Oct 04
2
newbie questions - looping through hierarchial datafille
Dear List, Im new to R - making a transition from SAS. I have a space delimited file with the following structure. Each line in the datafile is identified by the first letter. A = Inventory (Inventory) X = Stratum (Stratum_no Total Ye=year established) P = Plot (Plot_no age slope= species) T = Tree (tree_no frequency) L = Leader (leader diameter height) F = Feature (start_height finish_height
2004 Aug 17
1
survdiff
Hello, As I am quitte an ignorant user of R, excuse me for any wrongfull usage of all the terms. My question relates to the statistics behind the survdiff function in the package survival. My textbook knowledge of the logrank test tells me that if I want to compare two survival curves, I have to take the sum of the factors: (O-E)^2/E of both groups, which will give me the Chisq. If I calculate
2009 Aug 19
4
Basic question: Reading in multiple choice question responses to a single column in data frame
I'm using read.delim to successfully read in tab delimited data, but some columns' values are comma seperated, reflecting the fact that user chose a few answers on a multi-select question. I understand that each answer is its own category and so could be represented as a seperate column in the data set, but I'd like the option of reading in the data column, and converting it to a
2006 Nov 13
2
A printing "macro"
I am exploring the result of clustering a large multivariate data set into a number of groups, represented, say, by a factor G. I wrote a function to see how categorical variables vary between groups: > ddisp <- function(dvar) { + csqt <- chisq.test(G,dvar) + print(csqt$statistic) + print(csqt$observed) + print(round(csqt$expected)) + round(csqt$residuals) + } > > x
2010 Jun 06
2
Generalized DCC GARCH ML estimation
-- View this message in context: http://r.789695.n4.nabble.com/Generalized-DCC-GARCH-ML-estimation-tp2245125p2245125.html Sent from the R help mailing list archive at Nabble.com.
2006 Mar 11
2
how to create analog stripchart plots of x vs t (t=mm/dd/yyyy hh:mm:ss)
Hello r-experts, I sure could us a little help. I have an ever updating text file with timestamped data in it. I can reformat in anyway I want if need be but currently I have chosen to make columns of date, time and measuresed value (comma delimeted and with the dates and times in quotes to interpret them as strings). Here is a small section of my text data file:
2011 Feb 07
1
Question about checkTmvArgs function in rtmvnorm (package tmvtnorm)
Hello! I was wondering if it's possible to see the actual code of checkTmvArgs function that is part of the code for rtmvnorm (which is below - I just typed "rtmvnorm" on the prompt). I get an error: Error in checkTmvArgs(mean, sigma, lower, upper) : sigma must be a symmetric matrix At the same time I am pretty sure that the matrix I am passing as sigma is a var-covar matrix
2009 Jun 25
2
stringsAsFactors has no impact in expand.grid()?
Hi I have the feeling, that the argument stringsAsFactors has no impact in the function expand.grid: a <- c("PR", "NC", "A2", "BS") b <- c(1, 0.5, 0.25, 0.125, 0.0625, 0.03125) class(expand.grid(css, fscs, stringsAsFactors=FALSE)[[1]]) [1] "factor" class(expand.grid(css, fscs, stringsAsFactors=TRUE)[[1]]) [1] "factor" Also, when
2002 Jun 12
3
help debugging segfaults
(Sorry for the cross-post--- I wasn't sure which list is more appropriate...) Hi everyone, I've run into segfaults when using my randomForest package on large dataset (e.g., 100 x 15200) and large number of trees (e.g., ntree=7000 and mtry=3000). I'm wondering if anyone can give me some hints on where to look for the problem. The randomForest package mainly consists of two things:
2002 Jun 12
3
help debugging segfaults
(Sorry for the cross-post--- I wasn't sure which list is more appropriate...) Hi everyone, I've run into segfaults when using my randomForest package on large dataset (e.g., 100 x 15200) and large number of trees (e.g., ntree=7000 and mtry=3000). I'm wondering if anyone can give me some hints on where to look for the problem. The randomForest package mainly consists of two things:
2009 Feb 04
1
package ccgarch - dcc.estimation
Hello, I am trying to model a bivariate time series called 'residuals' as a dcc-garch model. I want to use the function dcc.estimation(a, A, B dcc.para, dvar, model) to estimate the parameters. No matter how I tried to define a, A and B, I always got the message "Error in constrOptim(theta = para, f = loglik.dcc2, gr = grad.dcc2, ui = resta, : initial value not
2011 Jun 28
2
minor Hivex.xs leaks
Hi Rich, While I was looking at hivex today I ran coverity on it. It spotted one problem but missed a similar one nearby. The following are from Hivex.xs: (generated by generator.ml) void node_set_values (h, node, values) hive_h *h; int node; pl_set_values values = unpack_pl_set_values (ST(2)); PREINIT: int r; PPCODE: r = hivex_node_set_values (h, node,
2012 Oct 29
6
export variable from bash to R
Dear R experts This probably seems very easy to you guys, but I'm a beginner and would be really glad if someone helped me with this: I am trying to automate the execution of an R script (let's call it "myscript.R") by passing a variable from a bash script to myscript.R. I know I can use the command Rscript, but I don't know how to declare in bash which variable will be
2018 Sep 28
4
Simple bash question
I am calling a bash script and passing in somestring that includes a "$" myscript "$plusmore" I want to assign in the myscript the $1 arg to something like MYTEXT="$1" when I do that I dont get what I'm expecting. if I do MYTEXT='$1' I still dont get what I'm expecting. On the first assignment of MYTEXT I do not want the "$" to be
2002 Jun 18
1
can't find array overruns (was: help debugging segfaults)
Dear R-devel, Last week I got several responses to my question about debugging segfaults in my code (original post below). After I changed the S_alloc() calls to Calloc()/Free(), the symptom was gone, but I was told to keep looking. So I did: o Switched to Calloc/Free. Electric Fence did not find any problem. o Put assert(index < bound); assert(index >=0); everywhere in the C routine
2009 Aug 05
4
Autorun ability on cd?
I have a little niggling situation that I would like to resolve programmatically. I use Git as my SCM and I have release branches which are sometimes patched. I find myself sometimes entering the working directory tree forgetting that I was last on a release branch and not on the master. What I would like to do is to have a script run every time that I enter a directory, check for .git, and if
2013 Aug 27
1
return the name of source.
Is there a fuction that will allow me to retrun the filename for a script from within that script. fir instance If I have a script "myscript.r": FileName<-unknown.fucntion() print(FileName) and run it source("myscript.r") will return "myscript.r" Thanks Nevil Amos [[alternative HTML version deleted]]
2011 Sep 07
1
process id of an R script
I have a script that runs as a cron job every minute (on Ubuntu 10.10 and R 2.11.1), querying a database for new data. Most of the time it takes a few seconds to run, but once in while it takes more than a minute and the next run starts (on the same data) before the previous one has finished. In extreme cases this will fill up memory with a large number of runs of the same script on the same data.
2018 Oct 16
2
invisible functions
The survival package, like many others, has several helper functions that are not declared in the namespace, since their only use is to be called by other "main" functions of the package.? This works well since the functions in the survival namespace can see them --- without ::: arguments --- and others don't. Until a situation I ran into this week, for which I solicit comments