Hello,
Or maybe %in%.
x <- Sys.Date() + 1:10
y <- Sys.Date() + 7:15
x %in% y # logical index into 'x'
x[x %in% y] # common
x[!x %in% y] # not common
setdiff(x, y) # doesn't keep class Date
Hope this helps,
Rui Barradas
Em 01-10-2012 15:57, R. Michael Weylandt escreveu:
On Monday, October
On Monday, October 1, 2012, Karan Anand wrote:
> hi,
> I am new to using R ,I have 2 datasets with dates common in them ,how
> can i take out the common dates within them.
>
>
Depending on what you mean by 'out' either merge() or setdiff()
RMW
> karan
>
> [[alternative HTML version
Yep, you are right, this works:
readCell <- function(workbook, sheetName, i, j) {
pos <- getSheetPos(workbook, sheetName)
readWorksheet(workbook, pos, startRow=i, endRow=i, startCol=j, endCol=j,
header=FALSE)[[1]]
}
2012/7/17 Rui Barradas
> Hello,
>
> Sorry, but I'm not at my computer and will
Hello,
Sorry, but I'm not at my computer and will be away from it for 2 or 3
days, so I can't install package XLConnect and see what's going on.
Heve you tried the functions to get sheets first? (by number, maybe.)
Rui Barradas
Em 16-07-2012 22:30, Erdal Karaca escreveu:
Just tried XLConnec
Just tried XLConnect which seems to work without any problems...
When defining this:
wb <- loadWorkbook("c:\\path-to-xls-file")
readCell <- function(sheet, row, col) {
readWorksheet(wb, sheet, startRow=row, endRow=row, startCol=col,
endCol=col, header=FALSE)[[1]]
}
then, calling the function l
Sorry, it's
findFn("xlsx")
And the first three hits ARE promising (they work). I use the second,
package xlsx. Package XLConnect is more flexible if you want to do
things to excel spreadsheets from R. Package xlsx is simpler if you just
want to read them and then use R.
Rui Barradas
Em 16-
Hello,
Try the following.
install.packages("sos") # to install the package
library(sos) # to load the package nto R session
finFn("xlsx")# find it
Have fun.
Hope this helps,
Rui Barradas
Em 16-07-2012 06:17, Karan Anand escreveu:
hi,
i am new to r ,i have a xl
p@r-project.org
Sent: Monday, July 2, 2012 9:04 AM
Subject: Re: [R] enquiry
try this:
> as.Date('1951-52', format = "%Y-%j")
[1] "1951-02-21"
>
On Mon, Jul 2, 2012 at 5:44 AM, Karan Anand wrote:
> hi,
> i am new to using r .so if
this will
> help.
>
> A.K.
>
>
>
>
> - Original Message -
> From: jim holtman
> To: Karan Anand
> Cc: r-help@r-project.org
> Sent: Monday, July 2, 2012 9:04 AM
> Subject: Re: [R] enquiry
>
> try this:
>
>> as.Date('1951-52', fo
try this:
> as.Date('1951-52', format = "%Y-%j")
[1] "1951-02-21"
>
On Mon, Jul 2, 2012 at 5:44 AM, Karan Anand wrote:
> hi,
> i am new to using r .so if you can pls tell me how to read "1951-52"
> ,"1952-52" date format in r
>
> [[alternative HTML version deleted]]
>
> _
David's answers were correct. You are looking deep into the code when
there is no reason to to so.
1. h(t|(X=x,Z=z)) = exp(Beta0 + XZBeta1)
Most statisticians will tell you that this is an unwise model. The
reason is that if you replace X with "X+1" the fit changes, which is
almost never desira
On May 28, 2011, at 10:58 AM, Chim Kaho wrote:
Hi there,
I am currently working on my dissertation which is about testing the
martingale hypothesis in the stock market using a methodology
involving a
range of variance ratio tests and multiple variance ratio tests. I
contacted
the author o
ah06981 wrote:
>
> Dear R-help,
>
> I am trying to estimate a Cox model with nested effects basing on the
> minimization of the overall AIC; I have two frailties terms, both gamma
> distributed. There is a error message (theta2 argument misses) and I
> don?t understand why. I would like t
13 matches
Mail list logo