Displaying 20 results from an estimated 10000 matches similar to: "source filename information within the source?"
2010 Jul 27
2
lattice: option to sort x when type = l
Hi,
(please Cc me)
In xyplot (), type = "l" (or one that includes "l", *el*) is
(generally) meaningful only when the 'x' variable is sorted. In
practice, one either sorts the data frame before hand or writes a tiny
panel function which sorts the supplied x and then calls the default
panel.xyplot(). Trouble arises when there is a conditional variable as
well as a
2007 May 02
0
Rscript in R-2.5.0 on Ubuntu/dapper
Stephen,
I hope you don;t mind that I am ccing this to the r-sig-debian list. In the
future, please consider asking there, in particular for Ubuntu.
On 2 May 2007 at 15:56, Stephen B. Weston wrote:
| Dirk,
|
| I just downloaded and installed the .deb files for R-2.5.0
| for my Ubuntu/Dapper machine from:
|
| http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu/dapper/
|
| I admit that I
2019 Jan 31
0
Runnable R packages
Belated thanks to all who replied to my initial query. In summary, three
approaches have been mentioned to run R code "in production": 1)
ShinyProxy, mentioned by Tobias, for deploying Shiny applications; 2)
Docker-like solutions, mentioned by Gergely and I?aki; and 3) Solutions
based on Rscript or littler, mentioned by Dirk.
I can't speak to 1) because I don't currently use
2012 Aug 27
2
littler and rJava
Hello list,
I'm having some difficulty getting rJava to load in littler. Even
after a R CMD javareconf and a reinstall of littler, I get this:
jlaing at xenon:~$ r -e "require(rJava)"
Loading required package: rJava
Loading required package: methods
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable
2007 Jan 08
1
scripts with littler
Hi,
I'm trying to write R scripts using littler (under Debian), and was
originally using the shebang line:
#!/usr/bin/env r
However this picks up any .RData file that happens to be lying around, which
I find a little disturbing, because it means that the script may not behave
the same way on successive invocations.
If you drop the /usr/bin/env trick then
#!/usr/bin/r --vanilla
seems to
2012 Apr 13
4
#!/usr/bin/env Rscript --vanilla ??
I think that's my first true question (rather than answer)
to R-help.
As R has, for a long time, become my primary scripting and
programming language, I'm prefering at times to write Rscript
files instead of shell scripts, notably when R has nice ways to
do some of the things.
On a standard standalone platform with standard R,
I would start such a script with
2012 Sep 21
1
__FILE__ object in R
Hi -
I'm curious if there is a way to get access to the location of the calling
script within R. I found one way of accessing it from this thread,
https://stat.ethz.ch/pipermail/r-devel/2008-April/048914.html, which
recommends using either:
parent.frame(2)$ofile
Or
FILE <- (function() {
attr(body(sys.function()), "srcfile")
})()$filename
However, those suggestions only
2009 Nov 26
2
little "r" cannot find packages
Dear All
I want to use R, Rscript und r alternately under
one common configuration.
The problem is that \"r\" can't find the package \"Rmpi\"
and other packages whereas \"R\" has no problem to find.
$ R --vanilla < mpiHelloWorld.r
#!/usr/bin/env r
library(Rmpi) # calls MPI_Init
rk <- mpi.comm.rank(0)
sz <- mpi.comm.size(0)
name <-
2024 Aug 23
1
Linear regression and stand deviation at the Linux command line
? Thu, 22 Aug 2024 13:07:37 -0600
Keith Christian <keith1christian at gmail.com> ?????:
> I'm interested in R construct(s) to be entered at the command
> line that would output slope, y-intercept, and r-squared values read
> from a csv or other filename entered at the command line, and the same
> for standard deviation calculations, namely the standard deviation,
>
2008 Jan 09
1
Rscript on OSX
Hi,
I directed somebody to install R (2.6.1) on his OSX computer,
following instructions from http://cran.r-project.org/bin/macosx.
She can run R from the console.
But plot(1:10) doesn't produce any output or open a window (as I am
used to from linux).
More importantly:
Rscript is not in the path (minor problem ln -s is hopefully doable). I tried
to put a hardcoded path to Rscript into the
2009 Aug 14
1
Package-level access to Rp->R_Quiet ?
I would like to simulate the effect of the command-line option --quiet from
user-level scripts and startup code. From src/main/CommandLineArgs.c I learn
that Rp->R_Quiet is set, and I see how that is used in main/main.c.
I would use this from code in Rprofile.site. In other words, I want to be
silent when --quiet is used (as e.g. by littler or Rscript) but not by R
itself in normal
2011 Dec 12
1
littler: Use for batch processing of data sets: How to pass filename?
Dear R folks,
I have several data sets I want to process automatically using R. I
found littler [1] and thought this will do the trick.
1. Read in data file to a data frame using `scan()`.
2. Do linear regression.
3. Write the data and the coefficients back to a file.
#!/usr/bin/env r
if (is.null(argv) | length(argv)!=1) {
cat("Usage:
2012 Oct 18
1
good documentation on use of Rscript. where to find?
What is the correct format for the shebang line and what options are
allowed or necessary along with this?
I find plenty of blogs and opinions, but few authoritative answers.
I want an R script to run and update packages periodically, with a
cron job that launches it. What is necessary to put in
line one of the R program. Aside from the basic part
#!/usr/bin/Rscript
what else can there be, or
2009 Aug 05
1
exec subdirectory of a package
Hello,
WRE contains the following information about the "exec" subdirectory of
a package :
"Subdirectory exec could contain additional executables the package
needs, typically scripts for interpreters such as the shell, Perl, or
Tcl. This mechanism is currently used only by a very few packages, and
still experimental."
I think it would be useful to expand "very
2010 Apr 30
1
Trouble using Ecdf () from the Hmisc library
Hello:
[Kindly Cc when replying]
The question in a nutshell is this: Is there a more robust alternative
to Ecdf ()?
The details:
I've used Ecdf () _a lot_ over the past few years and I have learned
to live with its warnings. But I am running short on time and patience
now [*] Here is a reproducible example:
> library (Hmisc)
> x <- read.csv ( file =
2008 Jan 05
1
Rscript argument processing minor bug with -g
I think there's a minor bug in the argument-processing carried out by Rscript.
The effect is that if one passes "-g" as a flag to the script, it is erroneously
exposed to the main executable's argument processing and therefore generates a
message about not being able to comply with the request for a particular GUI.
Uppercase G is fine as are the other 25 letters in upper or
2010 Jan 30
2
Stop packages and datasets to be loaded on startup.
Hi.
I would like to know how to start an embedded R session, and avoid
datasets and the standard library packages to be loaded on startup.
I've been looking at littler's code (so this is partly a question to
Dirk Eddelbuettel...):
> /* We don't require() default packages upon startup; rather, we
> * set up delayedAssign's instead. see autoloads().
>
2017 Dec 03
1
Rcpp, dyn.load and C++ problems
On 3 December 2017 at 11:08, Peter Langfelder wrote:
| I would go to the source, in this case Dirk Eddelbuettel's (I hope I
| spelled it correctly)
You did. Take a point :)
| documentation for Rcpp:
|
| http://dirk.eddelbuettel.com/code/rcpp/Rcpp-attributes.pdf
Yup. And
RShowDoc("Rcpp-attributes", package="Rcpp")
in R is even easier.
On 3 December 2017 at 13:19,
2007 Jan 26
1
Rscript on Windows
On UNIX one can use #! notation. It would be nice to be able to do something
similar on Windows.
This could be done by giving Rscript the capability of skipping over
the first few
lines. For example, there might be a --skip=n argument or perhaps Rscript would
skip over any consecutive leading lines that begin with @ in the R
file since that
cannot be syntactically correct R but does have
2007 Aug 27
1
R 2.5.1 - Rscript through tee
Hi, people.
I met a little problem for which someone might have a solution. Let's
say I have an executable file (named "pp.R") with this contents:
#!/usr/bin/Rscript
options(echo=TRUE)
a <- 1
Sys.sleep(3)
a <- 2
If I execute "./pp.R" at the shell prompt, the output shows the timely
progress of the script as expected. If I use "./pp.R | tee