A minor comment: in help(environment) the example starts with:
##-- all three give the same:
environment()
environment(environment)
.GlobalEnv
but the comment is not true. The second returns the "".
"R : Copyright 2006, The R Foundation for Statistical Computing
Version 2.3.0 alph
Is
the enter point Fortran "orderdata_" absent of the loading table.
a manual translation, and was the underscore there in the original (I
think it should be, but am just checking).
What do nm -g mpackage.so tell you is actually exported from the shared
object (here called 'mypackag
On 4/4/2006 4:33 AM, Henrik Bengtsson wrote:
> A minor comment: in help(environment) the example starts with:
>
> ##-- all three give the same:
> environment()
> environment(environment)
> .GlobalEnv
>
> but the comment is not true. The second returns the " namespace:base>".
>
> "
On 4 April 2006 at 07:12, Prof Brian Ripley wrote:
| Note that libR.so was itself linked against -lm, so should resolve its
| dependencies there. The front end has never been linked against -lm, nor
| do I see that anything should have changed for a long time in the
| front-end.
Thanks for con
http://wiki.r-project.org is quite recent and not widely advertised yet
because I want to finialize features and beta test them with a limited
number of enthousiast people *before* making more publicity about it.
It is dedicated to the kind of collaborative documentation that Victor
Anyakin is
Hi,
this relates to the question "How to set a former environment?" asked
yesterday. What is the best way to to return a function with a
minimal environment from a function? Here is a dummy example:
foo <- function(huge) {
scale <- mean(huge)
function(x) { scale * x }
}
fcn <- foo(1:10e5)
On Mon, 3 Apr 2006, Andrew Finley wrote:
> Hello,
>
> I'm passing a user defined function into my c code. Once this function
> is in my c code, I'd like to iteratively change the values associated
> with the parameters defined in the function's formal list then evaluate
> the function using these
On Tue, 4 Apr 2006, Henrik Bengtsson wrote:
> Hi,
>
> this relates to the question "How to set a former environment?" asked
> yesterday. What is the best way to to return a function with a
> minimal environment from a function? Here is a dummy example:
>
> foo <- function(huge) {
> scale <- mean
In R 2.3.0-to-be, I think you can do
foo <- function(huge) {
scale <- mean(huge)
g <- function(x) { scale * x }
environment(g) <- emptyenv()
g
}
-roger
Henrik Bengtsson wrote:
> Hi,
>
> this relates to the question "How to set a former environment?" asked
> yeste
Hi Thomas,
Thanks for the note. I'm not sure about a lot of things. Setting the
formal defaults then calling the function seem straight forward. I just
assumed it would be like setting list values, or the C equivalent of
calling formals(fn)<-list(a=1, b=3).
Following your suggestion, I can get
On Tue, 4 Apr 2006, Roger D. Peng wrote:
> In R 2.3.0-to-be, I think you can do
>
> foo <- function(huge) {
> scale <- mean(huge)
> g <- function(x) { scale * x }
> environment(g) <- emptyenv()
> g
> }
You can, but you really don't want to and you will get the same error.
On 4/4/06, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> On Tue, 4 Apr 2006, Henrik Bengtsson wrote:
>
> > Hi,
> >
> > this relates to the question "How to set a former environment?" asked
> > yesterday. What is the best way to to return a function with a
> > minimal environment from a function? Here
On 4/4/06, Henrik Bengtsson <[EMAIL PROTECTED]> wrote:
> On 4/4/06, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> > On Tue, 4 Apr 2006, Henrik Bengtsson wrote:
> >
> > > Hi,
> > >
> > > this relates to the question "How to set a former environment?" asked
> > > yesterday. What is the best way to to r
> "Roger" == Roger D Peng <[EMAIL PROTECTED]>
> on Tue, 04 Apr 2006 10:38:29 -0400 writes:
Roger> In R 2.3.0-to-be, I think you can do
Roger> foo <- function(huge) {
Roger> scale <- mean(huge)
Roger> g <- function(x) { scale * x }
Roger> environment(g) <- emptyenv(
Dear R Developers: This has come up repeatedly in the r-help mailing
list, most recently in a thread started by myself. The answers have
been changing over the years. Would it be possible and easy for R to
offer a global read-only option that gives the name of the currently
executing R script, i
On 4/4/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote:
> On Tue, 4 Apr 2006, Roger D. Peng wrote:
>
> > In R 2.3.0-to-be, I think you can do
> >
> > foo <- function(huge) {
> > scale <- mean(huge)
> > g <- function(x) { scale * x }
> > environment(g) <- emptyenv()
> > g
> >
On 4/4/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> On 4/4/06, Henrik Bengtsson <[EMAIL PROTECTED]> wrote:
> > On 4/4/06, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> > > On Tue, 4 Apr 2006, Henrik Bengtsson wrote:
> > >
> > > > Hi,
> > > >
> > > > this relates to the question "How to set a fo
ivo welch wrote:
> Dear R Developers: This has come up repeatedly in the r-help mailing
> list, most recently in a thread started by myself. The answers have
> been changing over the years. Would it be possible and easy for R to
> offer a global read-only option that gives the name of the curr
strsplit() is a convenient way to get a
list of items from a string when you
have a regular expression for what is not
an item. E.g.,
> strsplit("1.2, 34, 1.7e-2", split="[ ,] *")
[[1]]:
[1] "1.2""34" "1.7e-2"
However, sometimes is it more convenient to
give a pattern for the it
On 4/4/06, Henrik Bengtsson <[EMAIL PROTECTED]> wrote:
> On 4/4/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> > On 4/4/06, Henrik Bengtsson <[EMAIL PROTECTED]> wrote:
> > > On 4/4/06, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> > > > On Tue, 4 Apr 2006, Henrik Bengtsson wrote:
> > > >
> > > >
gsubfn in package gsubfn can do this. See the examples
in ?gsubfn
On 4/4/06, Bill Dunlap <[EMAIL PROTECTED]> wrote:
> strsplit() is a convenient way to get a
> list of items from a string when you
> have a regular expression for what is not
> an item. E.g.,
>
> > strsplit("1.2, 34, 1.7e-2", s
On Tue, 4 Apr 2006, Andrew Finley wrote:
> Hi Thomas,
>
> Thanks for the note. I'm not sure about a lot of things. Setting the
> formal defaults then calling the function seem straight forward. I just
> assumed it would be like setting list values, or the C equivalent of
> calling formals(fn)<-li
Your example is perfectly clear. I'll take your suggestion.
Thanks a lot for your time-
Andrew
On Tue, 2006-04-04 at 10:00 -0700, Thomas Lumley wrote:
> On Tue, 4 Apr 2006, Andrew Finley wrote:
>
> > Hi Thomas,
> >
> > Thanks for the note. I'm not sure about a lot of things. Setting the
> > forma
On Tue, 4 Apr 2006, Gabor Grothendieck wrote:
> gsubfn in package gsubfn can do this. See the examples
> in ?gsubfn
Thanks. gsubfn looks useful, but may be overkill
for this, and it isn't vectorized. To do what
strsplit(keep=T) would do I think you need to do something like:
> findMatches<
On 4/4/06, Bill Dunlap <[EMAIL PROTECTED]> wrote:
> On Tue, 4 Apr 2006, Gabor Grothendieck wrote:
>
> > gsubfn in package gsubfn can do this. See the examples
> > in ?gsubfn
>
> Thanks. gsubfn looks useful, but may be overkill
> for this, and it isn't vectorized. To do what
gsubfn is vectorized
On 3 April 2006 at 16:11, Dirk Eddelbuettel wrote:
| Trying to build a Debian snapshot of R-alpha based on last night's tarball,
| it fails with what looks like a missing -lm linking directive:
|
| [...]
| gcc -I. -I../../src/include -I../../src/include -DHAVE_CONFIG_H -fpic
-O2 -c Rmain
Full_Name: c fillekes
Version: Version 2.2.1 (2005-12-20 r36812)
OS: Gentoo Linux kernel 2.6.12
Submission from: (NULL) (129.116.71.233)
"Not Available" is of course not a numeric:
R
> is.numeric (NA)
[1] FALSE
But for some reason, all arithmetic operations on NA's are
in fact numeric, even
2006/4/4, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> Full_Name: c fillekes
> Version: Version 2.2.1 (2005-12-20 r36812)
> OS: Gentoo Linux kernel 2.6.12
> Submission from: (NULL) (129.116.71.233)
>
>
>
>
> "Not Available" is of course not a numeric:
> R
>
> > is.numeric (NA)
> [1] FALSE
In the h
On 4/4/2006 3:38 PM, [EMAIL PROTECTED] wrote:
> Full_Name: c fillekes
> Version: Version 2.2.1 (2005-12-20 r36812)
> OS: Gentoo Linux kernel 2.6.12
> Submission from: (NULL) (129.116.71.233)
>
>
>
>
> "Not Available" is of course not a numeric:
> R
>
>> is.numeric (NA)
> [1] FALSE
>
> But f
On Tue, 4 Apr 2006, Antonio, Fabio Di Narzo wrote:
> So in
> NA+NA
> the logical is automatically coerced to a numerical value, and
> is.numericreturns TRUE, as expected.
>
> But for some reason, all arithmetic operations on NA's are
>> in fact numeric, even if it's with other NA's.
>>
All arithm
So this is perfectly consistent then:
> A <- NA
> B <- NA+NA
> B
[1] NA
> A
[1] NA
> is.numeric (A)
[1] FALSE
> is.numeric (B)
[1] TRUE
>
And the test based on value rather than type would be:
> !is.na(A)
[1] FALSE
> !is.na(B)
[1] FALSE
On 4/4/06, Antonio, Fabio Di Narzo <[EMAIL PROTECTED]>
On 4/4/2006 6:38 PM, cheryl fillekes wrote:
> So this is perfectly consistent then:
>
>> A <- NA
>> B <- NA+NA
>> B
> [1] NA
>> A
> [1] NA
A and B both print as NA, but they are stored differently. A is
logical, B is numeric. You'll also see this in the following tests:
> identical(A, A)
[1
32 matches
Mail list logo