similar to: apply a function at: dateX, dateX+1, dateX+2, ....

Displaying 18 results from an estimated 18 matches similar to: "apply a function at: dateX, dateX+1, dateX+2, ...."

2012 Nov 27
5
loop with date
Hello, I tried to construct my very first loop today and completly failed :-( Maybe someone can help me? I have a dataframe somewhat like this one: myframe <- data.frame (Timestamp=c("24.09.2012 09:00", "24.09.2012 10:00", "24.09.2012 11:00", "25.09.2012 09:00", "25.09.2012 10:00", "25.09.2012
2012 Oct 26
0
mean of a value of the last 2 hours using plyr (Thank you)
Hi dear three helpers, Thanks a lot! Your solutions worked great. Again I learned a lot. Tagmarie Am 25.10.2012 18:36, schrieb Felipe Carrillo: > Another option using plyr, > library(plyr) > myframe <- data.frame (ID=c("Ernie", "Ernie", "Ernie", "Bert", "Bert", > "Bert"), Timestamp=c("24.09.2012 09:00",
2012 Oct 25
2
mean of a value of the last 2 hours
Hello, I have a data frame somewhat like that: myframe <- data.frame (ID=c("Ernie", "Ernie", "Ernie", "Bert", "Bert", "Bert"), Timestamp=c("24.09.2012 09:00", "24.09.2012 10:00", "24.09.2012 11:00"), Hunger=c(1,1,1,2,2,1) ) myframestime <- as.POSIXct (strptime(as.character(myframe$Timestamp),
2012 Dec 17
2
calculate a "rolling mean" including standard deviation
Hello everyone, I have a data frame somewhat like this one: myframe <- data.frame (Timestamp=c( "24.09.2012 06:00", "24.09.2012 07:00", "24.09.2012 08:00", "24.09.2012 09:00", "24.09.2012 10:00", "24.09.2012 11:00", "24.09.2012 12:00",
2009 Apr 09
2
better way of recoding factors in data frame?
Hi all, I apologize in advance for the length of this post, but I wanted to make sure I was clear. I am trying to merge two dataframes that share a number of rows (but some are unique to each data frame). Each row represents a subject in a study. The problem is that sex is coded differently in the two, including the way missing values are represented. Here is an example of the merged dataframe:
2005 May 13
1
Lowest data level since DateX
Hello, I'm dealing with financial time series. I'm trying to find out X in this sentence: The most recent close is the lowest level since X(date). Here's an example of what I'm looking for: library(fBasics) data(DowJones30) tail(DowJones30[,1:5],n=10) I need to come up with a vector that would look like this AA AXP T ... 2000-12-21
2002 Sep 09
1
multiple "keys" in Trellis plots?
My xyplot has a number of panels, and I'd like a separate key for each rather than a single key for the entire set. However, I cannot find a way to pass multiple key definitions to xyplot's "key" argument. Allow me to throw out a simple example: require(methods) require(lattice) ## define sample data myFrame1 <- data.frame(a=1:100, b=rep(1:10,10), c=unlist(lapply(1:10, rep,
2009 May 03
1
dates from Stata's .dta to R's .Rdata: become character
Dear Sir/Madam, I converted the .dta into .Rdata with the foreign library read.dta. However, when I use fix() I get the message that the dates are discarded. Before fix(), class(dateX) gives 'dates' as class; after fix() class(dateX) gives 'character' Why is that? Best regards, Rob Bakker [[alternative HTML version deleted]]
2012 Mar 07
1
SELECT CASE in RODBC
Hi all, I have a problem with a variable created by a SELECT CASE statement. See the code below. I would like the variable "event" to be a character variabel as I want to UNION my two SELECTs - and the "event"-variable is a character variable in the first SELECT result. I have tried different ways: * used ' ' in stead of " " around the string I want as the
2012 Sep 26
2
average environmental data if AnimalID and Time is duplicated
Hello, I tried for about three hours now to solve this problem but I can't figure it out. I am sure someone knows how do it. At least I hope so. I have a data frame somewhat like this: myframe <- data.frame (ID=c("Ernie", "Ernie", "Bert", "Bert"), Timestamp=c("24.09.2012 09:00", "24.09.2012 09:00", "24.09.2012 10:00",
2009 Nov 23
1
xrcise not working
Hi. I''m back. Unfortunately I can''t get xrcise working. Here is the sample xrc file and the resulting error messages: =============== TestWxFb.xrc ========================================= <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
2012 Sep 17
6
count NAs per week
Even though I work with R since a year or so I still struggle with simple problems. I hope someone can help me with this. Been trying for days and am a little frustrated now. I have a data frame somewhat like the one bellow: dattrial<-data.frame(a=c(1,NA,rnorm(4,10)), Week=c(3,3,3,4,4,4)) I want to know how many NAs I have in week 3 and in week 4. -- View this message in context:
2009 Oct 04
1
Paste a character to an object
Dear List, I can't seem to get a simple paste function to work like I need. I have an object I need to call but it ends in a character string. The object is a list of home range values for a range of percent isopleths. I need to loop through a vector of percent values, so I need to paste the percent as a character on the end of the object variable. I have no idea why the percent is in
2017 Aug 19
0
My very first loop!! I failed. May I have some start-up aid?
Thank you for providing the example code... for the request of running it multiple times it would have helped if you could have confirmed that the example ran through without errors... there were a lot of mistakes in it. Look into using the reprex package to check your example next time. I don't do this kind of analysis... I really don't know what to expect from the functions. The
2007 May 31
0
adehabitat version 1.6
Dear all, I have just uploaded to CRAN the version 1.6 of the package 'adehabitat'. Significant changes are listed below: * The package has been reorganized into four parts (see ?adehabitat-package for a description): (i) management of raster maps, (ii) habitat selection / ecological niche analysis, (iii) home range analysis, and (iv) analysis of animals trajects. The package contains
2007 May 31
0
adehabitat version 1.6
Dear all, I have just uploaded to CRAN the version 1.6 of the package 'adehabitat'. Significant changes are listed below: * The package has been reorganized into four parts (see ?adehabitat-package for a description): (i) management of raster maps, (ii) habitat selection / ecological niche analysis, (iii) home range analysis, and (iv) analysis of animals trajects. The package contains
2007 Oct 02
0
Adehabitat package question - trying to generate animal home ranges
Hello, I'm new to R and am trying to use the adehabitat package for home range and habitat selection analysis for some animal radiotelemetry data sets I have, but I can't get the home range functions (mcp & kernelUD) to work with my data. I think that my problem is that I don't properly understand how the package uses data frames and factors, and I may not be defining the id
2009 Jun 25
1
Calculating home ranges using mcp in adehabitat
Hello, I've been trying to calculate home range sizes (for Icelandic geese!) using minimum convex polygons with the adehabitat package. I've tried to use the R code shown by demo(homerange) in adehabitat and when that didn't work I've fiddled around with it but to no avail...Below is the output of the demo that I've attempted to follow, followed by a subset of my data (for one