Displaying 9 results from an estimated 9 matches for "myxts".
Did you mean:
myts
2010 Mar 28
0
Preserving both yearmon and numeric data in an xls object
...of different length
> #... fix the 6 vectors to have equal length
> mylist[1:2] <- lapply(mylist[1:2], as.yearmon) # Convert
the first two elements into yearmon class
> #... Now try one of the following; tindex is the time index in
yearmon format
> myxts <- as.xts(as.data.frame(mylist), order.by=tindex) # this
makes columns 3-6 of myxts all have class = character
> myxts <- as.xts(matrix(unlist(mylist), ncol=6), order.by=tindex)
# this makes myxts entirely numeric
I even tried using the following statement afte...
2017 Sep 16
2
require help
You can just use the same code that I provided before but now use your
dataset. Like this
df <- read.csv(file="data2.csv",header=TRUE)
dates <- as.Date(paste(df$year,"-01-01",sep=""))
myXts <- xts(df,order.by=dates)
head(myXts)
#The last command "head(myXts)" shows you the first few rows of the xts
object
year cnsm incm wlth
1980-01-01 1980 173.6527 53.3635 60.3013
1981-01-01 1981 175.4613 53.6929 60.4980
1982-01-01 1982 174.5724 53.4890 60.2358
1983...
2017 Sep 16
0
require help
...c Berger <ericjberger at gmail.com> wrote:
> You can just use the same code that I provided before but now use your
> dataset. Like this
>
> df <- read.csv(file="data2.csv",header=TRUE)
> dates <- as.Date(paste(df$year,"-01-01",sep=""))
> myXts <- xts(df,order.by=dates)
> head(myXts)
>
> #The last command "head(myXts)" shows you the first few rows of the xts
> object
> year cnsm incm wlth
> 1980-01-01 1980 173.6527 53.3635 60.3013
> 1981-01-01 1981 175.4613 53.6929 60.4980
> 1982-0...
2017 Sep 22
2
require help
...gmail.com> wrote:
>
>> You can just use the same code that I provided before but now use your
>> dataset. Like this
>>
>> df <- read.csv(file="data2.csv",header=TRUE)
>> dates <- as.Date(paste(df$year,"-01-01",sep=""))
>> myXts <- xts(df,order.by=dates)
>> head(myXts)
>>
>> #The last command "head(myXts)" shows you the first few rows of the xts
>> object
>> year cnsm incm wlth
>> 1980-01-01 1980 173.6527 53.3635 60.3013
>> 1981-01-01 1981 175.4613...
2010 Jul 09
3
R crashes with large vectors
...m using XTS of length of minimum 120k elements.
My problem is that I cannot display the vector (otherwise R crashes), I
cannot plot it either (otherwise R crashes). That could be solved by
reducing the amount of points.
However, I have been performing some statistical opreations on is and even
sd(myXTS) crashes R.
By "crashes", I mean shuts down without any warning whatsoever.
I use R 2.11.1 (64).
Has anyone had the same kind of problem?
Can we solve this?
Best,
--
Jeremie
[[alternative HTML version deleted]]
2012 May 29
2
Converting to XTS loses data.frame structure
...onsiders them a string.
thee data read in "d" is a data.frame:
> str(d)
'data.frame': 248 obs. of 4 variables:
However, converting to an XTS seems to break that.
Example:
=============================================
d <- (read.csv(file.path(dataDir,thisFile), as.is=T))
myXTS <- as.xts( d, order.by=as.POSIXct(strptime(paste(d$Date, d$Time), '%m/%d/%y %H:%M')))
head(d)
Date Obsever Val.1 Time
1 10/12/09 PL 15 12:44
2 10/12/09 PL 15 12:44
head(myXTS)
Date Obsever Val.1...
2017 Sep 16
0
require help
> On 15 Sep 2017, at 11:38, yadav neog <yadavneog at gmail.com> wrote:
>
> hello to all. I am working on macroeconomic data series of India, which in
> a yearly basis. I am unable to convert my data frame into time series.
> kindly help me.
> also using zoo and xts packages. but they take only monthly observations.
>
> 'data.frame': 30 obs. of 4 variables:
2017 Sep 22
0
require help
...>> You can just use the same code that I provided before but now use your
> >> dataset. Like this
> >>
> >> df <- read.csv(file="data2.csv",header=TRUE)
> >> dates <- as.Date(paste(df$year,"-01-01",sep=""))
> >> myXts <- xts(df,order.by=dates)
> >> head(myXts)
> >>
> >> #The last command "head(myXts)" shows you the first few rows of the xts
> >> object
> >> year cnsm incm wlth
> >> 1980-01-01 1980 173.6527 53.3635 60.3013
>...
2017 Sep 15
7
require help
hello to all. I am working on macroeconomic data series of India, which in
a yearly basis. I am unable to convert my data frame into time series.
kindly help me.
also using zoo and xts packages. but they take only monthly observations.
'data.frame': 30 obs. of 4 variables:
$ year: int 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 ...
$ cnsm: num 174 175 175 172 173 ...
$ incm: