# similar to: transform 3 numeric vectors empty of 0/1

Displaying 20 results from an estimated 3000 matches similar to: "transform 3 numeric vectors empty of 0/1"

2013 Sep 05
2
binary symmetric matrix combination
Hi, May be this helps: m1<- as.matrix(read.table(text=" y1 g24 y1 0 1 g24 1 0 ",sep="",header=TRUE)) m2<-as.matrix(read.table(text="y1 c1 c2 l17 ?y1 0 1 1 1 ?c1 1 0 1 1 ?c2 1 1 0 1 ?l17 1 1 1 0",sep="",header=TRUE)) m3<- as.matrix(read.table(text="y1 h4??? s2???? s30 ?y1 0 1 1 1 ?h4 1 0 1 1 ?s2 1 1 0 1 ?s30 1 1 1
2013 Jul 02
2
Replacing strings to numbers
Hi guys, I was wondering if any one is able to help me on a problem that I was stuck with for a long time. It involves the replacement of character strings with numbers. The character string can take on only 3 possible values, for instance: AA AT TT I would want R to replace AT with 0. Between AA and TT, I want to compare the frequency of either value, and then for the one which occurs more, I
1999 Dec 16
2
R question
I have the following question, which is elementary but I am unable to answer. In a for(i=10) loop, I am trying to represent the 10 1-dimensional vectors l1, l2,... l10 by some expression that will run through these values. ie. soppose I want to add l1 + ... + l10 I could go x <- 0 for(i in 1:10){ x <- x+ l(i)} This should return x to be the sum of the 10 li's for i from 1 to 10
2013 Aug 29
4
Add new calculated column to data frame
Hi, I have a following data set: id event time (in sec) 1 add 1373502892 2 add 1373502972 3 delete 1373502995 4 view 1373503896 5 add 1373503996 ... I'd like to add new column "time on task" which is time elapsed between two events (id2 - id1...). What would be the best approach to do that? Thanks, Srecko [[alternative HTML
2000 Jun 17
2
R 1.1.0 for Windows
Windows binaries at CRAN (bin/windows/Windows-NT/base) have been updated to R-1.1.0. See below for a list of Windows-specific changes. We thanks all the people who checked over pre-test versions. guido masarotto (for the R-core team) Windows-specific changes to R ============================= There is now a GUI preferences editor on the Edit menu in Rgui. A data entry
2000 Jun 17
2
R 1.1.0 for Windows
Windows binaries at CRAN (bin/windows/Windows-NT/base) have been updated to R-1.1.0. See below for a list of Windows-specific changes. We thanks all the people who checked over pre-test versions. guido masarotto (for the R-core team) Windows-specific changes to R ============================= There is now a GUI preferences editor on the Edit menu in Rgui. A data entry
2013 Aug 26
4
transform variables
Dear all! I have a data frame composed by 13 columns (year, and 12 months). I want to transform this data base in another like this year month values 1901 1 1901 2 1901 3 ..... 1901 12 1902 1 1902 2 .... 1902 12 Is there a possibility to succeed that in R? Thank you! best regards! CR -- --- Catalin-Constantin ROIBU Lecturer PhD, Forestry engineer Forestry Faculty of Suceava Str.
2013 Jun 10
4
Combining CSV data
Hello R community, I am trying to combine two CSV files that look like this: File A Row_ID_CR, Data1, Data2, Data3 1, aa, bb, cc 2, dd, ee, ff File B Row_ID_N, Src_Row_ID, DataN1 1a, 1, This is comment 1 2a, 1, This is comment 2 3a,
2013 Sep 02
1
Convert chr pieces to numbers that have specific values defined by 2 vectors
Dear all, I think this is an easy task, but I don't know how to do it. Specifically, I have 69 columns with 300.000 rows. In each cell there is a code like "2E3", "4RR", etc. I now have a list that replaces this with values, e.g., old new 2E3 5 4RR 3 etc. The list ist about 1600 rows long, so also to extensive for normal solutions Do you how to do that? It would
2012 Dec 21
2
how to recode an ordered factor
Dear R helpers, I'm trying to recode an ordered factor to reverse its scale, but I can't figure out how to make it. I am using the Recode function provided by the Car package. I've created an ordered variable: data\$o.var1 <- ordered(data\$var1, levels=c(1,2,3,4), labels =c("very satisfied", "fairly satisfied", "not very satisfied", "not at all
2015 May 04
2
[LLVMdev] Incorrect code generated for arm64
Hi all, I’ve narrowed down a problem in my code to the following test case: - - - - typedef struct {float v[2];} vec2; typedef struct {float v[3];} vec3; vec2 getVec2(); vec3 getVec3() { vec2 myVec = getVec2(); vec3 res; res.v[0] = myVec.v[0]; res.v[1] = myVec.v[1]; res.v[2] = 1; return res; } - - - - Compiling this with any level of optimization for arm64 gives incorrect code,
2008 Dec 30
2
[LLVMdev] Folding vector instructions
Hello. Sorry I am not sure this question should go to llvm or mesa3d-dev mailing list, so I post it to both. I am writing a llvm backend for a modern graphics processor which has a ISA very similar to that of Direct 3D. I am reading the code in Gallium-3D driver in a mesa3d branch, which converts the shader programs (TGSI tokens) to LLVM IR. For the shader instruction also found in LLVM IR,
2013 Jan 18
3
longitudinal study
Hello R user, I have a data set from a longitudinal study ( sample below) where subjects are followed over time. Second column (status) contains info about if subject is dead or still in the study and third column is time measured in the week. Here is what I need: if status is not dead or unknown take the last week, if status is dead or unknown I need to have corresponding week. Desired resulst:
2007 Aug 28
1
Age-Length key with kimura algorith
Se ha borrado un texto insertado con un juego de caracteres sin especificar... Nombre: no disponible Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070828/6641b572/attachment.pl
2015 May 04
2
[LLVMdev] Incorrect code generated for arm64
Thanks Bruce. > On 4 May 2015, at 13:18, Bruce Hoult <bruce at hoult.org> wrote: > > I can confirm that, with Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn) > > Very strange! Yes, that’s what I thought. I’ve also checked the binary downloads for OS X from llvm.org <http://llvm.org/> and get the same broken code from both the 3.5.2 and
2013 May 07
4
create unique ID for each group
Hey All, I have a dataset(dat1) like this: ObsNumber ID Weight 1 0001 12 2 0001 13 3 0001 14 4 0002 16 5 0002 17 And another dataset(dat2) like this: ID Height 0001 3.2 0001 2.6 0001
2012 Dec 10
3
equivalent of group command of the egen function in Stata
Dear R listers, I am trying to create a new variable that uniquely identifies groups of observations in a dataset. So far I couldn't figure out how to do this in R. In Stata I would simply type: egen newvar = group(dim1, dim2, dim3) Please, find below a quick example to show what I am dealing with: I have a dataset with 4 variables: var <- runif(50) ## a variable that I want to group
2012 Oct 11
3
Formatting data for bootstrapping for confidence intervals
Hi all, New to R, so this may be obvious to some. I've been trying to figure this out for a while, I have a dataset "events" that looks something like this: Area NAME DATE X Xn Y 1 X 1/10/10 1 1 0 1 Y 1/11/10 0 0 1 1 X 1/12/10 1 0 0 1 X 1/12/10 1 0 0 1 X 1/12/10
2013 Sep 02
1
R dataframe and looping help
HI, You may try this: dat1<- read.table(text=" CustID TripDate Store Bread Butter Milk Eggs 1 2-Jan-12 a 2 0 2 1 1 6-Jan-12 c 0 3 3 0 1 9-Jan-12 a 3 3 0 0 1 31-Mar-13 a 3 0 0 0 2 31-Aug-12 a 0 3 3 0 2 24-Sep-12 a 3 3 0 0 2 25-Sep-12 b 3 0 0 0 ",sep="",header=TRUE,stringsAsFactors=FALSE) dat2<- dat1[,-c(1:3)] res<- lapply(seq_len(ncol(dat2)),function(i)
2013 Apr 29
4
expanding a presence only dataset into presence/absence
Hello, I'm working with a very large dataset (250,000+ lines in its' current form) that includes presence only data on various species (which is nested within different sites and sampling dates). I need to convert this into a dataset with presence/absence for each species. For example, I would like to expand "My current data" to "Desired data": My current data