Re: [R] How can I create a data_table with 1000 variables (Var1:Var1000)

2013-08-15 Thread Siraaj Khandkar
On 08/15/2013 04:16 PM, Pooya Lalehzari wrote: Hello everyone, How can I create a data_table with 1000 variables (Var1:Var1000)? I'm not familiar with data_table, but here's an example to get you started in figuring this out: > n <- 3 > var.range <- 1:n > prefix <- "Var" > data <- as.data.f

Re: [R] condense repetitive code for read.csv and rename.vars

2013-08-14 Thread Siraaj Khandkar
On 08/14/2013 03:43 PM, bcrombie wrote: Is there a more concise way to write the following code? library(gdata) mydataOUTPUTrtfA <- read.csv("mergedStatstA.csv") save(mydataOUTPUTrtfA, file="mydataOUTPUTrtfA.RData") mydataOUTPUTrtfA <- rename.vars(mydataOUTPUTrtfA, from="X", to="Statistics.Calcu

Re: [R] How to store and manipulate survey data like this?

2013-08-13 Thread Siraaj Khandkar
On 08/13/2013 12:17 PM, Walter Anderson wrote: I have to process a set of survey data with questions that are formatted like this; 1) Pick your top three breeds (pick 3) 1 Rottweiler 2 Pit Bull 3 German Shepard 4 Poodle 5 Border Collie 6 Dalmation 7 Mixed Breed and the answ

Re: [R] import function without overwriting function with the same name

2013-08-03 Thread Siraaj Khandkar
On 08/03/2013 05:32 PM, Bert Gunter wrote: 4. Or, probably the least desirable approach that may nevertheless be what you may want, is just to attach your collections of functions and access them by fully qualified names. See ?"::" for details on how to do that. Why do you feel this is least