search for: doy

Displaying 20 results from an estimated 123 matches for "doy".

Did you mean: do
2005 Oct 06
5
Interpolation in time
Can anybody help me write a code on the following data example, which fills out all NA values by using a linear interpolation with the two closest values? Doy is day of year (%j). Code example: yr<-c(rep(2000,14)) doy<-c(16:29) dat<-c(3.2,NA,NA,NA,NA,NA,NA,5.1,NA,NA,NA,NA,NA,4.6) ta<-cbind(yr,doy,dat) ta yr doy dat [1,] 2000 16 3.2 [2,] 2000 17 NA [3,] 2000 18 NA [4,] 2000 19 NA [5,] 2000 20 NA [6,] 2000 21 NA [7,]...
2010 Feb 15
2
Confidence intervals nls
Dear All I am quite new to R and would appreciate some help fitting 95% confidence intervals to a nls function. I have the data DOY CET 90 5.9 91 8 92 8.4 93 7.7 95 6.6 96 6.8 97 7.1 98 9.7 99 12.3 100 12.8 102 11 103 9.3 104 9.8 105 9.9 107 7.7 110 6.2 111 5.9 112 5.9 113 3.4 114 3.5 116 3.3 117 5.4 118 6.3 119 9.7 120 11.2 121 7.3 124 7.8 etc I am trying to use some code that has been previously posted on the help bo...
2005 Sep 12
2
barplot with multiple columns
I have a large dataset looking like this (as an example): doy<-c(178,179,180,181,182,183,184,185,186,187,188) s1<-c(0 , 0, 2.4 , 0 , 3.34 , 0 , 5.34 , 0 , 0 , 0 , 6.9) s2<-c(0 , 9.72, 0, 10.56 , 2.67 , 0 , 6.45 ,0 , 0 , 9, 3.6) dat<-cbind(doy,s1,s2) dat I need to make a barplot where the two time series s1 and s2 are plottet beside each othe...
2010 Aug 27
3
interpreting date-related error message
Hello, helpeRs, I have a vector of numbers from 1-365 (days of the year) that I would like to convert to a date. There are no NA's and no missing values. I did not insert leading zero's for numbers less than 100. Using the syntax: dat$doy.1 <- as.numeric(format(dat$doy, "%j" )) I get the following error message: Error in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, : invalid 'trim' argument .What is the error message telling me? (Windows OS and R 2.11.1) Thank you. Toby
2011 Oct 17
2
how to use 'which' inside of 'apply'?
Hello R-community, I am trying to populate a column (doy) in a large dataset with the first column number that exceeds the value in another column (thold) using the 'apply' function. Sample data: pt D1 D17 D33 D49 D65 D81 D97 D113 D129 D145 D161 D177 D193 D209 D225 D241 D257 1 39177 0 0 0 0 0 0 0 0 0.43...
2004 Oct 26
1
2nd Y-axis text problem
...ppear on a second y axis....because this can only be done within a plot statement and my attempts to add the label as text didn't work because the "locator" refers to the plot area.... Any thoughts greatly appreciated. Thanks in advance, Sion >par(mai=c(1,1,1,1.5)) >plot(time[DOY<230],Hmeas[DOY < 230],ylab=expression(paste("Fluxes, W",m^-2)),xlab="Time of Day, hours",ylim=c(-100,500),typ="l",lty=1,lwd=1,col=1,axes=F) >axis(2,at=c(-100,0,100,200,300,400,500),tick=T) >axis(1,at=c(0,6,12,18,24),tick=T) par(new=T) >plot(time[DOY&lt...
2012 Mar 29
1
Error: argument of length 0
...all years set to 366 days), region 1, region 2... region N columnID <- region # +2 numberFires is the number of fires that occurred in the region (the code assures there are more than 0 fires) years is a vector of fire years as pertains to each fire counted in numberFires explanatory.variables$DOY is a vector of Day-of-Year for each fires start day code: #Read FM100 file if (REGION_SCALE == "psa"){FM100<-read.csv("climaggregates/fm100_psa.csv", header=FALSE,col.names=c("year","day",psa$OBJECTI...
2011 Mar 14
0
selection of hinge function with restrictions, machine learning, earth package,
On 2011-01-27 14:22, Rasti Matus wrote: > I have a few questions regarding machine learning packages in R, > e.g. earth package ... > > 1) How could I force the algorithm to generate knots only with > values < 90 for variable doy? Not possible in the current implementation. In principle it would be possible to extend earth so the user-defined "allowed" function includes a knot parameter. But internally in earth's C code, the search for knots is highly optimized and any extra code in there to possibly call a...
2011 Jan 27
0
selection of hinge function with restrictions, machine learning, earth package,
Hi, I have a few questions regarding machine learning packages in R, e.g. earth package and its forward pass and prunning pass, and hinge functions selection in the example below. 1) How could I force the algorithm to generate knots in hinge function only with values < 90 for e.g. variable doy? 2) Is it possible to restrict the algorithm to generate maximum number of terms per a selected variable e.g. humidity? e.g. 1 term instead of 2? Thanks a lot. rasti >library(faraway) >data(ozone) >a=earth(O3~.,data=ozone) >summary(a) Call: earth(formula=O3~., data=ozone)...
2012 Nov 05
1
Post hoc tests in gam (mgcv)
Hi. I'm analysing some fish biological traits with a gam in mgcv. After several tries, I got this model log(tle) = sexcolor + s(doy, bs = "cc", by = sexcolor) +log(tl) sexcolor is a factor with 4 levels doy is "day of year", which is modeled as a smoother tl is "total length of the fish" The summary of this models is (only parametric coefficientes): Parametric coefficients:...
2012 Nov 01
2
Name assignment in for loop
...current loop syntax. The use of dat and dat2 is not an error. I'm pulling data from 2 sources for the model. for (i in 1:dim(dat2)[[1]]) { assign("modelb",i) <- lm(log(dat$flux) ~ dat$Tsoil_flux, subset = dat$chamber == dat2$chamber[i] & dat$year == dat2$year[i] & dat$doy >= dat2$day1[i] & dat$doy <= dat2$day2[i]) dat2$coef[i] <- coef(assign("modelb",i, sep = ""))[[2]] dat2$Rsq[i] <- summary(assign("modelb",i, sep = ""))[[9]] } I have also tried assign("modelb",1:i) #following the ?assign example pas...
2005 Sep 04
1
time series graphs
About time series graphs, I need help to move on: A time series of data directly from a data logger comes in the dat format created below: year<-c(rep(2005,10)) doy<-c(rep(173,5),rep(174,5)) time<-c(15,30,45,100,115,15,30,45,100,115) dat1<-c(0.022128,0.035036,0.051632,0.071916,0.081136,0.07837,0.083902,0. 126314,0.080214,0.117094) dat2<- c(0.533074667,0.887982667,1.284938,1.845450333,2.145839333,2.145126667,2 .392422,3.60253,2.330776333,3.5277) dat...
2018 Nov 08
4
Visualizar grandes volumenes de datos
Buenas, He probado a intentar graficar mas de 700.000 puntos y es una locura. No doy con una libreria que consiga graficar grandes volumenes de datos. ?Existe alguna en R? Gracias Jes?s [[alternative HTML version deleted]]
2010 Oct 30
3
matrices
Hola a todos, les consulto algo fácil, pero no me doy cuenta. Estoy siguiendo un ejemplo de un libro, pero no llego al resultado con R. Lo escribo el problema en Word para usar el editor de ecuaciones, porque es tan sencillo que mi error es increíble. El código en R son solo 3 renglones. Javier ------------ próxima parte -----------...
2008 May 21
3
Converting a 'difftime' to integer - How to???
I want to find the DOY (Day of Year) of some dates. I think to substract the date 1. January from the data to achive this. Something like: > d <- as.Date("2006-03-13") - as.Date("2006-01-01") +1 > d Time difference of 72 days So far so good. But d is a 'difftime' object. How do I g...
2017 Mar 19
4
Problema con paquetes knitr y rmarkdown
...probado a reinstalar esos paquetes (que ya tenía instalados) pero cuando vuelvo a aplicar knit to pdf, continua apareciendo dicho mensaje. El sistema es ubuntu 16.04 (lo he instalado recientemente, anteriormente tenía el 14.04). También he probado a actualizar r-base de la 3.2 a la 3.3, pero no doy con la solución. ¿Alguien podría aportarme alguna ayuda? Gracias de antemano. Fernando Pérez [[alternative HTML version deleted]]
2017 Jan 24
3
Convertir programa Matlab a R sacado de Threshold Models of Collective Behavior de Michèle Lai & Yann Poltera
...le((N1%%round(N1)) > tol) { N2 = N2+1 N1 = N/N2 } } sizes[1] = N1 sizes[2] = N2 } En alguna parte se tranca y no sale del bucle pues si lo cancelo me aparece el error [1] "ERROR: no se puede hallar una subgrilla que entre en la grilla dada" repetido en forma indefinida. No me doy cuenta doy estoy errando. Alguien se da cuenta? Saludos, Sebastin. [[alternative HTML version deleted]]
2012 Jun 08
3
day of the year for chron objects
Hi! Is not there an standard R function to retrieve the day of the year (since 1st Jan of the same year)? I know I can make my own using julian, but find it weird that having days(), months() etc doy() does not exist as an standard function. Also, is the following not a bit inconsistent? > a <- chron("20100506",format="ymd") > a [1] 100506 > years(a) [1] 2010 Levels: 2010 but instead have to cast to Date to apply julian: > julian(a) Error in names(d) : '...
2013 Apr 03
3
R en Medicina
Hola, saludos desde México. Me estoy iniciando en el uso de R, que me parece un muy buen programa. Yo doy la clase de bioestadística en la facultad de Medicina de Mérida, Yucatán en México. Me gustaría hacer contacto con personas que estén usando R en el área biomédica, especialmente en docencia, para compartir experiencias, dudas, ejemplos, etc. Saludos José Arturo [[alternative HTML version delet...
2015 Jan 14
3
Abreviar nombres ciéntificos
...make.cepnames de la librer?vegan. > > Me gustar?poderlos abreviar as?Hymenocephalus italicus --> H.italicus > Merluccius merluccius --> M.merluccius > > He probado con varias opciones y no consigo dar con ello. Estoy casi seguro de que es algo relativamente sencillo, pero no doy con ello. > > ?Alguien podr?echarme una mano?. > > Un saludo y gracias > > Juan Carlos > > > > [[alternative HTML version deleted]] > > > > ------------------------------ > > Message: 3 > Date: Mon, 12 Jan 2015 20:09:06 -0300...