similar to: Data transformation

Displaying 20 results from an estimated 900 matches similar to: "Data transformation"

2010 Jul 21
1
xtable with ifelse statement
Hi there, I'm very new on R and I hope someone can help me to solve the problem in using the ifelse statement with the xtable function(library xtable). I'm trying to get the printing of the elements of two lists in a sorted way. These two list have in common the their names. I will try to give an example: the first list looks like this: $code1 Code code1 Nation
2011 Feb 03
1
Getting variable names in function output
Dear R-users, I would like to have some advises about a problem illustrated by the following snippet. Within myf, I need to evaluate a piece of R code that is passed as a character argument and then return the objects that are created by this code. The difficulty comes from the fact that the content of the code is variable and unknown to me (obviously not in this illustration!). With the
2007 Jul 23
1
CHAR(STRING_ELT( - OK but CHAR(asChar(STRING_ELT( - not, why?
Any idea why CHAR(asChar(STRING_ELT( produces NA whereas CHAR(STRING_ELT( gets a pointer to a string? It's generally expected that STRING_ELT should already be a character, but why the coercion does not work? Here is a simple example (consistent over R2.5.1-R2.6 rev 42284, I didn't check earlier versions, but it used to be different in 2.4): install.packages("inline")
2010 Jan 25
5
Data transformation
Dear all, I have a dataset that looks like this: x <- read.table(textConnection("col1 col2 3 1 2 2 4 7 8 6 5 10"), header=TRUE) I want to rewrite it as below: var1 var2 var3 var4 var5 var6 var7 var8 var9 var10 1 0 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 0 0
2011 Feb 24
4
Running code sequentially from separate scripts (but not functions)
Hello! I am wondering if it's possible to run - in sequence - code that is stored in several R scripts. For example: Script in the file "code1.r" contains the code: a = 3; b = 5; c = a + b Script in the file "code2.r" contains the code: d = 10; e = d - c Script in the file "code3.r" contains the code: result=e/a I understand that I could write those 3 scripts
2010 Nov 08
2
Several lattice plots on one page
Dear all, I am trying (!!!) to generate pdfs that have 8 plots on one page: df = data.frame( day = c(1,2,3,4), var1 = c(1,2,3,4), var2 = c(100,200,300,4000), var3 = c(10,20,300,40000), var4 = c(100000,20000,30000,4000), var5 = c(10,20,30,40), var6 = c(0.001,0.002,0.003,0.004), var7 = c(123,223,123,412), var8 = c(213,123,234,435), all = as.factor(c(1,1,1,1)))
2010 Dec 03
2
Add columns of dataset
Dear all, I have a dataset that looks like id var1 var2 var4 var7 var8 1 0.0 0.1 0.3 0.9 0.0 2 0.4 0.6 0.0 0.0 0.2 3 0.0 0.0 0.0 0.8 0.7 Some columns are missed, for example, here the fourth (var3), sixth(var5) and seventh (var6) columns. I want to first determine which columns are missed in a huge dataset and then add the missed
2011 Jun 23
2
Merging multiple data sets
Hi, I am trying to merge data similar to the example data below > dat0 id var1 var2 var3 2 1 0 1 3 1 0 1 4 0 1 1 5 0 1 1 > dat1 id var4 var5 var6 2 1 0 1 3 1 0 1 6 0 1 1 7 0 1 1 > dat2 id
2007 Feb 22
2
[LLVMdev] opt -verify
I am writing an interprocedural compiler pass. Because the passneeds information from a FunctionPass, e.g., the post-dominance frontier (PDF), and because a ModulePass is not permitted to require a FunctionPass, I am forced to make my pass a FunctionPass and do majority of its work in the doFinalization() method. When I run "opt -mypass -verify -o code2.bc code1.bc" I get no
2009 Dec 15
1
Changing Column names in (Output) csv file
Dear R helpers   Following is a part of R code.   data_lab <- expand.grid(c("R11", "R12", "R13"), c("R21", "R22", "R23"), c("R31", "R32", "R33"), c("R41", "R42", "R43"), c("R51", "R52", "R53"), c("R61", "R62", "R63"),
2008 Apr 28
1
error in summary.Design
Dear list, after fitting an lrm with the Design package (stored as "mymodel") I try running a summary, but I get the following error: dim(mydata) [1] 235 9 names(mydata) [1] "id" "VAR1" "VAR2" "VAR3" "VAR4" "VAR5" "VAR6" "VAR7" "VAR8" summary(mymodel) Error in `contrasts<-`(`*tmp*`,
2007 Feb 22
3
[LLVMdev] opt -verify
I followed what you said and called verifyModule() with the AbortProcessAction option. verifyModule() returns false, but does not abort and does not print out any information about what caused the verification to fail. Chris Lattner wrote: > On Wed, 21 Feb 2007, Ryan M. Lefever wrote: >> I am writing an interprocedural compiler pass. Because the passneeds >> information from a
2007 Feb 22
0
[LLVMdev] opt -verify
On Wed, 21 Feb 2007, Ryan M. Lefever wrote: > I am writing an interprocedural compiler pass. Because the passneeds > information from a FunctionPass, e.g., the post-dominance frontier > (PDF), and because a ModulePass is not permitted to require a > FunctionPass, I am forced to make my pass a FunctionPass and do majority > of its work in the doFinalization() method. ok > When
2007 Feb 22
0
[LLVMdev] opt -verify
I also tried iterating through the functions of the module and calling verifyFunction(), which also returns false, but does not cause an abort or report anything to stderr about what caused the verification to fail. From the doxygen for verifyFunction() and verifyModule(), it seems like they both should print information to stderr if the verification fails and should abort opt if
2012 May 09
0
serie de tiempo incompleta: rellenar sólo fechas (claudiomet)
Hola.. yo lo haría de la siguiente manera ... En excel:genero una columna con la serie de fechas continuas ... con la función buscarv, agrego las variables que tienen dato a esta serie.. en base a la fecha muy largo y mecánico para mi gusto.... En R ..de igual manera genero el vector de fechas require(chron)# crear el vector continuo de fechasfch01 <- data.frame(''fch'' =
2007 Feb 22
1
[LLVMdev] opt -verify
I think I misread the doxygen. verifyFunction & verifyModule return false if no errors are detected. However, my question now becomes why does the code produced by my transform pass verification, but it causes an assertion failure in the byte reader when it (the code produced by my transform) is passed to another invocation of opt? Ryan M. Lefever wrote: > I also tried iterating
2010 Dec 31
3
Changing column names
Dear R helpers Wish you all a very Happy and Prosperous New Year 2011. I have following query. country = c("US", "France", "UK", "NewZealand", "Germany", "Austria", "Italy", "Canada") Through some other R process, the result.csv file is generated as result.csv      var1   var2  var3  var4    var5    var6   var7  
2010 Jan 26
6
Help
> Dear All > > I have data as follows. > > D T M L > 0.20 1 03 141 > 0.32 1 07 62 > 0.50 1 05 49 > 0.80 1 04 46 > 0.20 2 14 130 > 0.32 2 17 52 > 0.50 2 13 41 > 0.80 2 14 36 > 0.20 3 24 120 > 0.32
2007 Nov 07
2
creating a dynamic output vector
Let's say I have a program that returns variables whose names may be any string within the vector NAMES=c("varA","varB","varC","varD","varE","varF"..."varZ"), but I do not ever know which ones have actually been created. So in one example output, "varA", "varC", and "varD" could exist, but
2011 Nov 04
1
How to use 'prcomp' with CLUSPLOT?
Hello, I have a large data set that has more columns than rows (sample data below). I am trying to perform a partitioning cluster analysis and then plot that using pca. I have tried using CLUSPLOT(), but that only allows for 'princomp' where I need 'prcomp' as I do not want to reduce my columns. Is there a way to edit the CLUSPLOT() code to use 'prcomp', please? #