similar to: Subsetting without partial matches

Displaying 20 results from an estimated 1000 matches similar to: "Subsetting without partial matches"

2011 Dec 27
2
How to create a loop and then extract values from the list generated by cor.test
Dear all, I would like to conduct a Pearson's correlation using cor.test separately for each individual in my data set. Each individual has nine observations of the measurement variable 'Delta13C'. I can figure our how to do it manually one 'Individual_ID' at a time, but I cannot figure out how to automate the process (a loop I am guessing). In addition, I would like to
2011 Dec 28
2
convert variable types when creating data frame from cor.test results
Dear list, The below dataset and code creates a new dataset with the results from the function cor.test being performed on each individual ('Individual_ID') from my original dataset. How do I convert each variable from the cor.test results to a numeric data type, as it is passed into the new dataframe? For example, 'estimate', 'p.value', and 'conf.int' should be
2011 Dec 19
1
calculating correlation coefficients on repeated measures
Dear list, I have 9 repeated measures (measurement variable == 'Delta13C') for individuals (ID variable == 'Individual_ID'. Each repeated measure is "indexed" (right term?) by the variable 'FeatherPosition' and given as c('P1', 'P2', 'P3', 'P4', 'P5', 'P6', 'P7', 'P8', 'P9'). I would like to
2011 Dec 18
1
Identifying records with the correct number of repeated measures
Dear list, I have a dataset where we sampled multiple individuals either 1 or 9 times. Our measurement variable is 'Delta13C' (see below sample dataset). I cannot figure out how to efficiently use a vector command (preferably) or a loop to create a new vector of the names of the individuals sampled 9 times. Note that the 'FeatherPosition' variable will only be "P1" for
2009 Apr 20
1
doing zero inflated glmm for count data with fmr
Hello R users, Doing My PhD I collected count data which I believe is zero inflated. I have run a statistical model with lmer and family=poisson and got summary(model)@sigma=1 so I believe there is no overdispertion. I would like to use the fmr function from the 'gnlm' library but I just cannot figure out from the examples in the help page and some forums out there how to convert the lmer
2013 Apr 07
3
mlogit error
Dear List I am trying to fit a multinomial model using the mlogit package. Attempting to load the data into mlogit presents the following error. MLOG<-mlogit.data(Mult3,shape="long",choice="CHOICE",alt.var="mode.ids",indivs = "set3",chid.var = "obs") Error in `row.names<-.data.frame`(`*tmp*`, value = c("1.1", "1.2",
2007 Apr 06
0
translating sas proc mixed to lme()
Hi All I am trying to translate a proc mixed into a lme() syntax. It seems that I was able to do it for part of the model, but a few things are still different. It is a 2-level bivariate model (some call it a pseudo-3-level model). PROC MIXED DATA=psdata.bivar COVTEST METHOD = ml; CLASS cluster_ID individual_id variable_id ; MODEL y = Dp Dq / SOLUTION NOINT; RANDOM Dp Dq / SUBJECT = cluster_ID
2012 Oct 28
6
Having some Trouble Data Structures
Hi All, I'm trying to run a simulation of host-pathogen evolution based around individuals. What I need to have is a dataframe or table of some description - describing all the individuals of a pathogen population (so far I've implemented this as a matrix): ID No_of_Effectors Effectors (Sequences) [1,] 0001 3 ## 3
2008 Jan 15
1
Population model question
Hi all, I have a population in which I want to follow living and dead animals through time ( 1 simulation, 100 years). I have created 2 arrays for living and dead animals In the starting population there are, say, 500, animals To determine whether each of these animals survives to a following age-class, a uniformal chance is generated, resulting in "TRUE" if the animal lives, or
2011 Jul 17
3
gsub() with unicode and escape character
Dear helpers, I'm trying to replace a character with a unicode code inside a data frame using gsub(), but unsuccessfully. > data.frame(animals=c("dog","wolf","cat"))->my.data > gsub("o","\u0254",my.data$animals)->my.data$animals > my.data$animals [1] "d??g" "w??lf" "cat" It's not that a data
2012 Apr 11
3
Question on Counting Factors
Hi, I hope this is not too trivial, but I've had this recurring problem and I think there is super easy solution, just not sure what it is. Please see short example below. ?I would like to get the frequency (counts) of all the variables in a single column (that is easy), but I would also like to return the value 0 for the absence of variables defined in another column. For example: animals
2010 Mar 18
2
Pedigree / Identifying Immediate Family of Index Animal
I have a data frame containing the Id, Mother, Father and Sex from about 10,000 animals in our colony. I am interested in graphing simple family trees for a given subject or small number of subjects. The basic idea is: start with data frame from entire colony and list of index animals. I need to identify all immediate relatives of these index animals and plot the pedigree for them. We're
2007 Mar 27
1
REST rspec_generator
Is there some reason that the rspec resource generator produces code like this: context "Routes for the AnimalsController should map" do controller_name :animals specify "{ :controller => ''animals'', :action => ''index'' } to / animals" do route_for(:controller => "animals", :action =>
2002 Apr 10
3
Strange assignment bug (PR#1450)
Dear bugs @r; The following reproduces erroneous results on my system using R-gui: platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 4.1 year 2002 month 01 day 30 language R ##################################################### inter.gp.effect <- 0.1 animals <- data.frame(pos = 0:2) SI.model <- function(Animal.group) {
2012 May 15
9
help
1. Emma is performing an experiment that requires individual handling of some animals. The sizes of the animals are lognormally distributed: The natural logarithms of their sizes has a normal distribution with mean 3 and standard deviation 0.4. The time (in minutes) it takes to handle each animal is given by 10 + s · 1.5 + eε for animals with s ≤ 20 20 + s · 0.8 + eε for animals with s > 20
2005 Aug 10
2
Treatment-response analysis along time
Dear R people, I wonder if you could give me a hand with some of my data. I have a very typical analysis in biology, however it is difficult for me to find the right way to analyse. I had a group of animals, I gave them a treatment, and I measure a variable along time -one??s per day- along 5 days,for example(fake data): Animals Time1 Time2 Time3 Time4 1 1 5 3
2006 Apr 22
4
Slice and dice plugin
I''ve been playing around with some easier ways of specifying conditions in active record, and have come up with a little plugin that some may find useful. Currently active record finder and calculations methods can take a :conditions option with a string or array listing some sql conditions, eg: Animals.find :first, :conditions => "name = ''Tiger''" My
2006 Aug 03
2
How to access a column by its label?
Hi all, Is there any way to access a column of a data frame by its label (title) rather than its column index? For example, I'd like to be able to select animals[,"weight"] rather than animals[,3], if the third column of the "animals" data frame has the label "weight". Thank you! [[alternative HTML version deleted]]
2006 Oct 19
2
Getting group size in a data frame
Hi all, I have a data frame with some measured values of some animals. Sometimes the measurement failed, resulting in a NA for a measurement and sometimes the animal died, resulting in NA for all measurements. I have several groups of animals. How do I find the size of each group with only alive animals? And how do I find the size of the groups for each measurement? An example: l1 <-
2011 Mar 31
3
Create Variable names dynamically
Hi, I want to create variable names from within my code, but can't find any documentation for this. An example is probably the best way to illustrate. I am reading data in from a file, doing a bunch of stuff, and want to generate variables with my output. (I could make a "list of lists" and name all the elements, but I really want separate variables.) ################# #This is