Displaying 20 results from an estimated 3000 matches similar to: "as.matrix.data.frame() modifies content of character columns (PR#386)"
1999 Dec 21
3
BUG in format()? (PR#383)
In RW0.651 and RW0.901,
I discovered some unexpected behaviour when I used as.matrix.data.frame()
> matrix('"', 2, 2)
[,1] [,2]
[1,] "\"" "\""
[2,] "\"" "\""
> unclass(as.data.frame(matrix('"', 2, 2)))
$V1
[1] "\"" "\""
$V2
[1] "\"" "\""
2000 Jan 04
0
format.char() speedup
Happy new Year!
Here is a slightly changed version of format.char(), which really speeds up
for big data.
Regards
Jens Oehlschlägel-Akiyoshi
format.char.old <- format.char
format.char <-
function (x, width = NULL, flag = "-")
{
if (is.null(x))
return("")
if (!is.character(x)) {
warning("format.char: coercing 'x' to
2000 Jan 12
0
inconsistencies between formatC(), format() and format.char()
Dear R-Developers,
Just a note: there are some inconsistencies between formatC(), format() and
format.char() and cross calling between these functions.
On the one hand
> cat(format('{"}'), "\n")
{\"}
> cat(format.char('{"}'), "\n")
{\"}
is by default format.char(, flag="-") and thus by default calling format()
>
2003 Aug 20
0
SJava in R
Hi,
Did anyone sucessfully install SJava package to R and was able to call R
function from java in redhat linux8.0? I tried several days it still give
me error either in libR.so or libjvm.so. for example, I can compile
JavaRCall.java(a example with the SJava package) without problem. When
I run it, it can connect to R and accomplish part of results, but fail for
other calls. The outputs are:
2007 Mar 13
3
inconsistent behaviour of add1 and drop1 with a weighted linear model
Dear R Help,
I have noticed some inconsistent behaviour of add1 and drop1 with a
weighted linear model, which affects the interpretation of the results.
I have these data to fit with a linear model, I want to weight them by
the relative size of the geographical areas they represent.
_________________________________________________________________________________________
> example
2000 Jan 04
0
formatC (bug and fix) (PR#394)
OK:
> formatC(as.double(c(1,0,NA)))
[1] "1" "0" "NA"
NOT OK:
> formatC(as.integer(c(1,0,NA)))
[1] "0" "1072693248" "NA"
> formatC(as.integer(c(0,1,NA)))
[1] "0" "0" "NA"
BUG TRACED TO R-code of formatC()
where
x[!Ok] <- 0
unintendedly changes the storage.mode of x to
2000 Jan 26
1
data.frame[1,1]<- differs from data.frame[[1]][1]<- (PR#403)
I observed the following difference:
> ddd <- data.frame(a=1:3, b=1:3)
# assignment of 'X' silently ignored
> ddd[1,1] <- 'X'
> is.factor(ddd[[1]])
[1] FALSE
> ddd
a b
1 1 1
2 2 2
3 3 3
# assignment of 'X' not ignored
> ddd[[1]][1] <- 'X'
> is.factor(ddd[[1]])
[1] TRUE
> ddd
a b
1 X 1
2 2 2
3 3 3
Regards
> version
1999 Dec 20
1
Manual: writing R Extensions (PR#380)
-- Happy holidays! --
Dear R Development Core Team,
I want to thank you *very much* for the new "Writing R Extensions" manual
published with RW0.901 and hope this is the right place to report some
possible typos.
page 17, example given in the middle of the page, I think it should read
REAL(version) = 3.0;
^^^^^^^
page 23, second example, I think the parameter definition
2000 Feb 11
1
new chron problems in RW0990
Dear all,
In RW0901 I could
> dates("01/01/2000")
[1] 01/01/100
where only the printing was wrong, but the double numeric representation of
the chron object was calculated correctly
but now in RW0990
> dates("01/01/2000")
Error in fun(yy, ...) : must be 2-digit (numeric) year specification
and also the followig doesn't help
> dates("01/01/2000",
2012 Nov 02
1
add1() alternative
Hi,
I'm trying to build a hierarchical logistic regression model with lme4
package, but I have a problem on selecting the variables to include in this
model.
In a simple logistic regression, using Forward selection, i use a likelihood
ratio test to check which variables i should include in the model, using the
function add1().
The problem is that this function doesn't work with the
2010 Mar 01
0
MASS::loglm - exploring a collection of models with add1, drop1
I'd like to fit and explore a collection of hierarchical loglinear
models that might
range from the independence model,
~ 1 + 2 + 3 + 4
to the saturated model,
~ 1 * 2 * 3 * 4
I can use add1 starting with a baseline model or drop1 starting with the
saturated model,
but I can't see how to get the model formulas or terms in each model as
a *list* that I can work with
further.
Consider
1999 Dec 23
1
data.frame(I(matrix)) ? (PR#388)
I observe dificulties with using data.frame(I(matrix))
> mat <- matrix(letters, 2, 2)
> dimnames(mat) <- list(c(1:2), c("x","y"))
> mat
x y
1 "a" "c"
2 "b" "d"
> dd <- data.frame(I(mat))
> ddd
I.mat..x I.mat..y
1 a a
2 b b
3 c c
doesn't look too bad,
but,
has
2008 Sep 30
2
weird behavior of drop1() for polr models (MASS)
I would like to do a SS type III analysis on a proportional odds logistic
regression model. I use drop1(), but dropterm() shows the same behaviour. It
works as expected for regular main effects models, however when the model
includes an interaction effect it seems to have problems with matching the
parameters to the predictor terms. An example:
library("MASS");
options(contrasts =
2000 Feb 11
1
astonishing memory phenomenon
I have a question concerning memory.
I understood that R takes a fixed amount of memory at startup (which I can
influence with --vsize --nsize) and that gc() shows the memory still free of
the total memory reserved for R.
However, if I create a long vector of character data, gc() only seem to
reflect the space needed for a vector of pointers to char, the space used
for the character data itself
2005 Aug 05
0
(PR#8049) add1.lm and add1.glm not handling weights and
David,
Thanks.
The reason add1.lm (and drop1.lm) do not support offsets is that lm did
not when they were written, and the person who added offsets to lm did not
change them. (I do wish they had not added an offset arg and just used the
formula as in S's glm.) That is easy to add.
For the other point, some care is needed if 'x' is supplied and the upper
scope reduces the number
2011 Jun 21
1
Stepwise Manova
Hello all,
I have a question on manova in R:
I'm using the function "manova()" from the stats package.
Is there anything like a stepwise (backward or forward) manova in R (like there is for regression and anova).
When I enter:
step(Model1, data=Mydata)
R returns the message:
Error in drop1.mlm(fit, scope$drop, scale = scale, trace = trace, k = k, :
no 'drop1'
2000 Mar 08
2
possible BUG with as.data.frame() and/or [.data.frame
Here is a possible BUG with as.data.frame() and/or [.data.frame which broke
Michael Lapsleys RODBC-Code.
Can anyone confirm it is a bug or a 'feature' of the prototype?
tablename <- "abc"
a <- as.data.frame(cbind("abc", 1:3))
b <- as.data.frame(cbind(tablename, 1:3))
# ok
> a
V1 V2
1 abc 1
2 abc 2
3 abc 3
# missing column name
> b
tablename
1
2000 Jan 12
3
functions for flat file import/export + utilities
Dear R-Developers,
please find attached a set of drafted functions for flat file import and
export, partially extending existing functions, partially completely written
as new code.
I thought you might be interested in those functions and the accompanying
utilities for padding and trimming.
Main features are
- supports several formats, i.e. fixed width and CSV (with one exception)
- supports
1999 Oct 04
1
SQL-Interface
Can anyone give advice how to interactively exchange data between R and
SQL-Databases like DB2, ORACLE, MS-SQL-Server ?
If the answer is: 'currently not', this would be information for me as well.
I will summarize to the list.
Best regards
--
Dr. Jens Oehlschl?gel-Akiyoshi
MD FACTORY GmbH
Bayerstrasse 21
80335 M?nchen
Tel.: 089 545 28-27
Fax.: 089 545 28-10
http://www.mdfactory.de
2009 Apr 20
4
automatic exploration of all possible loglinear models?
Is there a way to automate fitting and assessing loglinear models for
several nominal variables . . . something akin to step or drop1 or add1
for linear or logistic regression?
Thanks.
--Chris
--
Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
40 Arch Street, Johnson City, NY 13790
cryanatbinghamtondotedu
"If you want to build a ship, don't drum