Hi Santosh,
you may also try
require(stringr)
x - abcdefghijklcd
str_locate_all(x,cd)
On Sun, Dec 5, 2010 at 1:21 PM, Petr Savicky savi...@cs.cas.cz wrote:
On Sun, Dec 05, 2010 at 08:04:08AM +0530, Santosh Srinivas wrote:
I am trying to find the function where I can search for a pattern
Addi Wei wrote:
year10 is the time series data set below
11.64
11.50
11.49
...I tried my best to produce actual code.
Please post str(year10).
Dieter
--
View this message in context:
Dear R-users,
I want to write a class that reprints automatically when the device is resized.
Using grid graphics this can be achieved e.g. by setting the drawDetails method
for a grob which is called automatically when the device has changed.
Grid graphics are too slow for my application and
Hello All,
I am trying to use the unfold function in RcmdrPlugin.survival library,
which converts the survival data with time varying covariates to the
counting process notation. The problem is somehow, the event indicator
created is not correct.
Below is the data, I am trying to convert:
On 03/12/2010 7:08 AM, Duncan Murdoch wrote:
On 02/12/2010 9:59 PM, Rolf Turner wrote:
On 3/12/2010, at 3:48 PM, David Scott wrote:
On 03/12/10 14:33, Duncan Murdoch wrote:
SNIP
I think the fill=TRUE option arrived about 10 years ago, in R 1.2.0.
The comment in the NEWS file
Hello Group,
I am experimenting with parallel processing ... here is part of my code.
require(snow)
require(doSNOW)
require(foreach)
cl.tmp = makeCluster(rep(localhost,4), type=SOCK)
registerDoSNOW(cl.tmp)
foreach(i=1:NROW(sDat),.packages=gdata,.verbose=TRUE) %dopar% {
do something 1
Dear R users,
It may be very simple but it is being difficult for me.
I have two vectors with some common string. And, i want to combine into a
vector in such a way that it includes string from both vectors and make a
unique.
For example:
x - paste(rep(A,5),1:5,sep = .)
x
[1] A.1 A.2 A.3
On 05/12/2010 9:57 AM, ram basnet wrote:
Dear R users,
It may be very simple but it is being difficult for me.
I have two vectors with some common string. And, i want to combine into a
vector in such a way that it includes string from both vectors and make a
unique.
For example:
x-
Hi there,
I didn't fully follow your code, but allow me to ask:
*What is your input - and what do you want to output to be?*
Is you input a vector (array) of points?
Is your output some sort of averaging of the points according to order?
If you searching for a function to smooth a sequance of
unique(c(x,y))
On Sun, Dec 5, 2010 at 8:27 PM, ram basnet basnet...@yahoo.com wrote:
Dear R users,
It may be very simple but it is being difficult for me.
I have two vectors with some common string. And, i want to combine into a
vector in such a way that it includes string from both vectors
Hi Harold,
I think the error stems from the data.frame you are entering into the
predict function.
Your data.frame must have the EXACT column name as the one used for the
creation of the model object.
Is that the case in your code?
Best,
Tal
Contact
On Dec 5, 2010, at 9:57 AM, ram basnet wrote:
Dear R users,
It may be very simple but it is being difficult for me.
I have two vectors with some common string. And, i want to combine
into a vector in such a way that it includes string from both
vectors and make a unique.
For example:
x
I have the same problem of a prevous request
HOW to use the survivalROC (or another library in R) to get optimal
cut-off values?
I want to use the time-dependent survivalROC package.according to
the,reference material,it only gives a set of ordered cut-off values
.eg.
On Dec 5, 2010, at 11:14 AM, petre...@unina.it wrote:
I have the same problem of a prevous request
HOW to use the survivalROC (or another library in R) to get optimal
cut-off values?
I want to use the time-dependent survivalROC package.according to
the,reference material,it only gives a
Example data
desk=data.frame(
deskchoice=c('mid','mid','left','bookdrop','mid','bookdrop')
)
--
I like doing stuff like the line below, especially when I'm using Sweave.
print(paste('Within the observation period,',nrow(desk),
'patrons approached the circulation desk.'))
--
But what if I
On Sun, Dec 5, 2010 at 11:50 AM, Thomas Levine thomas.lev...@gmail.com wrote:
Example data
desk=data.frame(
deskchoice=c('mid','mid','left','bookdrop','mid','bookdrop')
)
--
I like doing stuff like the line below, especially when I'm using Sweave.
print(paste('Within the observation
I have the same problem of a previous request
HOW to use the survivalROC (or another library in R) to get optimal
cut-off values?
I want to use the time-dependent survivalROC package.according to
the,reference
material,it only gives a partial set of ordered cut-off values .eg.
Hi Mario,
On Sun, Dec 5, 2010 at 10:11 AM, petre...@unina.it wrote:
I have the same problem of a previous request
HOW to use the survivalROC (or another library in R) to get optimal cut-off
values?
I want to use the time-dependent survivalROC package.according to
the,reference
On Dec 3, 2010, at 17:17 , S Ellison wrote:
David,
Thanks for the comments.
I think, though, that I have found the answer to my own post.
Question: How would one check, in R, that [contrasts .. are
'orthogonal in the row-basis of the model matrix'] for a particular
fitted linear
On 6/12/2010, at 3:00 AM, Duncan Murdoch wrote:
I was going to suggest using DIF rather than CSV. It contains more
internal information about the file (including the type of each entry),
but has the disadvantage of being less readable, even though it is ascii.
I don't think DIF is
On Dec 5, 2010, at 2:14 PM, Rolf Turner wrote:
On 6/12/2010, at 3:00 AM, Duncan Murdoch wrote:
As of r53778, the bugs I noticed should be fixed. read.DIF now
respects
the internal type information, so it will keep character strings like
001 as type character (unless you ask it to change
Your problem arises because predict() is using
the value d=10 whenever it evaluates poly(x,d,raw=TRUE).
The details are that this is the value that d in your
function polyModelSelection had when the function finished.
That value is stored in the environment
On Dec 5, 2010, at 11:33 AM, David Winsemius wrote:
On Dec 5, 2010, at 11:14 AM, petre...@unina.it wrote:
I have the same problem of a prevous request
HOW to use the survivalROC (or another library in R) to get optimal
cut-off values?
I want to use the time-dependent survivalROC
Hi Tal,
That is correct. In the code, I actually call the same exact data.frame that
was used to create the object. I understand I can call predict() without a
data.frame to get this result, but I would like to predict other datasets as
well.
Thanks,
Harold
On Dec 5, 2010, at 7:18 AM, Tal
If i insert \u2264 inside the text, like this
lsd_label - LSD (P \u2264 0.05) =
the result is
LSD (P = 0.05) =
instead
LSD (P ≤ 0.05) =
how can i solve this problem?
Thanks.
--
View this message in context:
Dear expeRts,
I am struggling with warning/error handling.
I would like to call a function which can produce either
a) normal output
b) a warning
c) an error
Since the function is called several (thousand) times in a loop, I would like
to proceed quietly and collect the warnings and errors
Suppose I have x variables x1, x2, x3 (however in general I don't know
how many x variables there are). I can do
X-cbind(x1,x2,x3)
lm(y ~ X)
This fits the no-interaction model with b0, b1, b2, b3.
How can I get lm() to fit the model that includes interactions when I
pass X to lm()? For my
Hi,
I suspect this has to do with your locale, as it seems to work on my
system. Take a look at:
Sys.getlocale() # see yours
?Sys.setlocale # documentation
If you're are talking about something to add to a graph (e.g., in the
title or labelling a point) try:
sd_label - substitute(LSD~(P =
On Dec 5, 2010, at 3:19 PM, William Simpson wrote:
Suppose I have x variables x1, x2, x3 (however in general I don't know
how many x variables there are). I can do
X-cbind(x1,x2,x3)
lm(y ~ X)
This fits the no-interaction model with b0, b1, b2, b3.
How can I get lm() to fit the model that
Hi Bill,
If you can put all (and only) your variables into a dataframe, (for example:
X - data.frame(y, x1, x2, x3)
)
then another alternative to David's solution would be:
lm(y ~ .^3, data = X)
'.' will expand to every column except y, and then the ^3 will get you
up to 3-way interactions.
On 05/12/2010 2:14 PM, Rolf Turner wrote:
On 6/12/2010, at 3:00 AM, Duncan Murdoch wrote:
I was going to suggest using DIF rather than CSV. It contains more
internal information about the file (including the type of each entry),
but has the disadvantage of being less readable, even though
Thanks for the replies.
I was just thinking that, for a two variable example, doing
X-cbind(x1,x2,x1*x2)
lm(y~X)
would work. So maybe that's what I'll do. This also allows me to pick
and choose which interactions to include.
Cheers
Bill
On Sun, Dec 5, 2010 at 8:19 PM, William Simpson
Thanks Paul... I wasn't sure in what way the end points were identical and
was testing differently, and failing to catch it. I'll have to check my
computations now to see why I'm getting curves that meet this condition, as
I don't think I should be. But I'm back on track now. The problem with
On Dec 5, 2010, at 3:13 PM, Marius Hofert wrote:
Dear expeRts,
I am struggling with warning/error handling.
I would like to call a function which can produce either
a) normal output
b) a warning
c) an error
Since the function is called several (thousand) times in a loop, I
would like
to
On 2010-12-06, at 01:07 , David Winsemius wrote:
On Dec 5, 2010, at 3:13 PM, Marius Hofert wrote:
Dear expeRts,
I am struggling with warning/error handling.
I would like to call a function which can produce either
a) normal output
b) a warning
c) an error
Since the function is
Hello again,
I have found that if I use sapply, I do not get a warning, i.e.,
lbl1 = sapply(d[,var1],label)
works correctly and gives no warning.
I'm sorry this did not occur to me earlier, my apologies!
--Krishna
On Thu, Dec 2, 2010 at 11:36 AM, Krishna Tateneni taten...@gmail.comwrote:
Hi, all,
I am using the lars package for lasso estimate. So I get a lasso
fit first:
lassofit = lars(x,y,type =lasso,normalize=T, intercept=T)
Then I want to get coefficient with respect to a certain value of \lambda
(the tuning parameter), I know lars has three mode options c(step,
Oh, I just realize that I can actually just use this:
beta = coef(lassofit, s=5, mode=lambda)
Michael
On Sun, Dec 5, 2010 at 8:10 PM, michael tufemich...@gmail.com wrote:
Hi, all,
I am using the lars package for lasso estimate. So I get a lasso
fit first:
lassofit =
On Dec 5, 2010, at 7:35 PM, Marius Hofert wrote:
On 2010-12-06, at 01:07 , David Winsemius wrote:
On Dec 5, 2010, at 3:13 PM, Marius Hofert wrote:
Dear expeRts,
I am struggling with warning/error handling.
I would like to call a function which can produce either
a) normal output
b) a
So I am working on an economic model and I need to change the parameters of
the runif statement as time goes on.
Ex.
X -runif(1:50,0,5)
X -runif(51:100,100,150)
X -runif(100:T, 1,2)
Not sure how to go about entering this in to R properly.
--
View this message in context:
So I am working on an economic model and I need to change the parameters of
the runif statement as time goes on.
Ex.
X -runif(1:50,0,5)
X -runif(51:100,100,150)
X -runif(100:T, 1,2)
Not sure how to go about entering this in to R properly.
--
View this message in context:
Dear All,
I try to read the SAS transport file in R, but it shows error. Please help!
I am using R 2.11.1
library(foreign)
download.file(http://isites.harvard.edu/fs/docs/icb.topic35387.files/demo_c.xpt,C:/Desktop/demo_c.xpt;)
sasxport - read.xport(C:/Desktop/demo_c.xpt)
Error in
You didn't tell us your OS. That is a binary file, and from
?download.file:
mode: character. The mode with which to write the file. Useful
values are ‘w’, ‘wb’ (binary), ‘a’ (append) and ‘ab’.
Only used for the ‘internal’ method.
Only on Windows are the binary modes
I've had good success with the read.xport function in the SASxport (not
foreign) package. But couldn't you just use something like
mydata-read.xport('http/demo_c.xpt')
The transport file looks like it's one of the NHANES demographic files.
--
View this message in context:
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of zhiji19
Sent: Sunday, December 05, 2010 9:26 PM
To: r-help@r-project.org
Subject: [R] How to this SAS transport file in R?
Dear All,
I try to read the SAS transport file
To whom it may concern,
I have a database (an SPSS .sav file) with some vectors containing strings
of words in Cyrillic. My console, however, doesn't seem to read Cyrillics.
If I type ÐÑÐ¸Ð²ÐµÑ into the console it shows Ãðèâåò as I'm typing.
Please
note that courier new, my console's
Hi
Bryan Hanson wrote:
Hi All... I haven¹t found mention of this error anywhere. I'm trying to
draw spline curves using grid graphics. Most of the time, I have no
problems, but I have some data sets that give the error in the subject line.
I'm not sure which end points are identical, but the
pythonomics wrote:
So I am working on an economic model and I need to change the parameters
of the runif statement as time goes on.
X -runif(1:50,0,5)
X -runif(51:100,100,150)
X -runif(100:T, 1,2)
T=1000
c(runif(1:50,0,5), runif(51:100,100,150),runif(100:T, 1,2))
Dieter
--
View
Cheers Dieter. You are a true bro.
--
View this message in context:
http://r.789695.n4.nabble.com/Runif-Help-same-variable-3-different-parameters-tp3073894p3074041.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
49 matches
Mail list logo