similar to: How to access a column by its label?

Displaying 20 results from an estimated 50000 matches similar to: "How to access a column by its label?"

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
2006 Dec 09
2
Filtering a data frame by regular expression
Hello, I am having difficulty filtering a data frame. I would like to take all the rows of a data frame where column A contains the regular expression "UTI" (or some other regex). Here's what I've got: utiRE <- function (avector) { occurs <- c() r1 <- "UTI" for (x in avector) { if (!is.na(grep(r1,x,perl=TRUE))) { occurs <- c(occurs, TRUE) } else { occurs
2008 Oct 03
2
suggestions for plotting 5000 data points
Dear all, I have a collection of 5000 entries which represent the evolutionary rates of 3 animals. I would like to show the differences between the rates of all 3 animals and have tried using the function parallel (from the lattice package) and pairs() function. The parallel function would have been perfect save for the large number of data (5000). The pairs() function doesn't show
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
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 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 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){
2020 Jul 22
2
Unlikely branches can have expensive contents hoisted
Hey all - me again, So I'm looking at llvm.expect specifically for branch hints. In the following example LLVM will hoist the pow/cos calls into the entry block even though I've used the llvm.expect intrinsic to make it clear that one of the calls is unlikely to occur. target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple =
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
2008 Jan 14
1
Error in solve.default message using lme
Dear All, I?m using lme to analyze a time series gene expression data. I don?t have all animals in all times, the number of animals in each time is different and I have lots of NA values. An example file can be downloaded at lbmp.fcav.unesp.br/leonardo and the code used is the following: teste<-read.table(file='example.csv',sep=',',header=T) B<-1366 library(nlme)
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 =>
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
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
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
2012 Jun 30
2
Significance of interaction depends on factor reference level - lmer/AIC model averaging
Dear R users, I am using lmer combined with AIC model selection and averaging (in the MuMIn package) to try and assess how isotope values (which indicate diet) vary within a population of animals. I have multiple measures from individuals (variable 'Tattoo') and multiple individuals within social groups within 4 locations (A, B, C ,D) crucially I am interested if there are
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
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 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 <-