Displaying 20 results from an estimated 20000 matches similar to: "Strange assignment bug (PR#1450)"
2010 Nov 25
1
difficulty setting the random = argument to lme()
My small brain is having trouble getting to grips with lme()
I wonder if anyone can help me correctly set the random = argument
to lme() for this kind of setup with (I think) 9 variance/covariance
components ...
Study.1 Study.2 ...
Study.10
Treatment.A: subject: 1 2 3 4 5 6 etc. 28 29 30
Treatment.B: subject: 31
2010 Jun 07
1
Help with seting up comparison
Hi,
I tried on this, but couldn't figure it out:
Suppose I have a dataframe as follows:
dat <- data.frame(Day=rep(rep(c(1,2), each=4),2), Animal = rep(c(1,2),
each=8), Count=c(rnorm(8, 100), rnorm(8,90)))
2 animals are being examined on 2 different days. Count is the result.
Now I need to point out whether or not there is a difference between the
days.
I did this by an ANOVA test, while
2001 Jul 26
6
replacing values in a vector
Hi all,
there is a vector v with several NAs. I want to create a new vector n of
the same length as v and the same NAs as in v and tried this:
n <- vector(length=length(v), mode="numeric")
replace(n, which(is.na(v)), NA)
but this does't work, all values in n are 0. What went wrong?
Thanks, Sven
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
2013 Feb 27
1
metafor - interpretion of QM in mixed-effects model with factor moderator
Hi,
I'm using metafor to perform a mixed-effects meta-analysis. I'd like to
test whether the effect is different for animals and plants/whether "group"
(animal/plant) influences the effect size, but am having trouble
interpreting the results I get. I've read previous posts about QM in
metafor, but I'm still a bit confused. I've dummy-coded the factors:
2006 Jan 01
3
Single Table inheitance doesn''t show subclasses ?
Hi, I am a Rails noob.
Suppose you have:
---
class Animal < ActiveRecord::Base
end
class Mammal < Animal
end
class Cow < Mammal
end
---
I provide Animal,Mammal and Cow controllers with the scaffolding, just
to test and to fill up the Animal table. I can see the "type" column
getting it''s value set with the class name.
So far, soo good.
Now, since listing Animals
2009 Mar 21
2
limiting simulated animal movement
Hi,
I am trying to simulate animal movement in a gridded landscape made up of
cells. At each time step (iteration), the animal moves from one cell to
another in a random fashion.
This is how I am simulating movement, where a and b are the x,y co-ordinates
of the animal at the previous time step:
for (i in 1:no.of.steps){
direction <- sample(1:8, 1)
if(direction == 1){
a <- a
b <- b -
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
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
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
2009 Oct 19
3
routing namespaced controllers
Hi,
I have one controller in the /app/controllers/animals_controller.rb
directory, and another in
/app/controllers/production/services_controller.rb. The thing is that
one Animal has many Services, and i''d like to access to them using
something like:
http://localhost:3000/animals/1/production/services/1
or at least with:
http://localhost:3000/animals/1/services/1
I tried the last one
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 <-
2009 Jan 30
2
Subsetting without partial matches
I have a list of observations of individuals. I would like to make a
list of individuals, with a data frame of observations for each individual.
The following code usually works, but not always
----------------------------------------------------------------------
# Make a list of empty data frames
animals = list()
indivs = levels(Z$individual_id)
donotprint <- sapply(indivs, function(i){
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
2005 Jul 21
3
vectorising ifelse()
Hi All,
is there any chance of vectorising the two ifelse() statements in the
following code:
for(i in gp){
new[i,1] = ifelse(srow[i]>0, new[srow[i],zippo[i]], sample(1:100, 1,
prob =Y1, rep = T))
new[i,2] = ifelse(drow[i]>0, new[drow[i]>0,zappo[i]], sample(1:100,
1, prob =Y1, rep = T))
}
Where I am forced to check if the value of drow and srow are >0 for each
line... in
2010 Mar 25
2
Basic graphs: something like groups, but where each plot has independent axis?
I am trying to graph weight data for our colony. We a data frame with
Animal, Weight and Date. I'd like to display this data a series of simple
xyplots. We only need to display these plots together, we do not need to
make comparisons between animals. Each animal has been weighted over a
different time period, so we do not want the same range for each X axis.
Using the following, I can
2012 May 16
1
clusters in zero-inflated negative binomial models
Dear all,
I want to build a model in R based on animal collection data, that look like the following
Nr Village District Site Survey Species Count
1 AX A F Dry B 0
2 AY A V Wet A 5
3 BX B F Wet B 1
4 BY B V Dry B 0
Each data point shows one collection unit in a certain Village, District, Site, and Survey for a certain Species. 'Count' is the number of animals collected in that
2011 Sep 28
3
Plotting Lines Through multiple groups
Hi I have data in the following format
Cort Day Animal
23 0 1
27 3 1
24 0 2
27 1 2
34 2 2
30 3 2
24 4 2
20 0 3
24 1 3
28 2 3
34 4 3
etc.
It is measured across time(day) however no every individual is measured the
same number of times. All I want to do is plot the Raw data and then run a
line connecting the
2004 Jul 05
1
date Axes and formats in lattice plots
All,
I have some data of animal movements that I'm plotting using xyplot() from lattice. I want to have the date (class POSIXct object) on the Y-axis and the animals longitude on X-axis.
Eg.
xyplot(date ~ longitude, groups = animal, data = my.data)
with data like:
animal ptt year month day lon date
125 03P0014 13273 2003 7 10 150.38 2003-07-10 14:03:48
126
2011 Nov 18
1
cca with repeated measures
Dear all,
How can I run a constrained correspondence analysis with
the following data:
15 animals were measured repeatedly month-wise (over to 2 years)
according to ther diet composition (8 food categories).
our data.frame looks like this:
food 1 2 ... 8 sex season year animal
freq 12 8 ... 1 0 summer 2011 1
freq 0 7 ... 0 1 winter 2011 1
...
freq 0 7 ... 0 1 spring 2011 15
We