similar to: Adding logical vectors

Displaying 20 results from an estimated 30000 matches similar to: "Adding logical vectors"

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
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
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 =
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
2009 Jul 01
1
How should I denormalise a data frame list of lists column?
Hi, I have a data frame where one column is a list of lists. I would like to subset the data frame based on membership of the lists in that column and be able to 'denormalise' the data frame so that a row is duplicated for each of its list elements. Example code follows: # The data is read in in this form with the c2 list values in single strings which I then split to give lists: > f1
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
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,
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,
2007 Apr 11
1
creating a path diagram in sem
Hello, I finally run my measurement model in sem - successfully. Now, I am trying to print out the path diagram that is based on the results - but for some reason it's not working. Below is my script - but the problem is probably in my very last line: # ANALYSIS OF ANXIETY, DEPRESSION, AND FEAR - LISREL P.31 library(sem) # Creating the ANXIETY, DEPRESSION, AND FEAR intercorrelation matrix
2012 Nov 24
1
Adding a new variable to each element of a list
Hello, I have a list of data with multiple elements, and each element in the list has multiple variables in it. Here's an example: ### Make the fake data dv <- c(1,3,4,2,2,3,2,5,6,3,4,4,3,5,6) subject <- factor(c("s1","s1","s1","s2","s2","s2","s3","s3","s3",
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,
2008 Nov 10
1
Remove empty levels in subset
Hi, when I use use subset in a data.frame, all empty levels are maintained in the new table. > test <- data.frame(a=as.factor(rep(c("f1","f2","f3"),10)),b=rep(c(1,2,3),10)) > summary(test) a b f1:10 Min. :1 f2:10 1st Qu.:1 f3:10 Median :2 Mean :2 3rd Qu.:3 Max. :3 > test2 <-
2005 Feb 14
1
corrupt data frame: columns will be truncated or padded with NAs in: format.data.frame(x, digits = digits)
Hello! I posted on saturday mail with the same subject on r-help seeking for help in my work, but now I realized that this list is more appropriate for this. I think I found I bug. Bellow are comments and reproducible examples: # Create a data frame (tmp <- data.frame(y1=1:4, f1=factor(c("A", "B", "C", "D")))) y1 f1 1 1 A 2 2 B 3 3 C 4 4 D #
2005 Feb 14
1
corrupt data frame: columns will be truncated or padded with NAs in: format.data.frame(x, digits = digits)
Hello! I posted on saturday mail with the same subject on r-help seeking for help in my work, but now I realized that this list is more appropriate for this. I think I found I bug. Bellow are comments and reproducible examples: # Create a data frame (tmp <- data.frame(y1=1:4, f1=factor(c("A", "B", "C", "D")))) y1 f1 1 1 A 2 2 B 3 3 C 4 4 D #
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
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
2013 Jan 23
1
Arguments passing through dot-dot-dot lose ability to check for missing()?
Hi R-devel. Is the following behavior in g1() and h1() expected? It seems to make "..." arguments work slightly differently from named arguments. #missing() has the property that it looks "up the chain" #for example, "z" can be missing in f3 even if #that argument did have a name ("y") in f2 f1 <- function(x, ...) { cat("In f1, missing(x) is
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