Displaying 20 results from an estimated 10000 matches similar to: "R-beta: ?faq example of scoping"
1998 Jun 26
2
scoping
Can Luke Tierney's recent S-new post on scoping be included in the R FAQ?
I'm just going through my package and eliminating a few instances of "eval" as I
hadn't realized the dangers. I noticed that one way I've used eval is for
prompting, as in
n <- eval(parse(prompt="Enter the number of singular values to use: "))
I presume this is not too dangerous, but
2007 Oct 24
3
scoping problem
I would like to write a function that computes Tukey's 1 df for
nonadditivity. Here is a simplified version of the function I'd like to
write: (m is an object created by lm):
tukey.test <- function(m) {
m1 <- update(m, ~.+I(predict(m)^2))
summary(m1)$coef
}
The t-test for the added variable is Tukey's test. This won't work:
data(BOD)
m1 <- lm(demand~Time,BOD)
2001 Oct 02
1
RE: problem with while loop with next
Prof. Tierney,
Thanks very much for the info.
Why does the loop work if I move the assignment out of the condition? E.g.,
the following works:
i <- 0
while(i < 5) {
i <- i + 1
if(i < 3) next
print(i)
}
Regards,
Andy
> -----Original Message-----
> From: Luke Tierney [mailto:luke at nokomis.stat.umn.edu]
> Sent: Tuesday, October 02, 2001 3:36 PM
> To: Liaw, Andy
2001 Feb 03
1
callback environment for Tk buttons
Hi. I'm running into problems with using R functions as callback
commands for buttons in Tk.
The following Tcl/Tk script creates three buttons. If you press hello
it prints hello world. If you press HALLO it prints HALLO WORLD.
Not exciting, but I need an example...
set tt [toplevel .tt]
foreach i {"hello" "HALLO"} {
pack [button $tt.b$i -text $i
1997 Jun 09
1
R-beta: compiling R under HP-UX
Hi,
I've trouble compiling R-0.49 (with both patches applied) on a
HP-UX sim B.10.20 A 9000/819 machine:
ranlib ../lib/libappl.a
cd regex; make
c89 -Ae -g -I../include -DPOSIX_MISTAKE -c regcomp.c
cc: warning 422: Unknown option "-Ae" ignored.
cc: "../include/regex.h", line 50: error 1000: Unexpected symbol: "regoff_t".
cc:
1997 May 09
2
R-alpha: R-0.49 / S-plus: "default argument evaluation" bugs and woes
There is a problem with 'default argument evaluation'
when I use an existing function name as argument name :
sintest <- function(x, y = 2, sin= sin(pi/4))
{
## Purpose: Test of "default argument evaluation"
## -------- Fails for R-0.49. Martin Maechler, Date: 9 May 97.
c(x=x, y=y, sin=sin)
}
## R-0.49:
R> sintest(1)
##> Error in sintest(1) : recursive
2001 Apr 11
1
a couple of ideas/proposals
Byron Ellis has been making some progress on a hdf5 library for
microarray data (and any other thing you want to put in there).
In doing so some issues have arisen that are of more general
interest.
1) hdf5 supports annotation (through comments) so it would be nice
if the comment function in R became generic. I think this is
backward compatible and basically not really an issue of any
2001 Jul 10
1
Object finalization
I see some code in R to attach finalizers to external pointer references
(Register[C]Finalizer). Anyone have an example of how to code the
finalizer? R_RegisterCFinalizer accepts a C function, but I can't see
how to get it to operate on the pointer, since the pointer is not passed
to the function when its called. RegisterFinalizer takes an R closure,
but how is it called from R (tried
2002 Aug 25
1
library(file) segfaults on solaris (PR#1942)
luke's demonstration of external references, at
www.stat.umn.edu/~luke/file_0.0-0.tar.gz
(accessible through the developer page) causes
a segfault on solaris 2.8 as soon as library(file)
is attempted. it runs fine on RH 7.2. the segfault
on solaris occured for R 1.5.1 and 1.6 (8-25 image)
a quick poke at gdb (which i can only get running
for R 1.6, though this bug report is for 1.5.1)
1997 May 22
2
R-alpha: options(..) vs. .Options // Re(1i) = 2.4976e-307
The .Options
vector had been introduced a while ago after my suggestion
(see Ross's E-mail below).
.Options$digits is used be default in several print methods (eg print.lm),
however, deparse(.) e.g., uses options()$width, and not .Options$width.
Another problem is that .Options
is still not in the documentation (on-line help).
Before one could add it there, we'd need ``the
2002 Jan 24
2
R-gnome: no way to configure
Hi!
I've been able to configure and make R (1,4,0 linux)
except for the gnome support. I've checked all packages and libs mentioned
in R-admin.pdf (and by Luke Tierny) to make sure that I have them and even
using the following:
./configure --with-gnome --with-gnome-includes=/opt/gnome/include
--with-gnome-libs=/opt/gnome/lib --with-libglade-config=opt/gnome/lib
I still get:
R is now
1997 May 20
1
R-alpha: S_alloc
Does anyone know what exactly S_alloc() does? (Yes, it's porting time
again ...)
Thanks,
-k
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To:
2001 Nov 01
1
migration to common runtime?
I'm curious if any of the core R developers have considered the
possibility of hosting R (v2?) on the parrot common runtime environment.
Perl6 will generate byte-code for parrot, as will some future version of
python. I can imagine both drawbacks and advantages. Some advantages
would be fast byte-code execution and freely mixing perl, python and R
modules. Anyone looked into this?
Tim
2002 Apr 27
1
Question about .Call
Can a C function wrapped with .Call return void? Or must it return a
valid SEXP? Thnx.
Tim
--
Timothy H. Keitt
Department of Ecology and Evolution
State University of New York at Stony Brook
Stony Brook, New York 11794 USA
Phone: 631-632-1101, FAX: 631-632-7626
http://life.bio.sunysb.edu/ee/keitt/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing
2001 Oct 09
1
64 bit / v9 build on Sparc Solaris 8
By my reading, R has a hard limit on INT_MAX bytes for vector
allocations. On the sparcv9 architecture, INT_MAX is a 32 bit
quantity, even though pointers can be 64 bits. Has any thought been
given to use of > 2GB of virtual memory on systems like this?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
1997 May 29
2
R-beta: WISH: For dyn.load()ing, I'd like is.loaded(.) , symbol.C, symbol.For
In S(plus), I can write functions using code fragments like
if(!is.loaded(symbol.C("my_C_fun")))
dyn.load("......../my_C_fun.o")
r <- .C("my_C_fun",
x = x,
n = n,
...
)
which I would like to have in R, too.
The S-plus help page on this subject says :
S+>> Code Availability
S+>>
S+>> DESCRIPTION:
S+>> is.loaded
2002 Apr 14
1
Suggestion for implementation
I wonder if it was possible (and desireable) to implement means to
protect data objects (and functions) from overwriting them. So for
instance:
> x <- 5
> protect(x)
> x <- 8
Error: x is read only
Or would that be against the philosophy of R to be compatible to S?!
Just a RFC ;-)
Yours,
Christoph.
ps. Your probably know the situations that let you think of such a
feature
2002 Jan 23
1
R on Tru64 5.1
Hi,
R-1.4.0 on ES40 under OSF 5.1.
I use gcc version 3.0.3
During gnu make I have the message :
dumping R code in package `methods'
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared
library"/usr/local/R1.4.0/library/methods/libs/methods.so":
dlopen: /usr/local/R-1.4.0/library/ctest/libs/ctest.so: symbol "dansari"
unresolved
Execution
1998 Feb 03
3
netcdf
Has anyone experimented with the Network Common Data Format (netcdf)
described at
http://www.unidata.ucar.edu/packages/netcdf
for archiving data?
Is this format widely used outside of atmospheric research?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info",
2001 Jul 20
1
loading .RData on distributed system
Hi, all.
I'm running R on a beowulf system, with software that can take a list of
single-processor jobs and parcel them out over the system. (In case it's
of interest, they're dual pentium 866 machines connected by fast
ethernet.) The administrators of the system found that I was causing a
huge load on the file server, and when they investigated it turned out
that each process was