search for: daylength

Displaying 6 results from an estimated 6 matches for "daylength".

2013 Dec 02
1
Days to solstice calculation
...and 2007. This was not the case, the solstice should vary by one day between these years. Code is provided below and any help is appreciated. Patrick ps. apologies to you southern ducks your summer and winter solstices are reversed of my code nomenclature. I'm working with a northern dataset. Daylength <- function(J,L){ #Amount of daylight #Ecological Modeling, volume 80 (1995) pp. 87-95, "A Model Comparison for Daylength as a Function of Latitude and Day of the Year." #D = Daylight length #L = Latitude in Degrees #J = Day of the year (Julian) P <- asin(.39795*cos(.2163108 + 2*ata...
2008 Sep 29
1
Simple question about extracting a subset of data
Hello all, I have a (hopefully) simple question. If I have a data table (named "x") such as this: daylengthleavesflowering.datefruits LD1.90055581.64353250.76668986 LD-0.9399410-1.2592968-0.60141837 LD1.0222946-0.9697459 -0.60141837 SD-0.2668132-0.9697459-0.47363322 SD -1.5892393-0.70540660.66469785 SD -0.5222961-0.7054066-0.10701187 How do create a new data table that contains, e.g., only the long-day...
2013 Mar 28
1
make R program faster
...on algorithmus that calculates day wise values (values are depenend from the output of the day before). First I create a data.frame with NAs. Finally each row contains the daily values. output <- as.data.frame(matrix(nrow = 365, ncol = 50)) for (day in (1:365)) { ... r <- list(Date=d,daylength=daylength,TempSum=tempsum, ...) output[day,] <- r } Is there an better (faster) way to do such things in R? Greetings Christof
2009 Feb 18
1
using stepAIC with negative binomial regression - error message help
...re, barometric pressure), and tides (dummy variables for high, falling, low, and rising).  So predictors are binary, categorical, and continuous variables.  I ran glm.nb to fit my full model containing all first order terms.  The model I ran was: glm.nb.full<glm.nb(mantas~site+year+cosday+sinday+daylength+lunarpercent+sstmean+sststd+ sshmean+sshstd+cosdir+sindir+spd+temp+alt+tideht+high+falling+low+plankton)   However, when I use stepAIC on the model I get the message:   > stepAIC(glm.nb.full) Start:  AIC=19240.46 mantas ~ site + year + cosday + sinday + daylength + lunarpercent +     sstmean +...
2009 Feb 19
0
using stepAIC with negative binomial regression - error message
...ot; but that didn't seem to help.  I didn't know of the na.omit function.  It made it much easier to get rid of all the missing values in the file, and now the regression model is running. I hadn't put interactions in the model yet since it wasn't even running.  Cosday, sinday, and daylength are strongly collinear.  The full model with interactions keeps all three in, plus all interactions between them. Thanks for your help! Tim [[alternative HTML version deleted]]
2008 Oct 15
0
R-help Digest, Vol 67, Issue 31
...] Simple question about extracting a subset of data To: R Help <r-help at r-project.org> Message-ID: <192025.49678.qm at web110113.mail.gq1.yahoo.com> Content-Type: text/plain Hello all, I have a (hopefully) simple question. If I have a data table (named "x") such as this: daylengthleavesflowering.datefruits LD1.90055581.64353250.76668986 LD-0.9399410-1.2592968-0.60141837 LD1.0222946-0.9697459 -0.60141837 SD-0.2668132-0.9697459-0.47363322 SD -1.5892393-0.70540660.66469785 SD -0.5222961-0.7054066-0.10701187 How do create a new data table that contains, e.g., only the long-day...