similar to: package `methods' has persistent effects even if detached (PR#1715)

Displaying 20 results from an estimated 30000 matches similar to: "package `methods' has persistent effects even if detached (PR#1715)"

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". >
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",
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.
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
2004 Oct 28
1
Another problem with next method
I have another problem with NextMethod. Not sure if its related to the last problem. In this example, we have a generic called ff with methods for AsIs and test classes. We call the generic with an object of AsIs class. The corresponding method adds 1 to it and then changes the class to test followed by issuing a NextMethod. However, that results in this error (using R 2.0.0, 2004-10-04
2020 Oct 30
2
Change to I() in R 4.1
Hi Martin, On 10/26/20 04:52, Martin Maechler wrote: >> >> Hi there, >> Is that change in R-devel intentional? >> >> library(Matrix) >> m <- as(matrix(c(0, 1)), "sparseMatrix") >> >> isS4(m) >> # [1] TRUE >> >> x <- I(m) >> # Warning message: >> # In `class<-`(x,
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
2005 Mar 17
1
Binding one column of characters into a dataframe factors other numeric columns
Hi all, I searched through the archives, but couldn't find a fix... Basically, I've got a bunch of numeric vectors and one character vector that I want to bind into a data frame. When I include the character vector as a column in the data frame, all the numeric columns get factored in the data frame, which makes it tough to call those columns for calculations later on. I've tried
2020 Oct 30
1
[External] Re: Change to I() in R 4.1
On Fri, 30 Oct 2020, Pages, Herve wrote: > > On 10/29/20 23:08, Pages, Herve wrote: > ... >> >> I can think of 2 ways to move forward: >> >> 1. Keep I()'s current implementation but suppress the warning. We'll >> make the necessary adjustments to DataFrame() to repair columns supplied >> as I(<S4>) objects. Note that we would still be in
2020 Oct 23
2
Change to I() in R 4.1
Hi there, Is that change in R-devel intentional? library(Matrix) m <- as(matrix(c(0, 1)), "sparseMatrix") isS4(m) # [1] TRUE x <- I(m) # Warning message: # In `class<-`(x, unique.default(c("AsIs", oldClass(x)))) : # Setting class(x) to multiple strings ("AsIs", "dgCMatrix", ...); result will no longer be an S4 object
2009 Nov 02
1
two small wishes (with code sugegstions) for R-core
Dear R developers, It would be great if you could implement the two minor code changes suggested below, which would help processing large objects in R. Jens Oehlschl?gel # Wish no. 1: let [.AsIs return the class AFTER subsetting, not the class of the original object # Wish no. 2: adjust write.csv and write.csv2 for multiple calls in chunked writing # Rationale no. 1: a couple of packages
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
2006 Mar 15
5
Surv object in data.frame
Dear All, a Surv object I put in a data frame behaves somehow unexpected (see example). If I do a Cox regression on the original Surv object it works. If I put it in a data.frame and do the regression on the data frame it does not work. Seemingly it has to do with the class attribute, because if I change the class attribute to let "Surv" appeare first, again it works. Is this known?
2010 Apr 22
2
R2.11.0 - rasterImage() and barplot fill-patterns
Hello Peter, Thank you, and the R core team, for the new release. I see that in R 2.11.0 there is now support for rendering of raster (bitmap) images through rasterImage(). I am wondering - can this be used to create a texture/fill-pattern for hist()/barplot() ? (A request made several times throughout the years on the mailing list. For example:
2007 Mar 16
3
corAR1 in a random effects panel
Hi everyone, I am interested in estimating this type of random effects panel: y_it = x'_it * beta + u_it + e_it u_it = rho * u_it-1 + d_it rho belongs to (-1, 1) where: u and e are independent and normally zero-mean distributed. d is also independently normally zero-mean distributed. So, I want random effects for group i to be correlated in t, following an AR(1) process. I am
2016 Dec 20
3
Unexpected I(NULL) output
Hi all, I believe there is an issue with passing NULL to the function I(). class(NULL) # "NULL" (as expected) print(NULL) # NULL (as expected) is.null(NULL) # TRUE (as expected) According to the documentation I() should return a copy of its input with class "AsIs" preprended: class(I(NULL)) # "AsIs" (as expected) print(I(NULL)) # list() (not expected!
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"
2010 Mar 12
2
Data frame question
Hi, I have the following question about creating data frames. I want to create a data frame with 2 components: a vector and a matrix. Let me use a simple example: y <- rnorm(10) x <- matrix(rnorm(150), nrow=10) Now if I do dd <- data.frame(x=x, y=y) I get a data frame with 16 colums, but if, according to the documentation, I do dd <- data.frame(x=I(x), y=y) then str(dd)
2004 Sep 09
2
Rd syntax error detected in CRAN daily checks
Please forgive me if you already received this. I had an e-mail sending glitch this morning. http://cran.r-project.org/src/contrib/checkSummary.html reported an error in Design.trans.Rd * checking Rd files ... ERROR Rd files with syntax errors: /var/mnt/hda3/R.check/r-devel/PKGS/Design/man/Design.trans.Rd: unterminated section 'alias' The .Rd file is attached. It begins
2011 Apr 19
1
How to Extract Information from SIMEX Output
Below is a SIMEX object that was generated with the "simex" function from the "simex" package applied to a logistic regression fit. From this mountain of information I would like to extract all of the values summarized in this line: .. ..$ variance.jackknife: num [1:5, 1:4] 1.684 1.144 0.85 0.624 0.519 ... Can someone suggest how to go about doing this? I can extract the