Displaying 8 results from an estimated 8 matches for "myframe2".
Did you mean:
myframe
2009 Apr 09
2
better way of recoding factors in data frame?
...rying 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:
> myFrame2
???SubjCode SubjSex? ? ? ? ? Sex
1? ? ? sub1? ? ???M? ? ? ???<NA>
2? ? ? sub2? ? ???F? ? ? ???<NA>
3? ? ? sub3? ? ???M? ? ? ???Male
4? ? ? sub4? ? ???M? ? ? ???<NA>
5? ? ? sub5? ? ???F? ? ? ???<NA>
6? ? ? sub6? ? ???F? ? ???Female
7? ? ? sub7? ? ? ? ? ? ? ???<NA>
8? ?...
2012 Nov 27
5
loop with date
..."25.09.2012 09:00", "25.09.2012 10:00",
"25.09.2012 11:00"),
Speed=c(1,1,2,5,1,6))
myframestime <- as.POSIXct (strptime(as.character(myframe$Timestamp),
"%d.%m.%Y %H:%M"), tz="GMT")
myframe2 <- cbind (myframe,myframestime)
myframe2$Timestamp <- NULL
myframe2
I want to construct a loop for every day, i.e. for each day I want to do
some calculations.
(I know in the example it would be easier to do it differently, my real data
are little more complex).
And BTW: Thanks for help...
2012 Oct 25
2
mean of a value of the last 2 hours
...t;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),
"%d.%m.%Y %H:%M"), tz="GMT")
myframe2 <- cbind (myframe,myframestime)
myframe2$Timestamp <- NULL
myframe2
I want to add an additional column at the right and get in each row a value
which shows the mean of "hunger" of the last two hours.
Does anyone know how that works? That would be very helpful.
--
View this...
2002 Sep 09
1
multiple "keys" in Trellis plots?
...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,
10)))
myFrame2 <- data.frame(a=50:1, b=rep(1:10,5), c=unlist(lapply(1:5, rep,
10)))
myFrame <- cbind(rbind(myFrame1, myFrame2),
which=c(rep("Display for myFrame1", 100),
rep("Display for myFrame2", 50)))
## now send the data to a Trellis device
t...
2012 Dec 17
2
calculate a "rolling mean" including standard deviation
..."24.09.2012 12:00", "24.09.2012 13:00",
"24.09.2012 14:00"),
distance =c(9,9,9,4,5,9,4,5,5 ) )
myframestime <- as.POSIXct (strptime(as.character(myframe$Timestamp),
"%d.%m.%Y %H:%M"), tz="GMT")
myframe2 <- cbind (myframestime, myframe)
myframe2$Timestamp <- NULL
myframe2
This is what I want to do:
1.) calculate the mean and the standard deviation for "distance" from the
last too rows (at 13:00 and 14:00)
2.) compare the value for distance one row earlier (12:00). If that value...
2012 Oct 26
0
mean of a value of the last 2 hours using plyr (Thank you)
...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) )
> myframe
> myframestime <- as.POSIXct (strptime(as.character(myframe$Timestamp),
> "%d.%m.%Y %H:%M"), tz="GMT")
> myframestime
> myframe2 <- cbind (myframe,myframestime)
> myframe2
> ddply(myframe2,.(ID),summarise,Last2=mean(tail(Hunger,2)))
> Felipe D. Carrillo
> Supervisory Fishery Biologist
> Department of the Interior
> US Fish & Wildlife Service
> California, USA
> http://www.fws.gov/redbluff/rbdd_...
2012 Dec 07
0
apply a function at: dateX, dateX+1, dateX+2, ....
...54.5414, 54.5424,54.5500, 54.5600, 54.5700 ) ,
AnimalID= c(rep("Ernie")))
head(myframe)
myframestime <- as.POSIXct (strptime(as.character(myframe$Timestamp),
"%d.%m.%Y %H:%M"), tz="GMT")
myframe2 <- cbind (myframe,myframestime)
myframe2$Timestamp <- NULL
myframesxy <- project(cbind(myframe2$Longitude,myframe2$Latitude),"+proj=utm
+zone=32 +ellps=WGS84")
colnames(myframesxy) <- c("Long", "Lat")
myframe3 <- cbind(myframe2, myframesxy)
myframe3$Lo...
2009 Nov 23
1
xrcise not working
...===== TestWxFb.xrc =========================================
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
<object class="wxFrame" name="MyFrame2" subclass="minFrame">
<style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
<size>500,300</size>
<title>Minimal</title>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>...