Displaying 20 results from an estimated 4000 matches similar to: "Summary of Forcing variables types when using read.table"
2003 Apr 07
1
filtering ts with arima
Hi,
I have the following code from Splus that I'd like to migrate to R. So far,
the only problem is the arima.filt function. This function allows me to
filter an existing time-series through a previously estimated arima model,
and obtain the residuals for further use. Here's the Splus code:
# x is the estimation time series, new.infl is a timeseries that contains
new information
# a.mle
2000 Oct 24
1
R_eval in tcltk library
Is there a method with the current tcltk library in R to call back an R
function within the .Tcl("...") interpreter?
I can't find anything documented, and I don't understand the usefulness of
the .Tcl.callback() function. Browsing through the tcltk source code I found
two functions R_eval and R_call that seem to take input from the .Tcl
interpreter and parse them through the R
2001 Jul 09
1
problem loading saved image
I had an open session working in R and I regularly save the image with
save.image(). However, after a period of inactivity of a few days. I quit
the session. Now, when I try to restart R and load the same image I get the
following result:
> load("y:/grm/sdata/.rdata1")
Error in load("y:/grm/sdata/.rdata1") : an xdr real data read error occured
Can someone explain the cause
2002 Aug 23
1
R_NilValue blows up on Windows
Ok, Here's the c code that's loaded into R as dll on windows:
#include <R.h>
#include <Rdefines.h>
SEXP test1(SEXP col);
SEXP test1(SEXP col)
{
SEXP col2;
Rprintf("no value!\n");
return col2;
}
Compiles ok with bcc32 into a dll, loads into R as part of a library, I
Run library(rkdb), then
> .Call("test1", 2)
no value!
And puf! Rterm crashes.
2002 Apr 08
2
subsetting with NA's
Hi,
I often have large dataframes with many variables and many NA's, from which I
would like to subset out some rows. Here is a toy example:
> x <- data.frame(a = c("x", "y", "z"), b = c(1, NA, 5))
> x
a b
1 x 1
2 y NA
3 z 5
I realize that, if I know the values in x$b that I want to subset, things are easy:
> x[x$b %in% c(1),]
a b
1 x 1
2001 Nov 29
3
package argument to library as string
The help page for library says that:
package, help: name or character string giving the name of a package.
Yet, I don't seem to be able to use a string variable here.
> version
_
platform sparc-sun-solaris2.6
arch sparc
os solaris2.6
system sparc, solaris2.6
status
major 1
2001 Aug 31
1
--quiet flag sets echo option to TRUE (PR#1083)
The help for options says:
echo: logical. Only used in non-interactive mode, when it controls
whether input is echoed. Command-line options `--quiet' and
`--slave' set this initially to `FALSE'.
I don't think that this is correct for me.
Consider the following session:
mica|junk> ls
test.R
mica|junk> cat test.R
cat("Why was this command
2002 May 10
1
Summary of Suggestions for poor man's parallel processing
Thanks to Luke Tierney, Agustin Lobo, Stephen Eglen, A.J. Rossini, Simon Wood
and Timothy H. Keitt for responding to my question about poor man's parallel
processing. Much of the substantive material was cc'ed to r-help already, but
my take is as follows.
1) Currently, there is nothing "simple" for solving my problem.
2) I thought that Timothy Keitt's description of the use
2002 Apr 30
3
rbind'ing empty rows in dataframes in 1.4.1 versus 1.5.0
Hi,
In 1.4.1, I was able to create extra "empty" rows in a dataframe as so:
> x <- data.frame(a = letters[1:3], b = 1:3)
> x
a b
1 a 1
2 b 2
3 c 3
> x[4,]
a b
NA NA NA
> rbind(x, x[4,])
a b
1 a 1
2 b 2
3 c 3
NA NA NA
> R.version
_
platform sparc-sun-solaris2.6
arch sparc
os solaris2.6
2001 Oct 04
1
Bug when trying to save a character vector with an embedded / (PR#1115)
Here is an example involving "VIA\B".
> version
_
platform sparc-sun-solaris2.6
arch sparc
os solaris2.6
system sparc, solaris2.6
status
major 1
minor 3.0
year 2001
month 06
day 22
language
2001 Oct 04
1
Strange behavior with saved character vectors containing a slash
I am seeing some strange behavior using save on a character vector containing a
slash. If this is a bug, I will happily submit it (as a single entry! ;-) ) to
r-bugs. Here is an example involving "VIA\B".
> version
_
platform sparc-sun-solaris2.6
arch sparc
os solaris2.6
system sparc, solaris2.6
status
2002 May 20
1
(PR#1577) is.na<- coerces character vectors to be factors
The inconsistency is that you use $<- to set the column, then [[<- to
change it. Had you tried to set the column by
x[[1]] <- as.character(x[[1]])
you would have seen the problem immediately (it does not work as you would
have intended). If you want to be sure to turn off conversion to factor,
you need to set the column to class "AsIs". My belief is that
will behave
2002 May 21
1
I() fails on objects of class POSIXct (PR#1587)
Although the documentation is somewhat sketchy, I() can be used to create
objects of class AsIs:
> I("a")
[1] "a"
attr(,"class")
[1] "AsIs" "character"
> I(4)
[1] 4
attr(,"class")
[1] "AsIs" "numeric"
> I(4 + 0i)
[1] 4+0i
attr(,"class")
[1] "AsIs" "complex"
>
This
2002 Jan 15
2
1.4.1 release date
Has the likely release date for R 1.4.1 been set? Apologies if there is some
obvious place on the web site that I could have looked this up at. We are eager
to upgrade to 1.4, but some of the bugs matter to us. We have played around
with the patched code, but have mainly succeeded in demonstrating that we need
to learn more about UNIX code development . . .
Thanks to all for a most excellent
2001 Oct 04
1
Problems merging with POSIXct objects and all = TRUE
I am having problems using merge with all = TRUE when one of the dataframes has
objects of class POSIXct. If this is a bug, let me know and I will report it to
r-bugs. Here is an example:
> version
_
platform sparc-sun-solaris2.6
arch sparc
os solaris2.6
system sparc, solaris2.6
status
major 1
2001 Jul 10
2
watch out for quotes in data files
I have just spent a day trying to determine why I seemed to be unable
to read a file of microarray expression results into R properly. The
file was produced by the Dchip software developed by Li and Wong at
Harvard's Department of Biostatistics. It contains rows of
tab-delimited fields in the order
Probe set identifier
Probe set description
Array 1 expression
Array 1 call
Array 2 expression
2002 Oct 05
4
Implementation of S-Plus "nlmib" routine in R
Where can I find a package with an R implementation of the S-Plus
"nlmib" general
minimzation routine described in
Venables & Ripley's "Modern Applie Statistics with S-Plus", 3rd Ed., pp
267 - 270?
Thanks,
David Stamps
stamps.d.a at att.net
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2002 May 14
0
FW: Summary of Suggestions for poor man's parallel processing
It turns out that my web host doesn't allow direct links. Try going to
http://www.warnes.net/downloads or getting it from the sourceforge snippet
library https://sourceforge.net/snippet/detail.php?type=snippet&id=101149.
-Greg
> -----Original Message-----
> From: Warnes, Gregory R [mailto:gregory_r_warnes at groton.pfizer.com]
> Sent: Monday, May 13, 2002 10:15 AM
> To:
2002 Jul 10
1
bug in all.equal.character (PR#1767)
There is a bug in all.equal.character:
> all.equal.character(c("A", "B", "C"), c("A", "B", "C"))
[1] TRUE
> all.equal.character(c("A", "B", "C"), c("A", "B", NA))
Error in sum(out) : Object "out" not found
> traceback()
3: sum(out)
2: paste("`is.NA' value
2002 May 29
1
merge.data.frame can coerce character vectors to factor in some circumstances (PR#1608)
If the following two conditions are met:
1) all.x is TRUE
2) at least 1 row in y does not have a match in x
then any character vectors in y will be coerced to be factors. Here is a simple
example (previously provided on r-devel):
> x <- data.frame(a = 1:4)
> y <- data.frame(b = LETTERS[1:3])
> y$b <- as.character(y$b)
> z <- merge(x, y, by = 0, all.x = TRUE)
> z