Displaying 8 results from an estimated 8 matches for "timepos".
Did you mean:
tiempos
2012 Apr 30
1
Subtract days to dates in POSIXct format
...e as factor
z <- cbind(x,colsplit(x$time, split="\\s", names=c("date", "clock")))
zh<-cbind(z,colsplit(z$clock,split=":",names=c("h","m","s")))
zn <- subset(zh, zh$lig<= 5 & zh$h<8?|?zh$h>=22) # nighttime
zn$timepos<-as.POSIXct(zn$time,tz="GMT",format="%d/%m/%y %H:%M:%S")
I want to assign timepos to its ?natural? night, that is, the night that goes from sunset of day x to sunrise of day x+1 corresponds to day x:
zn$night<-ifelse(zn$h>=0 & zn$h<9,zn$timepos ??oneday?,zn$tim...
2012 May 05
2
creating a new column assigning values of other columns
Hello,
?
I have to create a new column from the values of other columns of a data frame. The new?column (y$n) is created imposing a condition (using a third variable y$h) that assigns the values of two time variables (y$b and y$timepos). Here's the piece of code to get there (using the attached files):
?
xact <- read.table("act.lig", sep = ',', col.names=c("ok","time","secs","act"))
xlig <- read.table("lig.txt", sep = ',', col.names=c("ok&q...
2013 Jun 08
0
modify and append new rows in a dataframe
...previously row i+2th
.
.
.
I attach a dput with a selection of my data. Here's a piece of code that I am trying to run only for the daytime/night time change:
? xandn <- ddply( xan, .(Ring), function(df1){
? # ?ndex of daytime/night time changes
? ind <- c( FALSE,?diff( as.POSIXlt( df1$timepos, df1$dusk ) ) > 0?)
? add <- df1[ind,]
? add$timepos <- add$timepos - add$dusk
? # append and arrange rows
? df1 <- rbind( df1, add )
? df1 <- df1[order(df1$timepos),]
? # recalculation of act
? df1$act2 <- c( diff( as.numeric(df1$timepos) ), NA )
? df1} )
I get the following err...
2013 Jun 10
1
modify and append new rows to a data.frame using ddply
...lection of my data.frame. Here is a piece of existing code that I am trying to adapt just for the daytime/night time change:
? require(plyr)
? xandaynight <- ddply( xan, .(Ring), function(df1){
? # index of day/night changes
? ind <- c( FALSE, diff(df$dif) == 1 )
? add <- df1[ind,]
? add$timepos <- add$dusk
? # rearrangement
? df1 <- rbind( df1, add )
? df1 <- df1[order(df1$timepos),]
? # recalculation of act
? df1$act2 <- c( diff( as.numeric(df1$timepos) ), NA )
? df1} )
This code produces an error message:
"Error en diff(df$dif): error in evaluating the argument 'x&...
2012 Apr 27
3
kiteChart to show real values with scalebar
Dear R-users
I hope someone could help me on this problem.
I want to create a multiple kiteChart showing the real values with a
scalebar on each indicating the scale .
Here are some sample data to show what I want to achieve.
Y <- read.table(textConnection("Sample1 Sample2
60 20
150 50
300
2006 Nov 27
7
3 prototype/scriptaculous effects in order on one <div>
What I am trying to do is fade out the content in a certain <div> load
new content while its black then fade in the new content but im lost.
I need it to go like this...
Effect.Fade,Ajax.Update,Effect.Appear
but everytime I try to do it it just trys to do all of them at once,
how do I go about making the effects wait on the previous one before it
starts?
2006 Jul 05
10
Google/Netflix Like Tooltips
I need to have a toolip-like object which has dynamic content in it. I
plan on using scriptaculous with an ajax call to retrieve the content,
but I would like to make the popup/tooltip/balloon text look as nice as
possible. Does anyone have any examples or anything useful to create a
popup like the ones that Google and Netflix have? I''d like to have one
which must be
2019 Feb 12
7
Leer un txt a trozos
Estimad en s eRRer en s,
Tengo un txt que quiero importar a R.
Pero no tiene un formato adecuado para usar cosas normales, como por
ejemplo read.csv()
El formato es algo asÃ:
time 1
col1 col2 col3 col4
dato dato dato dato
dato dato dato dato
dato dato dato dato
dato dato dato dato
dato dato dato dato
end
time 2
col1 col2 col3 col4
dato dato dato dato
dato dato dato dato
dato dato dato dato
dato