similar to: Inappropriate class(o)[!inherits(o,"AsIs")] in get_all_vars

Displaying 20 results from an estimated 2000 matches similar to: "Inappropriate class(o)[!inherits(o,"AsIs")] in get_all_vars"

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 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 >>>>>? ?
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
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
2007 Mar 18
1
Error with get_all_vars()
> get_all_vars(dist ~ speed, data = cars) Error in `row.names<-.data.frame`(`*tmp*`, value = c(NA, -50L)) : invalid 'row.names' length > version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status Under development (unstable) major 2 minor 5.0 year 2007 month
2020 Mar 29
2
is.vector could handle AsIs class better
Dear R-devel, AsIs class seems to be well handled by `typeof` and `mode` function. Those two functions are being referred when explaining `is.vector` behaviour in manual. Yet `is.vector` does not seem to be handling AsIs class the same way. is.vector(1L) #[1] TRUE is.vector(I(1L)) #[1] FALSE Is there any reason behind this behaviour? Could we have it supported so AsIs class is ignored when
2002 May 29
1
warning message for setAs when using class AsIs
This seemed too advanced for r-help and is related to the recent discussion of character vectors in dataframes. Following Brian Ripley's most excellent advice, we are moving to a world in which character vectors in dataframes are always of class AsIs. The cool way of doing this seemed to be the following: > cat(c("x", "y", "z"), file = "test.txt",
2020 Mar 30
1
is.vector could handle AsIs class better
Thank you Gabriel, Agree, although I think that could be relaxed in this single case and AsIs class could be ignored. Best, Jan On Sun, Mar 29, 2020 at 7:09 PM Gabriel Becker <gabembecker at gmail.com> wrote: > > Jan, > > I believe it's because it has "a non-NULL attribute other than names" as per the documentation. In this case its class of "AsIs". >
2010 Jan 16
1
order() fails on a chr object of class "AsIs" with "\265" in it
Here's an example (session info at the end). > tmpv <- c('\265g/L','Bq/L') > order(tmpv) [1] 2 1 > tmpv <- I(tmpv) > order(tmpv) Error in if (xi > xj) 1L else -1L : missing value where TRUE/FALSE needed > foov <- gsub('\265','',tmpv) > order(foov) [1] 2 1 > str(tmpv) Class 'AsIs' chr [1:2] "\265g/L"
2000 Sep 21
1
"[.data.frame" forgets about "AsIs" (PR#665)
Short example: > str(d <- data.frame(a = I(letters[1:5]))) `data.frame': 5 obs. of 1 variable: $ a:Class 'AsIs' chr [1:5] "a" "b" "c" "d" ... > str(d[TRUE,,drop = FALSE]) `data.frame': 5 obs. of 1 variable: $ a: chr "a" "b" "c" "d" ... The real problem about this is, that as soon
2018 Apr 15
1
RQDA/RGtk2 Installation Problem
Greetings, I have been having a problem installing RQDA on my Mac (OS 10.13.2). I followed the installation process on the RQDA page ( http://rqda.r-forge.r-project.org/), but I keep getting an error message saying that I am missing pkg-config and GTK. I reinstalled XQuartz and GTK+ 2.24.17 multiple times (and reinstalled R version 3.4.4), but kept receiving the same error message. I also tried
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)
2018 Mar 17
1
Inappropriate parens fix for Logic.Rd
Logic.Rd has been changed again in r74377. After change: ? \item{x, y}{raw or logical or \sQuote{number-like} vectors (i.e., of ? ? types \code{\link{double}} (class \code{\link{numeric}}, ? ? \code{\link{integer}}) and \code{\link{complex}}), or objects for It is still inappropriate. As I said before, integer is not double. Right: numeric includes double and integer Wrong: double includes
2009 Feb 19
2
Build R-2.8.1 on AIX5.3
Hi R users, I want to build R-2.8.1 on AIX5.3, but I got following error message: Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library '/rnd/homes/jixu/tmp/R-2.8.1/library/stats/libs/stats.so': rtld: 0712-001 Symbol d1mach was referenced from module /rnd/homes/jixu/tmp/R-2.8.1/library/stats/libs/stats.so(), but a runtime definition of
2016 Aug 27
2
'droplevels' inappropriate change
In R devel r71157, 'droplevels' documentation, in "Arguments" section, says this about argument 'exclude'. passed to factor(); factor levels which should be excluded from the result even if present. Note that this was implicitly NA in R <= 3.3.1 which did drop NA levels even when present in x, contrary to the documentation. The current default is compatible with x[ ,
2016 Aug 21
1
'droplevels' inappropriate change
In R devel r71124, if 'x' is a factor, droplevels(x) gives factor(x, exclude = NULL) . In R 3.3.1, it gives factor(x) . If a factor 'x' has NA and levels of 'x' doesn't contain NA, factor(x) gives the expected result for droplevels(x) , but factor(x, exclude = NULL) doesn't. As I said in https://stat.ethz.ch/pipermail/r-devel/2016-May/072796.html , factor(x,
2019 Oct 09
4
What is /etc/subuid ?
Dear Experts, Could someone enlighten me about the following file: /etc/subuid ? This file appears to be owned by "setup" package. This is CentOS 7 system, and until now these files if existed were never changed. Today I have added user quite routine way, by doing /usr/sbin/groupadd -g 4500 [username] /usr/sbin/useradd -g [username] -u 4500 -c "User Name, email at domain"
2016 Sep 02
2
Coercion of 'exclude' in function 'factor' (was 'droplevels' inappropriate change)
I am basically fine with the change. How about using just the following? if(!is.character(exclude)) exclude <- as.vector(exclude, typeof(x)) # may result in NA x <- as.character(x) It looks simpler and is, more or less, equivalent. In factor.Rd, in description of argument 'exclude', "(when \code{x} is a \code{factor} already)" can be removed. A larger
2002 May 20
0
No documentation for class AsIs (PR#1582)
There is no documentation for class AsIs, that is ?AsIs gives you nothing. Relatedly, there is no discussion of the use of I() to create objects of class AsIs on the help page for I(). This means that it is hard to find information in the help pages about the following usage. > test <- data.frame(x = I(letters[1:3])) > test x 1 a 2 b 3 c > class(test$x) [1] "AsIs"
2008 May 19
0
as.POSIX{ct,lt} fail on class "AsIs"
(I think this is probably appropriate for r-devel -- if my diagnosis is correct, that is) I have a script that I run infrequently (i.e., quarterly) that has been working for several years. I re-ran it this morning for the first time since updating R from 2.6.2 to 2.7.0, and encountered an error. I found a simple example that shows the problem: > as.POSIXct( I( '2008-01-01' ) )