similar to: correction to the previously asked question (about mergin g factors)

Displaying 20 results from an estimated 300 matches similar to: "correction to the previously asked question (about mergin g factors)"

2004 Feb 05
2
correction to the previously asked question (about merging factors)
I have two factors l1, l2, and I'd like to merge them. (Remark: The factors can not be converted to charaters) Function c() does not give me the result I want: > l1 = factor(c('aaaa', 'bbbb')) > l2 = factor(c('ccc', 'dd')) > lMerge = factor(c(l1, l2)) > lMerge [1] 1 2 1 2 Levels: 1 2 > I'd like to merge l1 and l2 and to get lMerge
2019 Feb 21
0
model.matrix.default() silently ignores bad contrasts.arg
An lme4 user pointed out <https://github.com/lme4/lme4/issues/491> that passing contrasts as a string or symbol to [g]lmer (which would work if we were using `contrasts<-` to set contrasts on a factor variable) is *silently ignored*. This goes back to model.matrix(), and seems bad (this is a very easy mistake to make, because of the multitude of ways to specify contrasts for factors in R
2019 Feb 21
0
model.matrix.default() silently ignores bad contrasts.arg
On Thu, Feb 21, 2019 at 7:49 AM Fox, John <jfox at mcmaster.ca> wrote: > > Dear Ben, > > Perhaps I'm missing the point, but contrasts.arg is documented to be a list. From ?model.matrix: "contrasts.arg: A list, whose entries are values (numeric matrices or character strings naming functions) to be used as replacement values for the contrasts replacement function and whose
2019 Feb 22
0
model.matrix.default() silently ignores bad contrasts.arg
Dear Martin and Ben, I agree that a warning is a good idea (and perhaps that wasn't clear in my response to Ben's post). Also, it would be nice to correct the omission in the help file, which as far as I could see doesn't mention that a contrast-generating function (as opposed to its quoted name) can be an element of the contrasts.arg list. Best, John > -----Original
2019 Feb 21
2
model.matrix.default() silently ignores bad contrasts.arg
Dear Ben, Perhaps I'm missing the point, but contrasts.arg is documented to be a list. From ?model.matrix: "contrasts.arg: A list, whose entries are values (numeric matrices or character strings naming functions) to be used as replacement values for the contrasts replacement function and whose names are the names of columns of data containing factors." This isn't entirely
2019 Feb 23
1
model.matrix.default() silently ignores bad contrasts.arg
>>>>> Fox, John >>>>> on Fri, 22 Feb 2019 17:40:15 +0000 writes: > Dear Martin and Ben, I agree that a warning is a good idea > (and perhaps that wasn't clear in my response to Ben's > post). > Also, it would be nice to correct the omission in the help > file, which as far as I could see doesn't mention that a
2019 Feb 22
2
model.matrix.default() silently ignores bad contrasts.arg
>>>>> Ben Bolker >>>>> on Thu, 21 Feb 2019 08:18:51 -0500 writes: > On Thu, Feb 21, 2019 at 7:49 AM Fox, John <jfox at mcmaster.ca> wrote: >> >> Dear Ben, >> >> Perhaps I'm missing the point, but contrasts.arg is documented to be a list. From ?model.matrix: "contrasts.arg: A list, whose entries are
2009 Dec 23
1
[LLVMdev] Mergin .bc files
Hello, Two questions: 1. How I can merge a project with several (.bc) files just in one (.bc) file? 2. Is there a more efficient way to do the below procedure (and get the .bc files)? llvm-gcc -static -O3 -emit-llvm aes.c -c -o aes.bc llvm-gcc -static -O3 -emit-llvm aesxam.c -c -o aesxam.bc llvm-ld aes.bc aesxam.bc -o rijndael_llvm -- Juan Carlos -------------- next part -------------- An
2012 Feb 28
1
group calculations with other columns for the ride
Hello, I can get the median for each factor, but I'd like another column to go with each factor. The nm column is a long name for the lvls column. So unique work except for the order can get messed up. Example: x =
2011 Jan 26
1
aggregate(as.formula("some formula"), data, function) error when called from in a function
I'm having a problem with aggregate.formula when I call it in a function and the function is converted from a string in the funtion I think my problem may also only occur when the left hand side of the formula is cbind(...) Here is example code that generates a dataset and then the error. The first function "agg2" fails > agg2(FALSE) do agg 2 Error in m[[2L]][[2L]] : object
2012 Oct 24
1
Getting ordered factor levels from C
I'm working on an R package in C and can't seem to get the same level information about a factor that the R console displays. If I define a factor as: lvls <- factor(c('red','blue','blue','green','red'), c('blue','green','red'), ordered=TRUE) When I get the "levels" attribute in C, I get back the the first
2018 May 17
0
Bilateral matrix
Dear William and Ben, Thank you for your replies and elegant solutions. I am having trouble with the fact that two of the previous locations do not appear in current locations (that is no one moved to OKC and Dallas from other cities), so these two cities are not being included in the output. I have provided a better sample of the data and the ideal output (wide form - a 10x10 bilateral matrix)
2018 May 16
2
Bilateral matrix
xtabs does this automatically if your cross classifying variables are factors with levels all the cities (sorted, if you like): > x <- sample(letters[1:5],8, rep=TRUE) > y <- sample(letters[1:5],8,rep=TRUE) > xtabs(~ x + y) y x c d e a 1 0 0 b 0 0 1 c 1 0 0 d 1 1 1 e 1 1 0 > lvls <- sort(union(x,y)) > x <- factor(x, levels = lvls) > y <-
2005 Jun 26
4
Mixed model
Hi All, I am currently conducting a mixed model. I have 7 repeated measures on a simulated clinical trial. If I understand the model correctly, the outcome is the measure (as a factor) the predictors are clinical group and trial (1-7). The fixed factors are the measure and group. The random factors are the intercept and id and group. I tried using 2 functions to calculate mixed effects.
2010 Aug 15
0
unexpected behaviour with sparse.model.matrix
Hi, I'm trying to get sparse.model.matrix to retain unused levels. I can't seem to get this working through the most obvious routes such as specifying drop.unused.levels = FALSE in the model.frame or trying to pass all levels in xlev,which is an argument to sparse.model.matrix (see code below). Any help would be gratefully received. Cheers, Jarrod fac<-factor(rep(1:10,10),
2008 Apr 22
2
[LLVMdev] The source code Makefile (newbie with pass registering Problem)
Hi!! It's me again. I guess that there is a problem in the Makefile of my source code. But I don't know where. Could you please verify it? The Makefile is written like this: # Makefile for Genetic Algorithm Pass CXXFLAGS = -Wall -I/iss/fpga3/nicole/galib247/ LDFLAGS= -L/iss/fpga3/nicole/galib247/ga/ -lga -Wl,-E # Path to top level of LLVM heirarchy LEVEL=../../../ # Name of the
2001 Nov 06
1
R-devel & ATLAS generates Dr. Watson on NT (was RE: Look, Wa tson! La.svd & ATLAS)
Prof. Bates & R-devel, I've done more test with the following results: I have two versions of ATLAS 3.2.1. One was compiled on my old Thinkpad 600E (PII), the other was compiled on my new Thinkpad T22 (PIIISSE1). I compiled R-devel dated 10/31, 11/01 and 11/04, linked against either of the two ATLAS libs. All gave Dr. Watson when given this code: La.svd(matrix(runif(1e5), 1e3,
2008 Apr 21
1
[LLVMdev] newbie with pass registering Problem
Hi!! This is my first time with llvm. I'm still learning and really need help. I wrote only one Function Pass, which uses another Function Pass (blockNrs), and registered this: RegisterPass<FunctionAnalysis> X("gasched", "Genom Scheduling Pass"); When I compile my sourcecode, everything was okay. But when I tried to test it, i got this error Message: nicole at
2008 Apr 23
0
[LLVMdev] newbie with pass registering Problem
Hi John!! >1) Have you ensured that your passes have different arguments to the = >RegisterPass constructor (i.e., they have different names)? Yes, I only write one Pass (Function Pass) and gave it that one name. >2) Are you sure that variable X is only being defined once? There are = >some ways in which you could have unintentionally defined it twice. For = >example, if you
2008 Apr 26
0
[LLVMdev] The source code Makefile (newbie with pass registering Problem)
Hi Dominic!! Oh thanks for your advice. I'll try it. -nic- > This doesn't directly answer your question, however I'm hoping it might > set someone on the right path to help. I've had problems passing > CPPFLAGS through from my Makefiles to the llvm compile command line. It > seems that anything I set in CPPFLAGS is set in the llvm Makefiles > themselves (seen