Dear R-users,
I've been using R for a while and I am very satisfied! Unfortunately, I
still have not figured out an efficient and general way to construct and
use lags of time series, especially when I need to work with different
packages.
Let me give an example. I have two time series x and y a
Please follow the posting guide.
Please provide the smallest possible self-contained example and note that
conveys the problem.
Note that the rms package has now replaced the Design package. Details at
http://biostat.mc.vanderbilt.edu/Rrms
Frank
-
Frank Harrell
Department of Biostatistics,
x['price']
price
1 321.0
2 323.5
- Phil Spector
Statistical Computing Facility
Department of Statistics
UC Berkeley
.. One issue with the solution proposed by Jeff is that the transformed
column does not have the original's type:
> x = structure(list(time = structure(c(1020232904.818, 1020232904.818
), class = c("POSIXt", "POSIXct"), tzone = ""), price = c(321,
323.5), minute = c(1020232860, 1020232860)), .Na
> x = structure(list(time = structure(c(1020232904.818, 1020232904.818
), class = c("POSIXt", "POSIXct"), tzone = ""), price = c(321,
323.5)), .Names = c("time", "price"), row.names = 1:2, class = "data.frame")
> x1 = x[,c("price")]
> dput(x1)
c(321, 323.5)
Is there similar syntax that gets "pri
df = structure(list(t = structure(c(1033963406.044, 1033974144.847,
+ 1033988418.836), class = c("POSIXt", "POSIXct"))), .Names = "t", row.names
= c(NA,
+ 3L), class = "data.frame")
df$min = trunc(df$t,units="mins")
does not work, Jeff; you will see that my original post suggests familiarity
Many ways of doing this and you have to think about efficiency and
logisitcs of different approaches.
If the data is not large, you can read all n files into a list and then
combine. If data is very large, you may wish to read one file at a time,
combining and then deleting it before reading t
On Sat, Dec 25, 2010 at 8:08 AM, analys...@hotmail.com
wrote:
> I have a data frame that reads
>
> client ID date transcations
>
> 323232 11/1/2010 22
> 323232 11/2/2010 0
> 323232 11/3/2010 missing
> 121212 11/10/2010 32
> 121212 11/11/2010 15
> .
>
>
>
On Dec 25, 2010, at 10:45 AM, analys...@hotmail.com wrote:
On Dec 25, 10:17 am, David Winsemius wrote:
On Dec 25, 2010, at 8:08 AM, analys...@hotmail.com wrote:
I have a data frame that reads
client ID date transcations
323232 11/1/2010 22
323232 11/2/2010 0
323232 11/3/20
Thanks so much Joshua Wiley you are right your function better than mine :)
--
View this message in context:
http://r.789695.n4.nabble.com/selection-of-outputs-from-the-function-tp3163361p3163853.html
Sent from the R help mailing list archive at Nabble.com.
_
On Dec 25, 10:17 am, David Winsemius wrote:
> On Dec 25, 2010, at 8:08 AM, analys...@hotmail.com wrote:
>
>
>
>
>
> > I have a data frame that reads
>
> > client ID date transcations
>
> > 323232 11/1/2010 22
> > 323232 11/2/2010 0
> > 323232 11/3/2010 missing
> > 121212 11/10/2010 32
>
On Dec 25, 2010, at 8:08 AM, analys...@hotmail.com wrote:
I have a data frame that reads
client ID date transcations
323232 11/1/2010 22
323232 11/2/2010 0
323232 11/3/2010 missing
121212 11/10/2010 32
12121211/11/2010 15
.
I want to order the row
On Dec 25, 2010, at 8:08 AM, Megh Dal wrote:
Dear all, can somebody point me from where to download "rcompgen"
package?
CRAN does not seem to hold that.
http://lmgtfy.com/?q=rcompgen
Installing this package through install.packages() tells this
package is not
available.
Thanks
I have a data frame that reads
client ID date transcations
323232 11/1/2010 22
323232 11/2/2010 0
323232 11/3/2010 missing
121212 11/10/2010 32
12121211/11/2010 15
.
I want to order the rows by client ID and date and using a black-box
forecasting meth
Dear all, can somebody point me from where to download "rcompgen" package?
CRAN does not seem to hold that.
Installing this package through install.packages() tells this package is not
available.
Thanks
[[alternative HTML version deleted]]
__
R
Hi Sonal,
The example you gave is not reproducible since we don't have "data" as you
do.
However, here is an example of how to access the object you are after:
tmp <- CRRBinomialTreeOption(TypeFlag = "pa", S = 50, X = 50,
Time = 5/12, r = 0.1, b = 0.1, sigma = 0.4, n = 5)
t...@price
Cheers
Hi all
I have run into a case where I don't understand why predict.lrm and
predict.glm don't yield the same results. My data look like this:
set.seed(1)
library(Design); ilogit <- function(x) { 1/(1+exp(-x)) }
ORDER <- factor(sample(c("mc-sc", "sc-mc"), 403, TRUE))
CONJ <- factor(sample(c("als",
17 matches
Mail list logo