similar to: without the loop

Displaying 20 results from an estimated 6000 matches similar to: "without the loop"

2007 Jan 18
4
Reading contingency tables
I am trying to read an ftable using read.ftable, but I get the following error message: > jobSatTable <- read.ftable("http://definetti.uark.edu/~gpetris/stat5333/jobSatisfaction.dat",skip=2) Error in seek(file, where = 0) : no applicable method for "seek" In addition: Warning messages: 1: no non-missing arguments to max; returning -Inf 2: no non-missing arguments to
2008 May 01
1
Forecasting observations in ARFIMA
I would like to compute the next 15 observations for an ARFIMA(2,1,0) model along with confidence intervals. Can someone provide code? Many thanks. Jill ____________________________________________________________________________________ [[elided Yahoo spam]]
2008 Nov 04
2
TIme Series AR to MA and (viceversa)
Hi, I am new to using R for Time series analysis. I was wondering if there are any functions that can convert ARMA or ARIMA time series into their corresponding AR or MA time series representations (by calculating the corresponding AR or MA coefficients). Thanks a lot Kris.
2009 Mar 11
1
Forecasting with dlm
Hi All, I have a problem trying to forecast using the dlm package, can anyone offer any advise? I setup my problem as follows, (following the manual as much as possible) data for example to run code CostUSD <- c(27.24031,32.97051, 38.72474, 22.78394, 28.58938, 49.85973, 42.93949, 35.92468) library(dlm) buildFun <- function(x) { dlmModPoly(1, dV = exp(x[1]), dW = exp(x[2])) } fit <-
2009 Oct 06
2
how to fit time varying coefficient regression model?
Hi - I read through dse package manual a bit. I'm not quite certain how I can use it to estimate a time varying coefficient regression model? I might pick up an inappropriate package. Any suggestion would be greatly appreciated. Thank you. rh
2009 Jul 21
4
list of lm() results
How can I get the results of lm() into a list so I can loop through the results? e.g. myResults[1] <- lm(...) myResults[2] <- lm(...) myResults[3] <- lm(...) ... myResults[15] <- lm(...) myResults[16] <- lm(...) so far every attempt I've tried doesn't work throwing a "number of items to replace is not a multiple of replacement length" error or simply not
2009 Oct 20
2
Problem using the source-function within R-functions
Dear R community, You may have the solution to how to construct a function using the function "source()" to build the function; i.e. myfunction <- function(...){ source('file1.r') source('file2.r') } After compiling and installing the "myfunction" in R, then calling the "myfunction" gives an error because the content of 'file1.r' and
2005 May 25
5
precision problem
I have prices that I am finding difficult to compare with ==, > and >, due to precision. For example: the numbers should match, with '==', but they differ in the magnitude of 1e-14 due to bunch of calculations that I run on them. Programming with java, I am used to implementing a function that compares the difference between the numbers to a pre determined precision factor. This
2008 May 13
9
A Very Simple Question
On 5/13/2008 10:27 AM, Yukihiro Ishii wrote: > Hi Rusers! > > I am ashed of asking such a simple question. > > X<-matrix(rnorm(24), 4) > X0<-apply(X,2,mean) > > What I want is a matrix which consists of colums such as X[,1]--X0[1]. > > X-X0 doesn't work. > > Perhaps apply function? scale(X, scale=FALSE) ?scale > Thanks in advance. > >
2005 Apr 28
2
how to construct an empty data.frame
> r [1] open settle <0 rows> (or 0-length row.names) > class(r) [1] "data.frame" this is an empty data.frame I get back from a sql statement that returns an empty result set. How can I create such an empty data.frame using the data.frame() constructor? I want to have a data.frame with 0 rows but named empty columns. Thanks in advance for any help.
2005 Oct 27
3
its dates masked by chron
I built R 2.2.0 from source on my debian machine yesterday and updated all packages. My problem is that "dates" function from its, that my code heavely uses is now masked by "dates" from chron. How can I specify tehat I want to use dates from its or how can I prevent it from being masked? > library(its) Loading required package: Hmisc Hmisc library by Frank E Harrell Jr
2006 Apr 10
3
timeAlign
I use POSIXct for datetimes. Is thee a timeAlign function that I can use where : align by year direction -1 ==> start of this year direction 1 ==> start of next year align by week direction -1 ==> date on last sunday direction 1 ==> date on next sunday align by day direction -1 ==> time at past midnight direction 1 ==> time at this comming
2005 Jun 24
2
seq in R
I want to generate a sequence from 1 to x by 1 seq(1,x,by=1) I want the above to return an empty list if x is zero In other languages I can do 1:x:1 to force the increment by to be a positive 1. This syntax does not work in R. In R 1:x gives me 1 0 when x is zero, this is not what I want. The seq statement above throws an error when x is 0. How can I generate a sequence where if the
2006 May 26
2
Too many open files
This may be more of an OS question ... I have this call r = get.hist.quote(symbol, start= format(start, "%Y-%m-%d"), end= format(end, "%Y-%m-%d")) which does a url request in a loop and my program runs out of file handlers after few hundred rotations. The error message is: 'Too many open files'. Other than increasing the file handlers assigned to my process, is there
2008 Jul 08
6
Question: Beginner stuck in a R cycle
Dear All, I have a database of 200 observations named myD. In the dataframe there are a column named code (with codes varying from 1 to 77), a column named "prevalence" with some quantitative measurements are given and an column named Pr_mean, with no values. I would like to set a cycle to compute the average of prevalence values for each different code and store the averages under the
2005 Jun 07
3
without a loop
tmp <- c(-1,NA,NA,1,1,NA,NA,1) without using a loop, how can I replace all NAs in the list above with the previous none NA value in the list?
2005 Feb 15
2
how many 7th of the month is there between two dates
This is a eaeir way to ask my prior question: I want to caculate how many an exact day of the month there is between two dates. For example; How many 7th of the month is there between "1998/12/17" and "2000/1/7". To make the problem simple, the day of the month (7) is the day in the 2nd date.
2005 Oct 06
2
isdst
Can someone, please, explain the difference is results below (notice the isdst value) > unlist(as.POSIXlt('2005-7-1')) sec min hour mday mon year wday yday isdst 0 0 0 1 6 105 5 181 1 > unlist(as.POSIXlt(as.Date('2005-7-1'))) sec min hour mday mon year wday yday isdst 0 0 0 1 6 105 5 181 0
2002 May 14
2
tapply and empty subsets
I am using tapply to compute means by group, as in > tapply(y, z, mean) 1 2 3 21.00757 20.50031 NA where y is a vector and z a factor with levels 1:3. I would like to get a zero instead of the NA I get when a subset is empty. The problem is that FUN is not applied to empty cells of the ragged array. (Of course I am willing to define a function my.mean that returns
2010 Aug 18
3
libreadline problem
Hello, Recently updated Ubuntu to 10.04, I have installed the r-base and r-base-dev packages from CRAN with sudo apt-get install r-base But now when I want to start R I get the following error: gpetris at definetti:~$ R /usr/lib/R/bin/exec/R: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: PC Any clue??? Has anybody seen that before? I have tried to reinstall the