similar to: Deep copy of factor levels?

Displaying 10 results from an estimated 10 matches similar to: "Deep copy of factor levels?"

2019 Jul 17
2
ALTREP wrappers and factors
Hello, I?m experimenting with ALTREP and was wondering if there is a preferred way to create an ALTREP wrapper vector without using .Internal(wrap_meta(?)), which R CMD check doesn?t like since it uses an .Internal() function. I was trying to create a factor that used an ALTREP integer, but attempting to set the class and levels attributes always ended up duplicating and materializing the
2019 Jul 19
2
ALTREP wrappers and factors
Hi Jiefei and Kylie, Great to see people engaging with the ALTREP framework and identifying places we may need more tooling. Comments inline. On Thu, Jul 18, 2019 at 12:22 PM King Jiefei <szwjf08 at gmail.com> wrote: > > If that is the case and you are 100% sure the reference number should be 1 > for your variable *y*, my solution is to call *SET_NAMED *in C++ to reset > the
2019 Jul 18
0
ALTREP wrappers and factors
Hi Kylie, For your question, I don't think a wrapper can completely solve your problem. The duplication occurs since your variable y has more than 1 reference number( Please see highlighted), so even you have a wrapper, any changes on the value of the wrapper still can trigger the duplication. > .Internal(inspect(y)) > @7fb0ce78c0f0 13 INTSXP g0c0 *[NAM(7)]* matter vector (mode=3,
2020 Jul 22
3
Invisible names problem
I ran into strange behavior when removing names. Two ways of removing names: i <- rep(1:4, length.out=20000) k <- c(a=1, b=2, c=3, d=4) x1 <- unname(k[i]) x2 <- k[i] x2 <- unname(x2) Are they identical? identical(x1,x2) # TRUE but no identical(serialize(x1,NULL),serialize(x2,NULL)) # FALSE But problem is with serialization type 3, cause:
2014 Apr 02
0
special handling of row.names
Hello, I think there is an inconsistency in the handling of the compact form of the row.names attributes. When n is the number of rows of a data.frame, the compact form is c(NA_integer_,-n), as in: > d <- data.frame(x=1:10) > .Internal(inspect(d)) @104f174a8 19 VECSXP g0c1 [OBJ,NAM(2),ATT] (len=1, tl=0) @103a7dc60 13 INTSXP g0c4 [] (len=10, tl=0) 1,2,3,4,5,... ATTRIB: @104959380
2010 Nov 12
1
SEXPs and slots
Hello, I've created this class: setClass("example", representation ( size = "numeric", id = "character" ) ) Suppose I create a new instance of this class: > x <- new("example", 4, "id_value") This creates an S4 object with two slots. Am I correct in thinking that slots are "filled" by SEXPs?
2010 Nov 15
1
SEXP and slots
Hello, Since people have whisperred about Rcpp, I'd like to play too. > On 11/15/2010 07:45 AM, Patrick Leyshock wrote: >> Very helpful, thank you. >> >> A couple other questions, please: >> >> 1. I've got a function written in C, named "my_c_function". In my R >> code I call this function, passing to it an INTSXP and a STRSXP, >>
2011 Feb 28
2
can't disconnec iSCSI targets, please help
Hi, I'm trying to disconnect some iSCSI targets, but can't seem to. [root at localhost ~]# iscsiadm -m session tcp: [1] 192.168.2.202:3260,1 iqn.2011.01.22.freenas.nvr:500gb tcp: [3] 192.168.2.200:3260,1 iqn.2011-2.za.co.securehosting:RAID.thin3.vg0.1tba tcp: [4] 192.168.2.202:3260,1 iqn.2011.01.22.freenas.nvr:extent0 tcp: [5] 192.168.2.200:3260,1
2020 Mar 26
5
Multi-Threading Compilers
> On Mar 26, 2020, at 10:55, Nicolai Hähnle <nhaehnle at gmail.com> wrote: > > On Thu, Mar 26, 2020 at 11:53 AM Florian Hahn <florian_hahn at apple.com> wrote: >>> It also doesn't solve the problem of Functions themselves -- those are >>> also GlobalValues… >> >> I am not sure why not. Function passes should only rely on the information at
2012 Mar 19
16
LV resize encrypted volume
Hi, dom0: Debian Lenny 2.6.26-2-xen-amd64, domU: same. Xen 3.2-1 After resizing a LV on dom0, Xen is not reporting the new extended size to the PV domU even though dom0 is well aware of the new size. I''ve rebooted domU (not dom0 yet as that''s running a lot of other domU''s). The LV I tried to resize is encrypted. Resizing unencrypted volumes works as expected. dom0:~#