search for: year

Displaying 20 results from an estimated 39074 matches for "year".

Did you mean: near
2007 Oct 26
1
[Fwd: Re: subsetting]
Sorry that I was unclear. For an individual to qualify for my analysis I want both of the following two criteria to be fulfilled: First, I want to select measurement taken at a certain age: for the focal individual the year of measurement (year) should be the same as year.hatch Second, I want the focal individual to be born by a mother that reproduces for the first time. So the /parents /of the focal individual should have year == year.1st.reprod. The problem for me, I think, is that in my data set with several g...
2006 Nov 20
1
sem package subscript out of bounds error
...tried this with simpler version of the below model, and keep getting the same error. What does this error mean? Below is the full code, but I've tried this with all sorts of subsets of the model, making sure to keep all of the proper error terms. --- fish.invert.data<-data.frame(Prev.Year.Predatory.Invert.Abundance, Prev.Year.Predatory.Fish.Abundance, Predatory.Invert.Abundance, Predatory.Fish.Abundance, Prev.Year.Herbivorous.Invert.Abundance, Prev.Year.Herbivorous.Fish.Abundance, Herbivorous.Invert.Abundance, Herbivorous.Fish.Abundance,...
2004 Jun 16
3
Aggregating on Water Year Rather Than Calendar Year
The US water year extends from 01 October yyyy-1 through 30 September yyyy and is referenced by the year starting on the included 01 January yyyy. I'd like to be able to find the annual means for the water year. To do so I've taken the input date-time, which is in the usual format "1991-10-07 10:3...
2009 Mar 06
1
Interpreting GLM coefficients
Hi all, I?m fitting GLM?s and I can?t interprete the coefficients when I run a model with interaction terms. When I run the simpliest model there is no problem: Model1<-glm (Fishes ~ Year + I(Year^2) + Kind.Geographic + Kind.Fishers + Zone.2 + Hours + Fishers + Month, family = poisson(log)) # Fishes, Year, Hours, and Fishers are numeric, Kind.Geographic, Kind.Fishers, Zone.2 and Month are factors with 4, 3, 5 and 12 levels respectively. Model1$coefficients (whith Helmert co...
2006 Apr 25
2
School Years/Teams listing problem
People, I have tables years and teams and I have the years listing like: 1965 1966 1967 . . I want to be able to click on the year and ONLY list teams for that year. At first I thought the following was working until I started populating the table with teams for more than one year. For views/years/list.rhtml: <% for...
2018 Feb 21
7
alternative for multiple if_else statements
...g the way it is, it may be my code or the way the data is structured. Below is a snapshot of a database am working on and it represents a longitudinal survey of study participants in a trial with weekly follow up. The variable "survey_start" represents the start of the study-defined one year follow up (which we called "survey_year"). I am trying to populate all subsequent entries for each participant, per survey year, with the entry "survey" followed by an underscore and the respective year, eg. survey_2014. There are missing entries such as the participant repres...
2010 May 19
8
Generating all possible models from full model
...els or have made a mistake somewhere. It is also difficult to alter models if I want to change a term. For example, below are the set of models I would like to run. Is there a way to specify the full model and have R generate the rest? I.e. specify m1234567<-glm.convert(glm.nb(mantas~site*year+cosmonth+sinmonth+coslunar+sinlunar+plankton, data=mydata)) and have R run all the other models. library(MASS) #Intercept only m0<-glm.convert(glm.nb(mantas~1,data=mydata)) #One term - 7 models #Manta abundance is greater at one of the two sites m1<-glm.convert(glm.nb(mantas~site,...
2020 Oct 06
2
Version controlled (git) Maildir generated by Dovecot
..." (version 2.3.4.1) on Debian 10. One of a few configurations I made is to use Maildir: # grep '^mail_location = ' /etc/dovecot/conf.d/10-mail.conf mail_location = maildir:~/Maildir I successfully moved some e-mails (at this moment it's just a test) to subfolders that describe a year of the backup. I'd like to start using git on the whole Maildir. After going through the Maildir directory and subdirectories I realized that Dovecot saves some extra files that I might not need to backup (version control). Based on my understanding and after reading https://wiki.dovecot.org/...
2009 Nov 05
3
performing operations on a dataframe
Hey all, I feel like the solution to this problem should be relatively simple, but for some reason I can't find answers or come up with my own solution. Given the dataframe: (SpA and SpB not important, want to look at distribution of cooccurance for each year) Year SpA SpB Coocc 2000 0 2000 2 2000 1 2001 8 2001 2 2001 0 2001 0 2002 1 2002 2 How can I apply different functions to the Coocc of each year? (Note: Different lengths for each year, ie, length(Year==2000)!=length(Year==2001)) For example, if Year==2000, function(x) x/146; if Year=200...
2013 Jan 22
2
Creating a Data Frame from an XML
...d information from an XML into a data frame in R using the "XML" package. I am unable to get the data into a data frame as I would like. I have some sample code below. *XML Code:* Header... Data I want in a data frame: <data> <row BRAND="GMC" NUM="1" YEAR="1999" VALUE="10000" /> <row BRAND="FORD" NUM="1" YEAR="2000" VALUE="12000" /> <row BRAND="GMC" NUM="1" YEAR="2001" VALUE="12500" /> <row BRAND="FORD" NUM="1&qu...
2017 Jul 09
0
Histogram plots in Lattice with spatialgrid dataframe data
...as2010) yr_2011<-data.frame(bias=ann_bias$bias2011) yr_2012<-data.frame(bias=ann_bias$bias2012) yr_2013<-data.frame(bias=ann_bias$bias2013) yr_2014<-data.frame(bias=ann_bias$bias2014) yr_2015<-data.frame(bias=ann_bias$bias2015) yr_2016<-data.frame(bias=ann_bias$bias2016) yr_1997$year<-'1997' yr_1998$year<-'1998' yr_1999$year<-'1999' yr_2000$year<-'2000' yr_2001$year<-'2001' yr_2002$year<-'2002' yr_2003$year<-'2003' yr_2004$year<-'2004' yr_2005$year<-'2005' yr_2006$year<-'20...
2008 Jan 23
3
How to do more advanced cross tabulation in R?
Hi, I am trying to reproduce some functionalities of Excel pivot table in R, sadly, I couldn't figure out how to do it. I am wondering if this is even possible in R. Does anyone know? Here is an example: year=rep(2003,16) quarter=rep(1:4,each=4) sales=1:16 company=rep(c("a","b","c","d"),4) df=data.frame(year,quarter,sales,company) #this is the database I would like to construct a cross tabulation table like this: 2003 #a row of year(s) 1 2 3...
2007 Oct 25
1
subsetting
Dear all, I have received some data on birds that looks sth like this: # a unique id for each individual id <- c(1,1,1,2,2,2,3,3,3,4,4,5,6) # the year the bird was measured year <- c(1995, 1996, 1997, 1995, 1996, 1997, 1996, 1997, 1998, 1996, 1997, 1997, 1998) # the year the bird was hatched year.hatch <- c(1995, 1995, 1995, 1995, 1995, 1995, 1996, 1996, 1996, 1996, 1996, 1997, 1998) # the year when the bird reproduced the first time (for...
2017 Jul 09
2
Histogram plots in Lattice with spatialgrid dataframe data
...1),main="NOAA/NWS OHRFC Stage-3/MPE Precipitation Estimate Bias with respect to PRISM\n1997 - 2016") Which works... I can also do histogram(ann_bias$bias1997), which works too. I have also created a 'time-series' of boxplots successfully with these data as well... But if I try: year<-c('1997','1998','1999','2000','2001','2002','2003','2004','2005','2006','2007','2008','2009','2010','2011','2012','2013','2014','2015','201...
2017 Jul 10
1
Histogram plots in Lattice with spatialgrid dataframe data
...asNNNN columns, which is not the usual case). There are a number of ways to achieve the reshaping of your ann_bias data frame that are less painful than your approach. For example, the base R "stack" function: bias2 <- stack( ann_bias ) names( bias2 ) <- c( "bias", "year ) levels( bias2$year ) <- sub( "bias", "", levels( bias2$year ) ) Or... if you are willing to venture into the tidyverse... library(dplyr) library(tidyr) bias3 <- ( ann_bias %>% gather( year, bias ) %>% mutate( year = factor( sub( "bias&qu...
2011 Jan 31
1
leap year and order function
im trying to write a for loop so that every leap year, the number of days becomes to 366 instead of 365. could someone help me out? and also, this set of data has 99.99s I set all the 99.99 ==NA. however, when im doing the order function to find the max value of that year, it still reads 99.99 as the max value. Thank you very much maxday <- matrix...
2012 Jan 30
1
Linear Mixed Model set-up
Hello, I have some data covering contaminant concentrations in fish over a time period of ~35 years. Each year, multiple samples of fish were taken (with varying sample sizes each year). Ultimately, I want an estimation of the variance between years, and the variance within years + random effects. I used a linear mixed model to estimate these variances, but after reading a number of different...
2011 Jun 21
2
Tricky (?) conversion from data.frame to matrix where not all pairs exist
Dear expeRts, In the minimal example below, I have a data.frame containing three "blocks" of years (the years are subsets of 2000 to 2002). For each year and block a certain "value" is given. I would like to create a matrix that has row names given by all years ("2000", "2001", "2002"), and column names given by all blocks ("a", "b",...
2006 May 08
2
Creating a "Foo has_many bars" association where bar isn''t a model.
Hi Let''s say we have model Foo. Each Foo instance can have several bars. Those bars are primitive, so they shouldn''t be models. For example, Foo might be a type of convention, and the bars might be years the convention was held in. Naively, we would have a conventions_years date, and put: has_many :years inside class Convention. But then we''d get an error, since for has_many to work, there must be a Year model. Which is silly: why would we have a Year model, then get the actual year by...
2012 Dec 01
1
reading json tables
...in both RJSONIOIO and RJSON packages, but they require that the lines be pre-parsed somehow in ways I don't understand. Can someone help? > wheat <- readLines("http://mbostock.github.com/protovis/ex/wheat.js") > str(wheat) chr [1:70] "var wheat = [" " { year: 1565, wheat: 41, wages: 5 }," ... > The wheat.js file looks like this and defines two tables: wheat and monarch: var wheat = [ { year: 1565, wheat: 41, wages: 5 }, { year: 1570, wheat: 45, wages: 5.05 }, { year: 1575, wheat: 42, wages: 5.08 }, { year: 1580, wheat: 49, wage...