Displaying 20 results from an estimated 1100 matches similar to: "lead"
2007 Oct 18
2
error: unused arguments
Hi
what does this mean when i get above error? When I call function foo(),
specifying parameters a and b as below
a<-5
b<-6
> y <- foo(a,b)
> Error in foo(a, b) : unused argument(s) (6)
Thanks
Zava
--------------------------------------------------------
This is not an offer (or solicitation of an offer) to bu...{{dropped:24}}
2007 Jul 03
2
vertically concatenating data frames
Hi,
what is the recommended way to vertically concatenate 2 data frames with
the same column names but different number of rows?
My problem is something along these lines:
df1 <- data.frame(var1=var1,var2=var2,var3=var3) # nrow(df1)=1000
df2 <- data.frame(var1=var4,var2=var5,var3=var6) # nrow(df2)=2000
I tried df <- c(df1,df2), no success. stack does not seem to be
appropriate
2007 Jul 17
2
poor rbind performance
Hi
I rbind data frames in a loop in a cumulative way and the performance
detriorates very quickly.
My code looks like this:
for( k in 1:N)
{
filename <- paste("/tmp/myData_",as.character(k),".txt",sep="")
myDataTmp <- read.table(filename,header=TRUE,sep=",")
if( k == 1) {
myData <- myDataTmp
}
else{
myData
2007 Jun 14
2
connecting to DB2 database
Hi,
i am trying to connect to a DB2 server using the DBI library.
getData <- function()
{
driver <- dbDriver("DB2")
conn <- dbConnect(driver,"server","uname","pword")
data <- dbSendquery(conn, "select etc.")
}
When I run the function, i get the error
> data <- getData()
Error in
2007 Jul 02
1
compute time span in months between two dates
Hi,
I am just starting to play with R. What is the recommended manner for
calculating time spans between 2 dates? In particular, should I be using
the "chron" or the "date" package (so far I just found how to calculate
a timespan in terms of days)?
Thanks
Zava
--------------------------------------------------------
This is not an offer (or solicitation of an offer) to
2007 Jul 05
1
converting list to an array
Hi,
I have a list myList (see below) that consists of id's $'7',....,$'10'
and each id has an individual array, the length of which can vary from
id to id.
How can I convert this list into an array, ie. stacking the individual
arrays into one large array?
Thanks
Zava
myList:
$`7`
[1] 20050201 20050301 20050401 20050501
$`8`
[1] 20050201 20050301 20050401
2007 Jul 05
1
generating lower triangular matrix
Hi,
I would like to generate below triangular matrix for some a.
0
0
0
0
0
0
1
0
0
0
0
0
a
1
0
0
0
0
a^2
a
1
0
0
0
a^3
a^2
a
1
0
0
a^4
a^3
a^2
a
1
0
What's an efficient way to do this? (this matrix being KxK, K very
large)
Thanks
Zava
--------------------------------------------------------
This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}
2007 Jul 18
1
passing a parameter to a file from command line
Hi,
I have a file fileFoo.R, say that contains these two lines, invoking
function foo that is specified in "foo_details.R":
source("foo_details.R")
foo(parameter1)
I want to specify and pass parameter1 in my command line when invoking R
in linux: R --no-save <fileFoo.R.
How can I do that?
And how can I retrieve the value of parameter1 in my fileFoo.R function
2002 Jun 20
1
Possible bug with glm.nb and starting values (PR#1695)
Full_Name: Ben Cooper
Version: 1.5.0
OS: linux
Submission from: (NULL) (134.174.187.90)
The help page for glm.nb (in MASS package) says that it takes "Any other
arguments for the glm() function except family"
One such argument is start "starting values for the parameters in the linear
predictor."
However, when called with starting values glm.nb returns:
Error in
2012 Feb 03
1
A question on Unit Root Test using "urca" toolbox
Hello,
I have a question on unit root test with urca toolbox.
First, to run a unit root test with lags selected by BIC, I type:
> CPILD4UR<-ur.df(x1$CPILD4[5:nr1], type ="drift", lags=12, selectlags ="BIC")
> summary(CPILD4UR)
The results indicate that the optimal lags selected by BIC is 4.
Then I run the same unit root test with drift and 4 lags:
2008 May 22
1
How to account for autoregressive terms?
Hi,
how to estimate a the following model in R:
y(t)=beta0+beta1*x1(t)+beta2*x2(t)+...+beta5*x5(t)+beta6*y(t-1)+beta7*y(t-2)+beta8*y(t-3)
1) using "lm" :
dates <- as.Date(data.df[,1])
selection<-which(dates>=as.Date("1986-1-1") & dates<=as.Date("2007-12-31"))
dep <- ts(data.df[selection,c("dep")])
indep.ret1
2012 Dec 03
2
How to rename the columns of as.table
Hello guys .. I would like to have some help about as.table .
I made a table with the autocorrelations of the returns whit 10 lags and i
get this :
autocorrelazione2 <- as.table(c((cor(r2[-1151,],lag(r2))),(cor(r2[-
c(1151,1150),],lag(r2, k=2))),(cor(r2[- c(1151,1150,1149),],lag(r2,
k=3))),(cor(r2[- c(1151,1150,1149,1148),],lag(r2, k=4))),(cor(r2[-
c(1151,1150,1149,1148,1147),],lag(r2,
2011 Aug 04
2
Efficient way of creating a shifted (lagged) variable?
Hello!
I have a data set:
set.seed(123)
y<-data.frame(week=seq(as.Date("2010-01-03"), as.Date("2011-01-31"),by="week"))
y$var1<-c(1,2,3,round(rnorm(54),1))
y$var2<-c(10,20,30,round(rnorm(54),1))
# All I need is to create lagged variables for var1 and var2. I looked
around a bit and found several ways of doing it. They all seem quite
complicated - while in
2019 May 24
3
[PATCH] (vesa)menu.c32: Add support for BLS
Modern distributions are moving toward a common boot scheme called "The Boot
Loader Specification". This patch enables syslinux's (vesa)menu.c32 modules to
parse the drop-in files that are defined by this new specification.
Link to The Boot Loader Specification:
https://systemd.io/BOOT_LOADER_SPECIFICATION
Link to demonstration bootdisk image (82MB gzipped):
2000 Mar 08
1
infinite recursion problem
hello r-users,
sorry for asking a long question that may not be very relevant for the
list but it's upsetting me and I get no other solution...
I get a function HTMLExport.lm that uses another function called
HTMLExport.list.
My problem is that function HTMLExport.list works fine when used alone
but HTMLExport.lm crashes with the following error :
> HTMLExport(iris.lm)
lm(formula =
2012 Sep 17
2
Problem with Stationary Bootstrap
Dear R experts,
I'm running the following stationary bootstrap programming to find the parameters estimate of a linear model:
X<-runif(10,0,10)
Y<-2+3*X
a<-data.frame(X,Y)
coef<-function(fit){
fit <- lm(Y~X,data=a)
return(coef(fit))
}
result<- tsboot(a,statistic=coef(fit),R = 10,n.sim = NROW(a),sim = "geom",orig.t = TRUE)
Unfortunately, I got this
2020 Jun 04
2
[cfe-dev] Clang/LLVM function ABI lowering (was: Re: [RFC] Refactor Clang: move frontend/driver/diagnostics code to LLVM)
On 4 Jun 2020, at 0:54, James Y Knight via llvm-dev wrote:
> While MLIR may be one part of the solution, I think it's also the case
> that
> the function-ABI interface between Clang and LLVM is just wrong and
> should
> be fixed -- independently of whether Clang might use MLIR in the
> future.
>
> I've mentioned this idea before, I think, but never got around to
2019 May 25
2
[PATCH] (vesa)menu.c32: Add support for BLS
On Sat, May 25, 2019 at 3:42 PM Sebastian Herbszt <herbszt at gmx.de> wrote:
>
> Gregory Lee Bartholomew wrote:
> > Modern distributions are moving toward a common boot scheme called
> > "The Boot Loader Specification".
>
> Which distributions are using this yet?
>
> > This patch enables syslinux's
> > (vesa)menu.c32 modules to parse the
2007 Aug 02
1
Using 'diff' on zoo vs zooreg classes (possible bug?)
Hello,
Can anyone explain the following behaviour? To me it seems a bug, but maybe
it is intentional.
It seems that a diff on a zooreg class that is not _strictly_ regular only
considers those entries that are 'deltat' apart.
In the following, diff on the zooreg class only returns values where the
index was one second apart. The example replicates by dev code, but I've
also tested
2013 Nov 01
1
Package(s) for making waffle plot-like figures?
Dear all,
I am trying to make a series of waffle plot-like figures for my data to
visualize the ratios of amino acid residues at each position. For each one
of 37 positions, there may be one to four different amino acid residues. So
the data consist of the positions, what residues are there, and the ratios
of residues. The ratios of residues at a position add up to 100, or close
to 100 (more on