similar to: Efficiency of factor objects

Displaying 20 results from an estimated 1000 matches similar to: "Efficiency of factor objects"

2009 May 06
4
tapply changing order of factor levels?
Hi, Does tapply change the order when applied on a factor? Below is the code I tried. > mylevels<-c("IN0020020155","IN0019800021","IN0020020064") >
2003 Oct 02
3
indexing a vector
Dear All: I'd like to know how to sort and then index a vector of floats by several levels in R. For example >x<-rnorm(100) > MyLevels<-quantile(x,probs=c(0,.5,1)) > MyLevels 0% 50% 100% -2.11978442 -0.03770613 2.00186397 next i want to replace each x[i] in x by 1,2,3 or 4 depending on which quantile that x[i] falls. How do I do that in a
2006 Apr 29
1
splitting and saving a large dataframe
Hi, I searched for this in the mailing list, but found no results. I have a large dataframe ( dim(mydata)= 1297059 16, object.size(mydata= 145280576) ) , and I want to perform some calculations which can be done by a factor's levels, say, mydata$myfactor. So what I want is to split this dataframe into nlevels(mydata$myfactor) = 80 levels. But I must do this efficiently, that is, I
2011 Apr 07
1
Assigning a larger number of levels to a factor that has fewer levels
Hello! I have larger and a smaller data frame with 1 factor in each - it's the same factor: large.frame<-data.frame(myfactor=LETTERS[1:10]) small.frame<-data.frame(myfactor=LETTERS[c(9,7,5,3,1)]) levels(large.frame$myfactor) levels(small.frame$myfactor) table(large.frame$myfactor) table(small.frame$myfactor) myfactor has 10 levels in large.frame and 5 levels in small.frame. All 5
2012 Mar 28
1
discrepancy between paired t test and glht on lme models
Hi folks, I am working with repeated measures data and I ran into issues where the paired t-test results did not match those obtained by employing glht() contrasts on a lme model. While the lme model itself appears to be fine, there seems to be some discrepancy with using glht() on the lme model (unless I am missing something here). I was wondering if someone could help identify the issue. On
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",
2010 Jul 05
2
repeated measures with missing data
Dear R help group, I am teaching myself linear mixed models with missing data since I would like to analyze a stats design with these kind of models. The textbook example is for the procedure "proc MIXED" in SAS, but I would like to know if there is an equivalent in R. This example only includes two time-measurements across subjects (a t-test "with missing values"), but I
2012 Jan 18
1
drop rare factors
I have a data frame with some factor columns. I want to drop the rows with rare factor values (and remove the factor values from the factors). E.g., frame$MyFactor takes values A 1,000 times, B 2,000 times, C 30 times and D 4 times. I want to remove all rows which assume rare values (<1%), i.e., C and D. i.e., frame <- frame[[! (frame$MyFactor %in% c("A","B"))]] except
2004 Sep 23
2
How to set up a server compatible with Windows apps ?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ~ I would like to : set up a server on Linux on which my friends can connect with msn or netmeeting, suporting at least sound conferance, and optionally video, but I dont want asterisk server to lock up the sound card; and then, I want to be able to connect that server with a free Linux tool; I had a look at http://www.voip-info.org/wiki-Asterisk but
2010 Sep 05
0
cov.unscaled in NLS - how to define cov.scaled to make comparable to SAS proc NLIN output - and theoretically WHY are they different
I am running a 3-parameter nonlinear fit using the default Gauss-Newton method of nls. initialValues.L = list(b=4,d=0.04,t=180); fit.nls.L = nls( myModel.nlm , fData.L, start = initialValues.L, control = nls.control(warnOnly = TRUE), trace=T ); summary.nls.L = summary(fit.nls.L); I run the same analysis in SAS proc NLIN. proc nlin data=apples outest=a; parms b=4 d=.04 t=180; model Y =
2008 Feb 03
2
alternative for a broken link
Hi all, In the http://wiki.centos.org/FAQ/General page, there is this description: If you need to burn the images with another program (cdrecord on Linux, Nero on Windows, etc.) here is a good reference for burning ISO images: http://www.linuxiso.org/viewdoc.php/howtoburn.html The referenced site does not exist any more. Does anyone know good alternatives? Thanks, Akemi
2016 Jun 28
2
[GSoC 2016] Implementation of the packing transformation
2016-06-27 15:52 GMT+05:00 4lbert C0hen <4lbert.h.c0hen at gmail.com>: > Dear Roman and all, > > Such features would be extremely useful to implement array expansion (scalar > and array renaming, privatization with new subscript expressions of higher > dimension) and storage mapping optimization (generalizing array > contraction). It would be interesting to have these
2011 Mar 30
2
summing values by week - based on daily dates - but with some dates missing
Dear everybody, I have the following challenge. I have a data set with 2 subgroups, dates (days), and corresponding values (see example code below). Within each subgroup: I need to aggregate (sum) the values by week - for weeks that start on a Monday (for example, 2008-12-29 was a Monday). I find it difficult because I have missing dates in my data - so that sometimes I don't even have the
2009 Mar 03
1
repeated measures anova, sphericity, epsilon, etc
I have 3 questions (below). Background: I am teaching an introductory statistics course in which we are covering (among other things) repeated measures anova. This time around teaching it, we are using R for all of our computations. We are starting by covering the univariate approach to repeated measures anova. Doing a basic repeated measures anova (univariate approach) using aov() seems
2016 Jun 29
0
[GSoC 2016] Implementation of the packing transformation
On 06/28/2016 10:53 AM, Roman Gareev wrote: > 2016-06-27 15:52 GMT+05:00 4lbert C0hen <4lbert.h.c0hen at gmail.com>: >> Dear Roman and all, >> >> Such features would be extremely useful to implement array expansion (scalar >> and array renaming, privatization with new subscript expressions of higher >> dimension) and storage mapping optimization (generalizing
2019 Jul 29
2
Efficient way to identify an instruction
Hi Alberto, I have not used this myself, but I think you should be able to visit your Instruction ‘users()’. I think the name this function was given is a bit confusing, but this returns an iterator range you can iterate through to find instructions that depend on a given one. Similarly, you have the function ‘uses()’ that can be used to traverse down the DAG when instructions are still on SSA
2010 Oct 13
5
Poisson Regression
Hello everyone, I wanted to ask if there is an R-package to fit the following Poisson regression model log(\lambda_{ijk}) = \phi_{i} + \alpha_{j} + \beta_{k} i=1,\cdots,N (subjects) j=0,1 (two levels) k=0,1 (two levels) treating the \phi_{i} as nuinsance parameters. Thank you very much -- -Tony [[alternative HTML version deleted]]
2003 Jun 04
2
convert factor to numeric
Hi R-experts! Every once in a while I need to convert a factor to a vector of numeric values. as.numeric(myfactor) of course returns a nice numeric vector of the indexes of the levels which is usually not what I had in mind: > v <- c(25, 3.78, 16.5, 37, 109) > f <- factor(v) > f [1] 25 3.78 16.5 37 109 Levels: 3.78 16.5 25 37 109 > as.numeric(f) [1] 3 1 2 4 5 > What I
2012 Oct 03
2
[LLVMdev] [RFC] OpenMP Representation in LLVM IR
Hal, > While I think that it will be relatively easy to have the intrinsics > serve as code-motion barriers for other code that might be threads > sensitive (like other external function calls), we would need to think > through exactly how this would work. The easiest thing would be to make > the intrinsics have having unmodeled side effects, although we might > want to do
2009 Mar 03
1
[LLVMdev] One way to support unwind on x86
Hi Bjarke, Bjarke Walling wrote: > I see. So you check this value stored in a thread-local variable after > each call? And you lower invoke to a call and branch with regard to > this value? > Yes, that's correct. > What are these sophisticated techniques you are talking about? My time > frame for implementing this is, not unlimited, but fairly long. Less > than a