Displaying 20 results from an estimated 20000 matches similar to: "R-alpha: compatibility functions"
1998 Aug 31
0
isolating R/S and operating system differences
Below is a revised version of my kernel of functions for isolating R/S and
operating system differences. The main change is "date" which I've renamed
"date.parsed" to avoid conflicts with the R and S date functions. The R call now
uses system() rather than unix() to avoid warning messages in R 0.62.3.
Paul Gilbert
1997 Aug 25
0
R-alpha: Re: missing' BB functions
Kurt
The function tempfile is available based on some C code from Friedrich
Leisch. The function unlink is fairly simple in unix but I haven't
experimented elsewhere. In this regard, I have put together a small
kernel set of functions to try to handle cross platform and R vs S
issues. This is appended below and I would certainly appreciate
feedback. The purpose of this kernel is so that I can
1999 May 05
1
RNG R/Splus compatibility
Starting with example Wichmann-Hill code from Brian Ripley I have been playing
with a set of programs for getting the same random sequences from R and Splus. A
copy is included below along with a test (which works in Solaris with R and
Splus 3.3).
The approach is somewhat different from the usual problems on this list as I am
trying to get the same results from Splus as I get from R. However,
1997 Sep 13
1
R-alpha: compatibility
Two compatibility issues found while trying to convert a simulation from S
to R.
1. set.seed() We don't have this function. According to Venables &
Ripley it just picks a seed from a list of 1000 possibilities. How about
"set.seed" <-function (i)
{
if (any(i > 1000) | any(i < 1))
stop("argument to set.seed() must be in 1:1000")
1997 Jul 25
0
R-alpha: Treatment of seed
There is a difference between R and S (or S-Plus, I'm not sure about
that) concerning the generation of random numbers.
If an error occurs during the execution of a function, the seed is
restored to its old value in S-Plus, but not in R. This feature of S-Plus
has just turned out to be very useful for me because I got an error
message during a small simulation for a certain choice of
2000 Dec 20
1
syskern fails Rcmd check on Windows, gives incorrect information (PR#781)
syskern (`Functions for writing code that is OS and R/S independent', an
amazing description given the reality) fails Rcmd check on Windows, and
also gives incorrect information where it does work.
There are already correct OS-independent functions for these purposes in
R. It appears not to be needed to run the other three packages in the dse
bundle, but to be the only R package that
1997 Sep 15
0
R-alpha: set.seed(.) [was 'compatibility']
>>>>> Thomas Lumley writes:
>> Two compatibility issues found while trying to convert a simulation
>> from S to R.
>> 1. set.seed() We don't have this function. According to Venables &
>> Ripley it just picks a seed from a list of 1000 possibilities. How about
>>
>> "set.seed" <-function (i)
2000 Jun 21
3
OS calls
I've just been reviewing some functions in my syskern library. This library was
set up originally to provide me with a way to program around small R/S
differences and to encapsulate some operating system requests in one place, so
that these problems would not be spread throughout my code. Over the years the
need for many of the programs in this library has disappeared.
I have always worked
1997 Nov 24
0
R-alpha: random number generator -- S-plus's
--Multipart_Mon_Nov_24_14:51:09_1997-1
Content-Type: text/plain; charset=US-ASCII
>>>>> "PaulG" == Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:
MM> The code is basically in V&R 1 and 2; V&R2 on p.167. I have it as a
MM> C function that I used to dyn.load into S-plus in order
MM> to prove that S-plus was using it.
1997 May 16
0
R-alpha: A Quick Way to Kill S ...
Start S and detach the directory at position 2.
S-PLUS : Copyright (c) 1988, 1996 MathSoft, Inc.
S : Copyright AT&T.
Version 3.4 Release 1 for Sun SPARC, SunOS 4.1.3_U1 : 1996
Working data will be in /users/rdev/ihaka/.Data
> search()
[1] "/users/rdev/ihaka/.Data"
[2] "/usr/local/pkg/splus/splus-3.4/splus/.Functions"
[3]
1999 Aug 03
3
RW 0.64.2 substring() string truncation?
Hi,
(First, apology for my earlier incorrectly addressed "subscribe"
post.)
Can somebody tell me what exactly is going on below. Basically, I am
running into some kind of "string truncation" problem when I try
to get a substring starting past the 8192nd character (see sample
session below). There doesn't appear to be any problem creating the
string, and nchar()
2006 Apr 21
0
how to do Splus compare() function in R [Broadcast]
You need to tell us what compare() in S-PLUS does; i.e., what does it take
as input and what does it output. Presumably the information would be in
the help page for compare().
Telling us what the function looks like in S-PLUS is of no use, since most
likely the code cannot be used in R without violating S-PLUS copyright
and/or license. Even if that wasn't an obstacle, the fact that it
2004 Jun 29
1
RE: [S] Different behaviour of unique(), R vs. Splus.
The source of the incompatibility:
In S-PLUS 6.2:
> methods("unique")
splus splus menu splus
"unique.data.frame" "unique.default" "unique.name" "unique.rowcol.names"
In R-1.9.1:
> methods("unique")
[1] unique.array unique.data.frame unique.default unique.matrix
2001 Feb 21
1
glm predict problem with type = "response"
The standard errors produced by predict.glm with type = "response" seem
wrong. Here is an example using R 1.2 windows version along with the same
problem in Splus. The standard errors for type = "link" are the same in
both systems.
R1.2> set.seed(10)
R1.2> ytest <- 100*.95^(0:9) + rnorm(10,sd = 5)
R1.2> ytest
[1] 103.96964 97.60590 88.43220 85.90504
1999 Aug 30
1
rexp and rweibull
In splus rexp() and rweibull() are related:
> set.seed(153)
> rexp(1)
[1] 0.0493267
> set.seed(153)
> rweibull(1, shape=1)
[1] 0.0493267
(you can also try shape =2, then rweibull = sqrt(rexp) )
However, in rw0.64.1 (on Win NT) they are different
> .Random.seed <- 1:4
> rexp(1)
[1] 1.412030
> .Random.seed <- 1:4
> rweibull(1, shape=1)
[1] 2.054032
May be rweibull
2004 Jun 29
2
Different behaviour of unique(), R vs. Splus.
Apologies for the cross-posting, but I thought this snippet of info
might be vaguely interesting to both lists.
I did a ***brief*** search to see if this issue had previously been
discussed and found nothing. So I thought I'd tell the list about a
difference in behaviour between unique() in R and unique() in Splus
which bit me just now.
I was trying to convert a package from Splus to R and
2006 Apr 27
1
? bug in 'sample' (PR#8813)
I have found that specifying different "sizes" in the sample command has
a funny effect on the random sampling. The code below is a condensed
version of a function I wrote to simulate a bootstrap method. For
simplicity, I eliminated the internal bootstrap loop, but kept a
statement to draw one bootstrap sample, because this is where the
problem occurs. The output (mean(y)^2) should be
2007 Feb 08
1
Suggestion about "R equivalent of Splus peaks() function"
In 2004 there was this R-Help posting from Jan 2004:
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/33097.html
R equivalent of Splus peaks() function?
The peaks function there has worked well for me on a couple of projects, but
some code using "peaks" failed today, which had worked fine in the past.
I was looking for a peak in a test case that was a sine curve over one
2011 Aug 03
2
convert a splus randomforest object to R
Hi,
I have a randomforest object "cost.rf" that was created in splus 8.0,
now I need to use this trained RF model in R. So in Splus, I dump the RF
file as below
data.dump("cost.rf", file="cost.rf.txt", oldStyle=T)
then in R, restore the dumped file,
library(foreign)
data.restore("cost.rf.txt")
it works fine and able to restore the
2008 May 20
1
String buffer
Hello,
I have an expression "a" in R that has about 2300 characters and I want to
convert it to a string using toString or as.character. The problem is I am
only getting the first 500 or so characters when I convert it to string. I
tried to use substring in order to convert one bunch at a time, but when I
type substring(a, 498, 1000) I get only 2 characters, meaning it seems there
is a