similar to: Grouping data.frames

Displaying 20 results from an estimated 20000 matches similar to: "Grouping data.frames"

2010 Feb 19
1
Fix for incorrect use of restrict in xz third party code
Hello, the included XZ Utils source code contains an incorrect use of the restrict keyword. This leads to data corruption under certain circumstances. For a short discussion of the problem see http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/3306733 This was fixed in the XZ Utils git repository in commit commit 49cfc8d392cf535f8dd10233225b1fc726fec9ef Author: Lasse
2009 Jul 15
4
Extract pairs (rowname, columname) from a matrix where value is 0
Dear sir, I have a matrix like a<-matrix(c(0,2,0,4,0,6,5,8,0),nrow=3) colnames(a)<-c("F1","F2","F3") rownames(a)<-c("A1","A2","A3") a F1 F2 F3 A1 0 4 5 A2 2 0 8 A3 0 6 0 I want to extract all pairs (rownames, columnames) from which the value in the matrix is 0 The result should be something like this A1, F1 A2,
2011 Feb 14
4
sem problem - did not converge
Someone can help me? I tried several things and always don't converge # Model library(sem) dados40.cov <- cov(dados40,method="spearman") model.dados40 <- specify.model() F1 -> Item11, lam11, NA F1 -> Item31, lam31, NA F1 -> Item36, lam36, NA F1 -> Item54, lam54, NA F1 -> Item63, lam63, NA F1 -> Item65, lam55, NA F1 -> Item67, lam67, NA F1 ->
2011 Jun 01
3
error in model specification for cfa with lavaan-package
Dear R-List, (I am not sure whether this list is the right place for my question...) I have a dataframe df.cfa
2012 Jul 11
2
[LLVMdev] [NVPTX] llc -march=nvptx64 -mcpu=sm_20 generates invalid zero align for device function params
Hello, FYI, this is a bug http://llvm.org/bugs/show_bug.cgi?id=13324 When compiling the following code for sm_20, func params are by some reason given with .align 0, which is invalid. Problem does not occur if compiled for sm_10. > cat test.ll ; ModuleID = '__kernelgen_main_module' target datalayout = "e-p:64:64-i64:64:64-f64:64:64-n1:8:16:32:64" target triple =
2020 Mar 03
2
TBAA for struct fields
[AMD Public Use] Hi Oliver, I get rid of the warnings by explicitly type-casting it to struct*, and still get similar results. ####################################################### struct P { float f1; float f2; float f3[3]; float f4; }; void foo(struct P* p1, struct P* p2) { p1->f2 = 1.2; p2->f1 = 3.7; } int callFoo() { struct P p; foo(&p,
2007 Dec 06
1
updating a helper function in a R package
Hi list, Sorry for the vague title, but here is the scenario. I?m writing an R package, let?s say, ?pkg1?, which contains 3 functions: f1, f2, f3. f2 and f3 are helper functions for f1, i.e. f1 calls f2 which in turn calls f3. f1 <- function(?) { ?. f2() ? } f2 <- function(?){ ? f3(?) ? } f3 <- function(...){ .... } Then, I wrote a new version of f3 and I want to
2008 Jun 24
4
Find max of a row in data frame (like Excel)
Hi, Here's the data we have: > rs[1:5,] probe_id f1 f2 f3 f4 M A f 1 A_68_P20002076 2 58 0 0 1.51778114 6.344453 59 2 A_68_P20002775 22 8 15 0 0.43419304 5.488819 59 3 A_68_P20005791 43 3 0 0 0.05698666 9.830594 59 4 A_68_P20005805 11 34 0 0 1.71076835 6.624038 59 5 A_68_P20006729 16 44 0 0 0.85498261 6.044229 59 I want rs$f be the max of f1, f2, f3,
2004 Feb 10
2
Constructing an environment from a data.frame
Code like df <- data.frame(x=1:10) y <- 20:29 eval(quote(x+y), env=df) does what you might expect: it looks for x and y in the data.frame, and when it doesn't find y there, it looks in the parent environment. However, sometimes I'd like to construct a single environment out of df, so that I can pass it to nested functions and get the same behaviour. Right now, I get the wrong
2004 Feb 10
2
Constructing an environment from a data.frame
Code like df <- data.frame(x=1:10) y <- 20:29 eval(quote(x+y), env=df) does what you might expect: it looks for x and y in the data.frame, and when it doesn't find y there, it looks in the parent environment. However, sometimes I'd like to construct a single environment out of df, so that I can pass it to nested functions and get the same behaviour. Right now, I get the wrong
2009 Oct 07
2
Plotting 1 covariate, 3 factors
I'm interested in plotting a y with an x factor as the combination of 2 factors and colour with respect to a third, which the code below does with interaction.plot(). However, this is because I redefine the x to be 1 factor. Is there a way of getting it to plot without redefining it, and ideally to not join up the lines BETWEEN levels a and b, but just join those between after and before for
2005 Mar 18
1
slow computation of mixed ANOVA using aov
Dear R-help list, I am trying to do a mixed ANOVA on a 8960 x 5 dataframe. I have 3 factors for which I want to test all main effects and interactions : f1 (40 levels), f2 (7 levels), and f3 (4 levels). I also have a subject factor, subject, and a dependent variable, dv. Some more information about the factors: f2 is a between-subject factor. That is, for each level of f2 there are 8 nested
2009 Sep 19
2
Counting observations of a combined factor
#I have a dataset with two factor. I want to combine those factors into a single factor and count the number of data values for each new factor. The following gives a comparable dataframe: a <- rep(c("a", "b"), c(6,6)) b <- rep(c("c", "d"), c(6,6)) df <- data.frame(f1=a, f2=b, d=rnorm(12)) df # I use the 'interaction' function to combine
2003 Jul 18
3
Problem indexing into array
Hi Folks, Can anyone give me the tip I've been groping for with the following question:? mu: kx2x2x2 array of reals corresponding to means of k RVs at the combinations of values (1,2)x(1,2)x(1,2) of dichotomous variables F1,F2,F3 mu prints out as k rows (one for each Xi) of 8 numbers M: N x (3+k) matrix of cases. The first 3 cols are values of
2003 Jun 23
3
right assignment ("->") and functions
Hi everyone check this out [R-1.7.0]: R> f1 <- function(x){x^2} R> f1 -> f2 R> f2(4) [1] 16 R> R> function(x){x^2} -> f3 function(x){x^2} -> f3 R> f3(4) Error: couldn't find function "f3" Why does right assignment "->" work in the first but not the second case? Can anyone else reproduce this? -- Robin Hankin, Lecturer, School of
2007 Apr 11
2
sem is not "taking" the model
A strange problem with sem: I downloaded the sem library and then, I specified my simple measurement model (below). I highlighted it and ran it. It ran, but it did NOT tell me "22 lines read". And nothing works after that - it looks like it runs, but it does not produce anything... Did I make a mistake somewhere in the model? (notice, TIME has only 1 indicator - t1, and I fixed t1's
2007 Apr 09
3
sem vs. LISREL: sem fails
I am new to R. I just tried to recreate in R (using sem package and the identical input data) a solution for a simple measurment model I have found before in LISREL. LISREL had no problems and converged in just 3 iterations. In sem, I got no solution, just the warning message: "Could not compute QR decomposition of Hessian. Optimization probably did not converge. in: sem.default(ram =
2005 Mar 29
3
From FAQ 7.21 to a command like apply(sapply(list(f1,f2,f3),is.na),2,sum)
Dear all, Last December there was a thread regarding the famous FAQ 7.21 "How can I turn a string into a variable?" and asking what people want to do with these strings. My, certainly trivial application would be as follows: Assume I have a data.frame containing besides others also the columns f1, f2, ..., fn and I want to create a command like: apply(sapply(list(f1,f2,f3),is.na),2,sum)
2009 Apr 13
4
Group by in R
Hi, I have the following table data: f1, f2, f3, f4. I want to compute the counts of unique combinations of f1-f4. In SQL I would just write: SELECT COUNT(*) FROM <table> GROUP BY f1, f2, ..,f4. How to do this in R? Thanks, Nick -- View this message in context: http://www.nabble.com/Group-by-in-R-tp23020587p23020587.html Sent from the R help mailing list archive at Nabble.com.
2009 Aug 13
1
Adding logical vectors
When adding several logical vectors I expect each vector will be coerced to integers and these vectors will then be added. That doesn't always seem to be the case. For example: > ( f1 <- as.factor ( sample ( "x" , 25 , rep = T ) ) ) [1] x x x x x x x x x x x x x x x x x x x x x x x x x Levels: x > ( f2 <- as.factor ( sample ( "y" , 25 , rep = T ) ) )