similar to: converting a zoo or an xts to a data frame

Displaying 20 results from an estimated 4000 matches similar to: "converting a zoo or an xts to a data frame"

2009 Nov 17
2
Lattice plot
Hi, I was trying to get a graph in lattice with the following data frame (7 rows, 5 cols): chr start1 end1 meth positive 1 1 10 20 1.5 y 2 2 12 18 -0.7 n 3 3 22 34 2.0 y 4 1 35 70 3.0 y 5 1 120 140 -1.3 n 6 1 180 190 0.2 y 7 2 220 300 0.4 y I wanted the panels to be organized by 'chr' -
2012 Dec 28
2
[LLVMdev] Can simplifycfg kill llvm.lifetime intrinsics?
> Suppose you have four lifetime operations on the same address in memory, > with loads and stores all around them: > > start1--end1 .. start2--end2 > > If you remove start1 then you have a bare pointer, the memory came from > somewhere and you lose the optimization that loads before start1 become > undef, but you don't miscompile. This is assuming no looping after
2012 Dec 28
0
[LLVMdev] Can simplifycfg kill llvm.lifetime intrinsics?
On 12/27/2012 12:35 PM, Rafael EspĂ­ndola wrote: >>> Oh, I was reading "precedes/following" as having static (dominance) >>> meaning. That is, in the above example you could not delete the store >>> since it is not true that >>> llvm.lifetime.end dominates it. >>> >>> Nick, is this what you had in mind? If not, then we must delete a
2010 Jul 01
4
left end or right end
Dear all, I am a biologist. I have two sets of distance P(start1, end1) and Q(start2, end2). The distance will be like this. P ------------------------ Q ---------------------------------------- I want to know whether P falls closely to the right end or left end of Q. P and Q are of different lengths for each data point. There are more than 10000 pairs of P and Q. Is there any test or
2004 Oct 19
2
Sweave and Trellis in R 2.0.0patched (Windows)
I've been using the following code to plot using Sweave in version 1.9.1 library(RODBC) library(lattice) channel <-odbcConnectExcel("h:/water.xls") data <- sqlQuery(channel,"select * from `Sheet1$` where Test = 'TOC' and (Valve='5010-05' or Valve='8030-V26' or Valve='1180-08' or Valve='5040-08')") odbcClose(channel) srt <-
2012 Dec 27
5
[LLVMdev] Can simplifycfg kill llvm.lifetime intrinsics?
>> Oh, I was reading "precedes/following" as having static (dominance) >> meaning. That is, in the above example you could not delete the store >> since it is not true that >> llvm.lifetime.end dominates it. >> >> Nick, is this what you had in mind? If not, then we must delete a >> matching llvm.lifetime.end, but it is not clear how we define
2011 Mar 17
3
date conversion
Dear R People: I have a monthly time series which runs from January 1998 to December 2010. When I use tsp I get the following: > tsp(ibm$ts) [1] 1998.000 2010.917 12.000 Is there an easy way to convert this to a seq.Date object, please? I would like to have something to the effect of 1998/01/01 .... 2010/12/01 Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer
2010 Jun 10
2
[R[ dates on zoo objects
Dear R People: I have a zoo object with its date index as a factor. > xAle1.zoo$index Error in xAle1.zoo$index : $ operator is invalid for atomic vectors > str(xAle1.zoo) Class 'zoo' atomic [1:32] 1253 1316 1038 1157 1710 1489 1159 1142 945 1245 ... ..- attr(*, "index")= Factor w/ 32 levels "04/16/09","04/17/09",..: 1 2 3 4 5 6 7 8 9 10 ... >
2010 Mar 07
3
aggregate for zoo or its?
Dear R People: The aggregate function works very well on regular time series. Is there a version for zoo or its that would take daily data and convert it to monthly, please? Thanks in advance, Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodgess at gmail.com
2010 Mar 26
4
Competing with SPSS and SAS: improving code that loops through rows (data manipulation)
Dear R-ers, In my question there are no statistics involved - it's all about data manipulation in R. I am trying to write a code that should replace what's currently being done in SAS and SPSS. Or, at least, I am trying to show to my colleagues R is not much worse than SAS/SPSS for the task at hand. I've written a code that works but it's too slow. Probably because it's
2010 Apr 11
0
converting a ts object to an xts object
Dear R People: This is probably is very simple question. I have a monthly time series, ibm$ts , that I would like to convert to a quarterly series. I know that I could use "aggregate", but I am interested in the to.quarterly conversion, please. Here is my example: > str(ibm$ts) Time-Series [1:144] from 1998 to 2010: 43.7 46.3 46 51.4 52.2 ... > tsp(ibm$ts) [1] 1998.000 2009.917
2010 Jun 02
2
building time series/zoo/its from a data frame
Dear R People: I have the following data frame: > x.df date cond freq 1 04/01/09 Fever 12 2 04/02/09 Fever 11 3 04/03/09 Fever 10 4 04/04/09 Fever 13 5 04/05/09 Fever 6 6 04/01/09 Rash 6 7 04/02/09 Rash 10 8 04/03/09 Rash 9 9 04/04/09 Rash 10 10 04/05/09 Rash 8 11 04/01/09
2010 Aug 01
1
aggregating a daily zoo object to a weekly zoo object
Dear R People: I'm trying to convert a daily zoo object to a weekly zoo object: xdate <- seq(as.Date("2002-01-01"),as.Date("2010-07-10"),by="day") library(zoo) length(xdate) xt <- zoo(rnorm(3113),order=xdate) xdat2 <- seq(index(xt)[1],index(xt)[3113],by="week") xt.w <- aggregate(xt,by=xdat2,mean) Error: length(time(x)) ==
2010 Jun 24
1
?to calculate sth for groups defined between points in one variable (string), / value separating/ spliting variable into groups by i.e. between start, NA, NA, stop1, start2, NA, stop2
Dear useRs, Thanks for any advices # I do not know where are the examples how to mark groups # based on signal occurence in the additional variable: cf. variable c2, # How to calculate different calculations for groups defined by (split by occurence of c2 characteristic data) #First example of simple data #mexample 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
2010 Jul 26
1
zoo objects and "c"
Dear R People: I would like to combine a zoo object with some observations at the end. Here is the set up: > xgh 2010-06-15 2010-06-16 2010-06-17 2010-06-18 2010-06-19 2010-06-20 2010-06-21 5 6 1 5 0 0 13 2010-06-22 2010-06-23 2010-06-24 2010-06-25 2010-06-26 2010-06-27 2010-06-28 9 6 4 6
2010 Mar 02
2
plotting a subset of a time series
Dear R People: I have the following time series and plot: > x <- ts(rnorm(50),start=2005,freq=12) > plot(x) > which works fine. I would like to plot a subset of that time series, which I did with: > plot(window(x,2005,2006.83)) Is there a better way to do this, please? Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences
2011 Mar 17
1
possible problem with "endpoints"?
Dear R People: Hello again! I found something unusual in the behavior of the "endpoints" function from the xts package: > x1 <- ts(1:24,start=2008,freq=12) > dat <- seq(as.Date("2008/01/01"),length=24,by="months") > library(zoo);library(xts) > x2 <- zoo(1:24,order=dat) > #Here is the surprise: > endpoints(as.xts(x1),'quarters')
2011 Jun 21
5
omitting columns from a data frame
Dear R People: I have a data frame, xm1, which has 12 rows and 4 columns. If I put is xm1[,-4], I get all rows, and columns 1 - 3, which is as it should be. Now, is there a way to use the names of the columns to omit them, please? Thanks so much in advance! Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown
2013 Oct 31
1
an rpy2, R cgi type question
Hi again. I'm putting together a little project with R, python, and a website. So I have an HTML file, a py file, an R file. Here is the HTML file: <form action="/cgi-bin/radio4.py" method="post" target="_blank"> <input type="radio" name="subject" value="Integrate" /> Integrate <input type="radio"
2011 Jan 15
2
access to right time unit when checking for time execution
Hello, I really wonder how to distinguish between secs and mins in the example below. In other terms, how can I access the time unit in variable d ? start1 <- Sys.time(); stop1 <- Sys.time(); d <- stop1-start1; print(d); v<-unlist(strsplit(as.character(d), split=" ")); print(v) Time difference of 3.024054 secs [1] "3.02405381202698" stop1 <- Sys.time(); d