Displaying 20 results from an estimated 3000 matches similar to: "Error with get_all_vars()"
2017 Mar 26
1
Documentation of model.frame() and get_all_vars()
Hi everyone,
This is about documentation for the model.frame() page. The
get_all_vars() function (added in R 2.5.0) is a great addition, but
the behavior of its '...' argument is different from that of
model.frame() with which it is documented and this creates ambiguity.
The current docs read:
\item{\dots}{further arguments such as \code{data}, \code{na.action},
\code{subset}. Any
2009 Mar 25
1
get_all_vars fails with matrices (PR#13624)
Hi,
According to the help file for model.frame/get_all_vars, the following should
produce the same output from both functions, but it doesn't...
> dat <- list(X=matrix(1:15,5,3),z=26:30)
> model.frame(~z+X,dat)
z X.1 X.2 X.3
1 26 1 6 11
2 27 2 7 12
3 28 3 8 13
4 29 4 9 14
5 30 5 10 15
> get_all_vars(~z+X,dat)
[1] z X <NA> <NA>
<0
2019 Nov 18
2
Inappropriate class(o)[!inherits(o,"AsIs")] in get_all_vars
>>>>> Martin Maechler
>>>>> on Mon, 18 Nov 2019 12:15:38 +0100 writes:
>>>>> suharto anggono--- via R-devel
>>>>> on Sun, 17 Nov 2019 10:34:31 +0000 writes:
>> SVN revision 77401 changes
>> x[isM] <- lapply(x[isM], function(o) `class<-`(o, class(o)[class(o) != "AsIs"]))
>> to
2019 Nov 17
2
Inappropriate class(o)[!inherits(o,"AsIs")] in get_all_vars
SVN?revision?77401?changes
????????x[isM]?<-?lapply(x[isM],?function(o)?`class<-`(o,?class(o)[class(o)?!=?"AsIs"]))
to
????????x[isM]?<-?lapply(x[isM],?function(o)?`class<-`(o,?class(o)[!inherits(o,"AsIs")]))
in?function?'get_all_vars'?in?src/library/stats/R/models.R?in?R?devel.
The?change?is?inappropriate.
2007 Jan 19
1
Where can I get the latex format manual?
In www.r-project.org I can find html and pdf format, and the
R-x.x-x/doc/manual has texinfo format only.
I can not find latex format manual. Am I miss something? Thanks for your hints.
--
Ronggui Huang
Department of Sociology
Fudan University, Shanghai, China
??????
????????????????
2017 Mar 30
0
get_all_vars() does not handle rhs matrices in formulae
Hello again,
It appears that get_all_vars() incorrectly handles model formulae that
use a right-hand side (rhs) matrix. For example, consider these two
substantively identical models:
# model using named variables
mpg <- mtcars$mpg
wt <- mtcars$wt
hp <- mtcars$hp
m1 <- lm(mpg ~ wt + hp)
# model using matrix
y <- mtcars$mpg
x <- cbind(mtcars$wt, mtcars$hp)
m2 <- lm(y ~ x)
2006 Nov 23
2
writing character to a file in UTF-8
Dear lister,
I would like to now if there a universal way to writing a character
vector to a file in UTF-8 encoding? By " universal", I mean a way
which works under Linux, Windows and Mac.
Thanks in advance!
--
Ronggui Huang
Department of Sociology
Fudan University, Shanghai, China
2008 May 14
2
basename/dirname produce incorrect results
The incorrect result incurs when the file path contains Chinese character.
It seems that dirname/basename action on unit of byte instead of char, so
the result in the following example is half of what is expected.
> g<-"d:\\$BG!2L4^M-CfJ8(B\\$BG!2L4^M-CfJ8(B.txt"
> dirname(g)
[1] "d:/$BG!2L4^(B"
> basename(g)
[1] "$BG!2L4^M-(B"
--
HUANG Ronggui,
2007 May 19
2
What's wrong with my code ?
I try to code the ULS factor analysis descrbied in
ftp://ftp.spss.com/pub/spss/statistics/spss/algorithms/ factor.pdf
# see PP5-6
factanal.fit.uls <- function(cmat, factors, start=NULL, lower = 0.005,
control = NULL, ...)
{
FAfn <- function(Psi, S, q)
{
Sstar <- S - diag(Psi)
E <- eigen(Sstar, symmetric = TRUE, only.values = TRUE)
e <- E$values[-(1:q)]
e <-
2007 May 27
2
Question about "evalq"
The help page of eval says: The 'evalq' form is equivalent to
'eval(quote(expr), ...)'. But the following is not equivalent. Can
anyone give me some explaination? Thanks very much.
> f1 <- function(x,digits=5) lapply(x, f2)
> f2 <- function(x) eval(quote(print(x+1,digits=digits)),list(x=x),parent.frame(2))
> f1(list(x1=1))
[1] 2
$x1
[1] 2
>
> f1 <-
2005 Jun 20
1
error when installing Matrix
> version
_
platform i386-pc-linux-gnu
arch i386
os linux-gnu
system i386, linux-gnu
status
major 2
minor 1.0
year 2005
month 04
day 18
language R
OS:debian linux
# R CMD INSTALL /home/ronggui/Matrix_0.96-3.tar.gz
.........
s-3 -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -lblas-3
collect2: ld returned 1 exit status
make: *** [Matrix.so] Error 1
2019 Nov 29
0
Inappropriate class(o)[!inherits(o,"AsIs")] in get_all_vars
class(o)[!inherits(o,"AsIs")] is still in function 'get_all_vars' in R patched (in https://svn.r-project.org/R/branches/R-3-6-branch/src/library/stats/R/models.R). It was ported to R patched by r77402. On Monday, 18 November 2019, 8:12:10 PM GMT+7, Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>>>>> Martin Maechler
>>>>>? ?
2007 Jun 15
2
method of rpart when response variable is binary?
Dear all,
I would like to model the relationship between y and x. y is binary
variable, and x is a count variable which may be possion-distribution.
I think it is better to divide x into intervals and change it to a
factor before calling glm(y~x,data=dat,family=binomail).
I try to use rpart. As y is binary, I use "class" method and get the
following result.
>
2007 Mar 12
1
Problem with installation of littler-0.0.10. under Free BSD 6.2
MyBSD% ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking build system type... i386-unknown-freebsd6.2
checking host system type... i386-unknown-freebsd6.2
checking for a BSD-compatible install...
2007 Dec 27
2
Problem of lmer under FreeBSD
I encounter such problem with lmer under FreeBSD, but not under
Windows. Anyone knows why? Thanks.
> example(lmer)
lmer> (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
Error in UseMethod("as.logical") : no applicable method for "as.logical"
> traceback()
9: as.logical(EMverbose)
8: as.logical(EMverbose)
7: lmerControl()
6:
2005 Nov 27
2
multilevel models and sample size
It is not a pure R question,but I hope some one can give me advices.
I want to use analysis my data with the multilevel model.The data has 2 levels---- the second level has 52 units and each second level unit has 19-23 units.I think the sample size is quite small,but just now I can't make the sample size much bigger.So I want to ask if I use the multilevel model to analysis the data set,will
2008 Jun 07
1
Problem of installing Matrix
[wincent at PC-BSD]export MAKE=gmake
[wincent at PC-BSD]sudo R
.....
> install.packages("Matrix")
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
trying URL 'http://bibs.snu.ac.kr/R/src/contrib/Matrix_0.999375-9.tar.gz'
Content type 'application/x-gzip' length 1483674 bytes (1.4 Mb)
opened URL
2008 May 12
1
Insert a recorde into a table using SQL
Dear list,
I want to insert a recorde into a SQLite table by dbGetQuery(), but
there is a problem when the value contains quotation mark.
> dd<-data.frame(txt=c("having both ' and \" in character.","OK"))
> library(RSQLite)
Loading required package: DBI
> con<-dbConnect(dbDriver("SQLite"),":memory:")
>
2008 Jan 21
3
Need suggestions about GUI
What I want to do is:
1, creat a text box, insert text into that box.
2, select chunk of of the text by mouse, and link it to a lable. so I would
like a way to get that chunk of text.
Can I do such job with tcltk? Any relavant tutorial materials?
Thanks
--
HUANG Ronggui
Bachelor of Social Work, Fudan University, China
Master of sociology, Fudan University, China
Ph.D. Student , CityU of
2011 Apr 26
1
rJava Help
I believe this posting is placed, and I take the liberty to re-direct
to the r-help mailing list.
Regards,
Ronggui
On 26 April 2011 12:33, <gopala at mail.gvsu.edu> wrote:
> ?I am trying to create a web user interface using RApache. I need to install rJava packge but I am getting the following error message
>
> RApache Warning/Error!!!
>
> Error : .onLoad failed in