Displaying 20 results from an estimated 8000 matches similar to: "Help with seting up comparison"
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) {
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
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
2013 Mar 15
1
Reassign values based on multiple conditions
Hi all,
I have a simple data frame of three columns - one of numbers (really a
categorical variable), one of dates and one of data.
Imagine:
collar date data
1 01/01/2013 x
2 02/01/2013 y
3 04/01/2013 z
4 04/01/2013 a
5 07/01/2013 b
The 'collar' is a GPS collar that's been worn by an animal for a certain
amount of time, and then may have been worn by a different animal after
2008 Jul 31
4
Identifying common prefixes from a vector of words, and delete those prefixes
For example, c("dog.is.an.animal", "cat.is.an.animal", "rat.is.an.animal"). How can I identify the common prefix is ".is.an.animal" and delete it to give c("dog", "cat", "rat") ?
Thanks
_________________________________________________________________
[[alternative HTML version deleted]]
2006 Feb 21
4
Models, Helpers, Modules, etc.
Hello,
I am learning rails and ruby and I have some questions about how should I go
about doing certain things.
[1]Many of my models have some functionality which is common, and instead of
duplicating it across models, I want to store it in a single file, and then
import the file into the models. Should I do this using modules, and then store
them in the `lib'' directory? What is the