similar to: splitting a factor column into binary columns for each level

Displaying 20 results from an estimated 10000 matches similar to: "splitting a factor column into binary columns for each level"

2010 Jan 26
1
splitting a factor column into binary columns for each factor
Yesterday I posted the following question (my apologies for not putting a subject line): =================question====================== Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks. options(stringsAsFactors=FALSE) orig <- c(rep('11111111',100000),rep('22222222',200000),rep('33333333'
2010 Jan 25
2
(no subject)
Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks. options(stringsAsFactors=FALSE) orig <- c(rep('11111111',100000),rep('22222222',200000),rep('33333333',300000),rep('44444444',400000)) orig.unique <- unique(orig) system.time(df <- as.data.frame(sapply(orig.unique, function(x) ifelse(orig==x, 1, 0))))
2014 Mar 14
2
[LLVMdev] [ARM] [PIC] optimizing the loading of hidden global variable
Hi Rafael, Yes, merging gv prevents linker to do garbage collection. Should it be implemented as a peephole pass? If we do it too early, the distance between GVs are not fixed yet. PS: Below is the GCC output with "extern" hidden: ldr r2, .L2 stmfd sp!, {r3, lr} .save {r3, lr} .LPIC0: add r0, pc, r2 bl _Z4initPv(PLT) ldr r1, .L2+4 .LPIC1: add r0, pc, r1 bl _Z4initPv(PLT) ldr
2012 Apr 19
1
Question about glusterfs quotas on debian wheezy?
Hello list, I'm experimenting with a little GlusterFS cluster on debian wheezy: === snip === muzzy:~# cat /etc/debian_version wheezy/sid muzzy:~# dpkg -l | grep gluster ii glusterfs-client 3.2.6-1 clustered file-system (client package) ii glusterfs-common 3.2.6-1 GlusterFS common libraries and translator modules ii glusterfs-server 3.2.6-1 clustered file-system (server package) === snip
2014 Mar 12
3
[LLVMdev] [ARM] [PIC] optimizing the loading of hidden global variable
Hi, When I’m compiling a code with –fvisibility=hidden –fPIC for ARM, I find that LLVM generates less optimized code than GCC. For example: test.cpp: void init(void *); int g0[100]; int g1[100]; int g2[100]; void foo() { init(&g0); init(&g1); init(&g2); } Clang will emit 1 GOT entry for each GV and 2 instructions to get the address: ldr
2011 Jun 23
1
Generate the next column from previous column
Hi, I'm quite new to R and are stuck with the following problem. Lets say I have a column consisting of a 1 and the rest zero's, called G0. G0 <- c(1,rep(0,5)) Now what I would like to do is to generate G1 from G0, and G2 from G1 etc... Just for the simplicity, let's say I need the first entry of the column to be increased by 5 each time. How could I do this? Thanks already!
2002 Nov 21
1
[LLVMdev] get TopDown DSGraph
Thanks, Chris. Actually I got the following graph from my program: digraph DataStructures { label="Function fini"; edge [arrowtail="dot"]; size="10,7.5"; rotate="90"; Node0x100ae1c40 [shape=record,shape=Mrecord,label="{ %struct.a: HIMR\n|{<g0>|<g1>|<g2>}}"]; Node0x100ae1c40:g1 -> Node0x100ae1e00;
2012 May 23
0
gam (mgcv) vs. multiple regression breakpoint analysis: inconsistencies?
Dear useRs, I have a question with respect to fitting a non-linearity using gam (mgcv package, version 1.7-16). In a study I'm currently conducting, I'd like to find out if there is a breakpoint after which the effect of Age of Acquisition (AOA) of the second language changes. I.e. if the slope of AOA before the breakpoint (at a certain AOA) is different from the slope past the
2014 Dec 12
2
[Bug 991] New: Exactly after 24h of uptime system hungs
https://bugzilla.netfilter.org/show_bug.cgi?id=991 Bug ID: 991 Summary: Exactly after 24h of uptime system hungs Product: netfilter/iptables Version: unspecified Hardware: sparc64 OS: Debian GNU/Linux Status: NEW Severity: blocker Priority: P5 Component: ip_tables (kernel)
2014 Jul 10
0
Warnings in dmesg and results of mmiotrace 10de:1140 Geforce620m Optimus Laptop Acer E1-531G
Od: "Ilia Mirkin" <imirkin at alum.mit.edu> Do: "Lampshade" <lampshade at poczta.fm>; Wys?ane: 19:07 Czwartek 2014-07-10 Temat: Re: [Nouveau] Warnings in dmesg and results of mmiotrace 10de:1140 Geforce620m Optimus Laptop Acer E1-531G > On Thu, Jul 10, 2014 at 11:01 AM, Lampshade wrote: > > Hello > > in dmesg I always have these informations (I
2016 Apr 05
1
[Bug 94826] New: Cannot set external display as primary in optimus mode
https://bugs.freedesktop.org/show_bug.cgi?id=94826 Bug ID: 94826 Summary: Cannot set external display as primary in optimus mode Product: xorg Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Driver/nouveau
2023 Oct 31
1
weights vs. offset (negative binomial regression)
[Please keep r-help in the cc: list] I don't quite know how to interpret the difference between specifying effort as an offset vs. as weights; I would have to spend more time thinking about it/working through it than I have available at the moment. I don't know that specifying effort as weights is *wrong*, but I don't know that it's right or what it is doing: if I were
2007 Jul 24
2
Dial out through multiple Zap groups
Hi, I'm trying to set a rule to dial out through multiple Zap groups so that, say, g0 is the cheaper POTS lines group and must be used first. However, if g0 is busy or disconnected then try dialing out g1. My g0 group is made up of 4 analog lines connected to a 4-FXO card. I disconnected the RJ-11 wires from the FXO card to simulate a line disconnection. So theoretically all calls should
2012 Jan 12
1
[LLVMdev] A question of Sparc assembly generated by llc
Hi, There are some generated Sparc assembly code like this: main: ! @main ! BB#0: save %sp, -112, %sp sethi 0, %l0 or %g0, 5, %l1 st %l0, [%fp+-4] st %l1, [%fp+-8] st %l1, [%fp+-12] sethi %hi(.L.str), %l1 ld [%fp+-8], %o1 add %l1, %lo(.L.str), %l1 or %g0, %l1, %o0 call printf nop ld [%fp+-12], %o2 ld [%fp+-8], %l2 sethi %hi(.L.strQ521), %l3 add
2017 Oct 03
0
Revert to R 3.2.x code of logicalSubscript in subscript.c?
Suharto, If you're interested in performance with subscripting, you might want to look at pqR (pqR-project.org). It has some substantial performance improvements for subscripting over R Core versions. This is especially true for the current development version of pqR (probably leading to a new release in about a month). You can look at a somewhat-stable snapshot of recent pqR development
2011 Dec 28
1
Subsetting a data frame vs. subsetting the columns
Hi all, There seems to be rather a large speed disparity in subsetting when working with a whole data frame vs. working with just columns individually: df <- as.data.frame(replicate(10, runif(1e5))) ord <- order(df[[1]]) system.time(df[ord, ]) # user system elapsed # 0.043 0.007 0.059 system.time(lapply(df, function(x) x[ord])) # user system elapsed # 0.022 0.008 0.029
2023 Dec 02
1
Try reproduce glmm by hand
Dear all, In order to be sure I understand glmm correctly, I try to reproduce by hand a simple result. Here is a reproducible code. The questions are in _________________ Of course I have tried to find the solution using internet but I was not able to find a solution. I have also tried to follow glmer but it is very complicated code! Thanks for any help. Marc # Generate set of df with nb
2009 Sep 27
0
Is channel local what I need?
On 1.6.0.16-rc1: I'm using app_fax.so to send a fax, and then send a confirm. 'send' => 1. Set(UniqueFile=/var/spool/asterisk/outgoing/call-${UNIQUEID}) [pbx_config] 2. System(env echo -e "Channel:DAHDI/g0/........\\nContext:fax-tx\\nExtension: s\\nPriority: 1\\n" >${UniqueFile}) [pbx_config] [ Context 'fax-tx' created by
2015 Apr 11
2
[LLVMdev] __eh_frame info changes in Clang?
Nick, Do you happen to know why the version reported in 'dwarfdump --eh-frame' for object files now differs when compiled with and without -g? The test used in FSF gcc's configure produces a diff of.. % diff -u conftest.o.g.stripped.dwarfdump conftest.o.g0.stripped.dwarfdump --- conftest.o.g.stripped.dwarfdump 2015-04-10 21:43:15.000000000 -0400 +++
2006 Apr 28
1
Odd internal vs. External dialplan issue
I have the following in my extensions.conf [ext-local] exten => _53XX,1,Wait(2) exten => _53XX,2,NoOp,Dialing ${EXTEN} from ext-local-custom exten => _53XX,3,Macro(dialout-trunk,2,${EXTEN},,) This is used to match inbound caller-id for my legacy PBX. It works fine for inbound calls, but not for internal SIP calls. If I call from a SIP phone that is also in [ext-local], it looks like it