Displaying 20 results from an estimated 30000 matches similar to: "library ts"
2010 Jul 08
1
download gplots and caTools
Dear list,
I am using R.2.11.1 version on a PC. I downloaded successfully gplots_2.8.0 but I could not find where to download caTools
> library("gplots")
Loading required package: caTools
Error: package 'caTools' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc) :
there is no package called
2012 Jul 16
4
Error in as.xts
Hi
I got the following error using as.xts
Error in xts(x, order.by = order.by, frequency = frequency, ...) :
NROW(x) must match length(order.by)
Here is how the data looks like
> d1 <- read.csv(file.path(dataDir,"AppendixA-FishCountsTable-2009.csv"),
as.is=T)
> d1[1:3,]
dive_id date time species count size site depth level
TRANSECT VIS_M
1 62 10/12/2009
2012 Aug 03
5
replacement has length zero. In addition: Warning message: In max(i) : no non-missing arguments to max; returning -Inf
Hi,
Here is my data, the first 10 rows
> u=regCond_all[1:10,]
> dput(u)
structure(c(999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 1.9, 2, 1.97, 1.99, 1.83, 1.78, 1.6, 1.52, 1.52,
1.36, 10.53, 9.88, 9.88, 10.53, 10.53, 10.53, 5.26, 9.88, 10.53,
10.53, 5.4, 5.57, 5.46, 5.34, 5.5, 5.59, 5.62, 5.76, 6.23, 6.19,
2012 Aug 01
1
add text to a plot, create character labels
Hi,
I was trying to run the following, where the labels on the x axis are dates
and need to be converted to characters. It did not work. Any help would be
appreciated. Thanks.
>
text(axTicks(1),par("usr)[3]-2,srt=45,adj=1,labels=as.character(c("2008-01-08","2008-08-10","2008-08-22","2008-09-03",
"2008-09-15")), xpd=T, cex=0.8)
Error:
2012 Jul 20
2
convert date to a factor
Hello,
I would like to convert date as a factor to represent time in a repeated
measure situation in the following code. How would I do that?
> d <- read.csv(file.path(dataDir,"data.csv"), as.is=T,stringsAsFactors =
FALSE)
> d[1:2,]
id date a b c y
1 1 8/6/2008 Red 15 B 22
2 1 8/6/2008 Green 15 B
2012 Jul 31
3
time series line plot: Error in plot.window(...) : invalid 'xlim' value
Hello,
This should be pretty simple but I cannot get it right. Please point to the
right code. Thanks.
> last <- read.csv(file.path(dataDir,"plot1.csv"), as.is=T,stringsAsFactors
= FALSE)
> last
date r_wvht
1 8/6/2008 0.9766667
2 8/8/2008 0.7733333
3 8/11/2008 1.4833333
4 8/13/2008 1.5766667
5 8/14/2008 1.3900000
6 8/18/2008 0.7800000
7 8/20/2008
2012 Jul 17
3
NA instead of time stamp
I was wondering why I get <NA> instead of the timestamp in the following.
Thanks.
> dataDir <- file.path(wd)
> localRaw <- read.csv(file.path(dataDir,"LOCAL.csv"), as.is=T,stringsAsFactors
= FALSE)
> localRaw[1:2,]
Year Month Day hour minute second Temp1mab Temp7mab Temp14mab Salinity1mab
1 2009 10 5 0 0 0 11.288 13.675 13.743 33.513
2012 Jul 19
1
expert opinion on lmer
Hello,
I have the following design, counts were collected at different transects,
different depths and different sites at different times. Time is continuous
and assumed to be random, all the others are categorical fixed where
transect is nested within depth which is nested within site.
I would like an expert opinion about the following code where intercept is
modeled as random (I am not sure
2011 Jul 22
1
library 'ts' not available?
hi,
When I type library(ts) (I am working on an ubuntu machine), I get the
following error:
> library(ts)
Error in library(ts) : there is no package called 'ts'
I did a few google searches and it seems like ts is no longer
available....is that correct?
It seemed to me that I would need to download Rmetrics instead....is that
the replacement for ts.
Please let me know how I can get
2012 Jul 29
1
readRDS, In as.double.xts(fishReport$count) : NAs introduced by coercion
Hello,
I looked in the R-help but could not find an archive addressing the
following. I would like to convert a character to numeric after reading a
file with RDS extension. After using as.numeric, I checked if it is
numeric. It was not converted. Please help.
Here is my code
>Report <- readRDS(file="RDS/Report.RDS")
> Report[1:2,]
dive_id date
2018 Nov 04
1
trivial typo in src/library/stats/man/ts.Rd
"vector[s]" should be plural in line 54 ...
cheers
Ben Bolker
----
Index: ts.Rd
===================================================================
--- ts.Rd (revision 75540)
+++ ts.Rd (working copy)
@@ -54,7 +54,7 @@
}
\details{
The function \code{ts} is used to create time-series objects. These
- are vector or matrices with class of \code{"ts"} (and additional
2012 Jul 18
2
loop searching the id corresponding to the given index (timestamp)
Hello,
I have the following loop for two data sets: diveData_2008 and
diveData_2009. It uses two other data: diveCond_all and fishTable. The
problem is at the point to identify the dive_id for the given index (index
is timestamp). It keeps on saying
for the1st loop
Error in fishReport$dive_id[i] <- dive_id : replacement has length zero
for the 2nd loop
Error in fishReport$dive_id[i + j] <-
1999 Aug 10
1
Problems with the ts library
Well, I upgraded to a later release and have been having good luck (R vers.
0.65.0) I haven't upgraded my Red-Hat linux from 5.2 so I had to compile from
source , ... so far so good. My problem is with the time series functions
[library(ts)]. I'm trying to use the autocorrelation function-acf() and am
having problems with it. mainly an error ERROR -Couldn't find function
2002 Jul 24
1
TS-library
Hello,
I am trying to get a library for statistical computing. For example, I
have to compute the ARIMA parameters of time series and I?d like to do
that out of my C/C++ or Fortran source code.
The thing I already managed is how to get the standalone library
"Rmath", but in this library the ts-modul is not included.
Thus, my question is: How can I get a library including the
2001 May 16
1
stl in library(ts)
I am running R 1.2.2 under Linux. When using the function stl in
the ts library, how can I save the seasonal component? What I
would like was something like:
library(ts)
data(nottem)
data.stl <- stl(nottem, "per")
x <- data.stl$sea
This what I get:
> x
NULL
I would, however, like to store in x the seasonal component.
Thanks in advance. Francisco.
--
Francisco
2009 Mar 04
1
dividing ts objects of different frequencies
Hello,
I have two time series objects, 1 is yearly (population) and the other is
quarterly (bankruptcy statistics). I would like to produce a quarterly time
series object that consists of bankruptcy/population. Is there a pre-built
function to intelligently divide these time series:
br.ts = ts(data=br.df[,-1], frequency = 4, start=c(2001,1), end=c(2008,2))
distPop.ts = ts(data=distPop.df[,-1],
2008 Jan 10
1
question about subset and join ts object(s)
Hi,
I have two questions about ts.
(1) How do I subset a ts object and still preserve the time index? for
example:
> x=ts(1:10, frequency = 4, start = c(1959, 2)) # the ts object
> x
Qtr1 Qtr2 Qtr3 Qtr4
1959 1 2 3
1960 4 5 6 7
1961 8 9 10
I don't want the 1st 2 elements, so I could subset like this:
> x[3:length(x)]
[1] 3 4 5 6 7 8 9 10
1999 Aug 10
2
Is a ts of length one a ts? (PR#245)
The following seems confused (0.65 snapshot)
> x <- ts(1:20)
> window(x, 1, 1)
Time Series:
Start = c(1, 1)
End = c(1, 1)
Frequency = 1
[1] 1
Warning message:
Not returning a time series object in: [.ts(x, i)
(it of class ts, as the print method shows). Under 0.64.2 it is even more
confusing:
> x <- ts(1:20)
> window(x, 1, 1)
Warning: Not returning a time series object
2010 Jul 03
2
Change the frequency of a ts?
I'm trying to convert a column of a table into a ts object. The data is
monthly, so I want the ts frequency to be 12.
I did this ...
> filings.ts = as.ts(Filings.100K, frequency=12)
> filings.ts
Time Series:
Start = 1
End = 311
Frequency = 1
[1] 246.9336 305.6789 ... ...
> tsp(filings.ts)
[1] 1 311 1
> tsp(filings.ts) <- c(1,311,12)
Error in attr(x, "tsp")
1999 Jul 02
1
Bug in "[.ts" for multivariate ts {Problem with plot.ts, "["} (PR#216)
>>>>> On Fri, 02 Jul 1999, Adrian Trapletti <Adrian.Trapletti@wu-wien.ac.at> said:
Adrian> There seems to be a problem with plot.ts (R Version 0.64.2)
> x<-cbind(1:10,2:11)
> x<-as.ts(x)
> plot(x)
Adrian> Error: subscript (20) out of bounds, should be at most 10
This is definitely a bug
--> CC: R-bugs
ALL NOTE : This is *not* new