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

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

2010 Jan 26
0
splitting a factor column into binary columns for each level
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
3
[LLVMdev] [ARM] [PIC] optimizing the loading of hidden global variable
>> Any thoughs? > > I'm now struggling to see how GCC justifies it. What if a different > translation-unit declared those variables in a different order? I also > can't get the same behaviour here, do you have a more complete > command-line? Ah, I see; the translation-unit that does the optimisation needs to have them as a definition (i.e. "= {0}") rather
2018 Nov 16
4
How to concatenate Ogg in the browser JS?
Please see the documentation: https://xiph.org/ogg/doc/framing.html I would encourage you to use random serial numbers, as intended, also, as any downstream consumers of your files will face limitations similar to the ones you are facing if they want to do anything more with them. But before you go too far down the route of changing the serial numbers, can you tell us what software is
2010 Oct 04
2
i have aproblem --thank you
dear professor: thank you for your help,witn your help i develop the nomogram successfully. after that i want to do the internal validation to the model.i ues the bootpred to do it,and then i encounter problem again,just like that.(´íÎóÓÚerror to :complete.cases(x, y, wt) : ²»ÊÇËùÓеIJÎÊý¶¼Ò»Ñù³¤(the length of the augment was different)) i hope you tell me where is the mistake,and maybe i have
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
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
2010 Oct 04
1
I have aproblem about nomogram--thank you for your help
dear professor: I have a problem about the nomogram.I have got the result through analysing the dataset "exp2.sav" through multinominal logistic regression by SPSS 17.0. and I want to deveop the nomogram through R-Projject,just like this : > n<-100 > set.seed(10) > T.Grade<-factor(0:3,labels=c("G0", "G1", "G2","G3")) >
2008 Jul 24
2
[RFC] i386 highmem assist hypercalls
While looking at the origin of very frequently executed hypercalls (as usual, kernel builds are what''s being measured), I realized that the high page accessor functions in Linux would be good candidates to handle in the hypervisor - clearing or copying to/from a high page is a pretty frequent operation (provided there''s enough memory). However, the measured results
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!
2005 Aug 17
3
TDM04B, trunk group
Hi, I am just trying to figure out how to setup a TDM04B card for incoming/outgoing calls. I have 4 lines, which are provided as a rotary trunk group, currently hooked into a Nortel system, which asterisk will replace. I have setup a Dell 1800 (Tower) system with the TDM04B card, which seems to work. The question is how do I set it up that all 4 lines are part of a trunk group, such that
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
2010 Oct 03
2
A problem about nomogram--thank you for you help
dear professor: I am a doctor of urinary,and I am developing a nomogram of bladder tumor.Now I have a problem about this. I have got the result like this through analysing the dataset "exp11.sav" through multinominal logistic regression by SPSS 17.0.(the Sig. is high,that is good ,it is just aexperimental data ) Parameter Estimates Ya B Std. Error Wald df Sig. Exp(B) 95%
2018 Nov 23
1
How to concatenate Ogg in the browser JS?
I found how to build CRC32 table for Ogg in JS, if anyone interested: function _makeCRC32Table() { // From https://stackoverflow.com/questions/53438815/hot-to-build-crc32-table-for-ogg const polynomial = 79764919; const mask = 2147483648; const CRCTable = new Uint32Array(256); for (let i = 256; i--;) { let char = i << 24; for (let j = 8; j--;) {
2002 Nov 21
2
[LLVMdev] get TopDown DSGraph
Dear LLVM, I was wondering if this is the right way to get TopDown DSGraph? TDDataStructures &TD = getAnalysis<TDDataStructures>(); F is some function DSGraph &dsg = TD.getDSGraph(F); I found out the DSGraph I got using this method is actually bottom up DSGraph, can you let me know why? Thanks, xiaodong
2005 Aug 13
1
How to change the names in tone pitch column
Hi, I have a column (V4) in a midi event list which includes tone pitch names, i.e. "A4, E4, C#4, A3...": > compo[1:10,] V1 V2 V3 V4 V5 V6 V7 1 1 1 0 A4 96 2 0 2 1 1 0 E4 96 2 0 3 1 1 0 C#4 96 2 0 4 1 1 0 A3 96 2 0 5 1 3 0 B4 96 1 0 6 1 3 0 E4 96 1 0 7 1 3 0 B3 96 1 0 8 1 3 0 G#3 96 1 0 9 1 4 0 C#5 96 1 0 10
2007 Dec 03
2
Why is the program too slow?
Hi,everyone. I use the following program calculates Fisher's alpha from counts of individuals and species. The program is wrote by Prof. Kyle Harm. However, when I run the program, it can work very quickly sometimes, but it can not work very well sometimes. It depends on the counts of individuals and species. For example, > calc.alpha(1000,70) [1] 17.14375 > calc.alpha(10000,70) [1]
2007 Apr 18
1
[Bridge] [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses
From: Evgeny Kravtsunov <emkravts@openvz.org> compare_ether_addr() implicitly requires that the addresses passed are 2-bytes aligned in memory. This is not true for br_stp_change_bridge_id() and br_stp_recalculate_bridge_id() in which one of the addresses is unsigned char *, and thus may not be 2-bytes aligned. Signed-off-by: Evgeny Kravtsunov <emkravts@openvz.org> Signed-off-by:
2004 Oct 29
1
Giving column names to a matrix
Heloo, I have the following problem: orig.data <- NULL Inside a loop I have instructions like: orig.data <- rbind(orig.data, ...) After that I do: colnames(orig.data)<-c('Data','InicioViagem', ...) Everything works fine. For example, the first line of the matrix is: > orig.data[1,] Data InicioViagem ... 1 40466 ... The problem is: I
2015 Sep 03
1
Doubts on incremental backup and command repetition
Hi, I am trying to use rsync for incremental backup and I am facing some issues. I would like to ask your help to understand what is going on and have the proper command line. 1) my goal is I the following folders: ./dest: file3.txt ./orig: file1.txt   file10.txt  file2.txt   file20.txt And I would like to have as incremental backup ./dest: backup      file1.txt     file2.txt  file3.txt