Dear Miao,
substr() ius waht you want.
substr("ABCD", 2,2)
[1] "B"
Cheers,
Henrik
jpm miao schrieb:
Dear Daniel and Jorge,
Thank you very much and it does help.
If I have a string "ABCD", how can I access the second element of the
string "B"? Thanks,
Miao
2012/7/27 Daniel Nordlund
Stop posting HTML. What you see is NOT what we see.
As regards to your problems... you need to learn how to get data into and out
of R, so please read the R Input/Output document supplied with R. The most
foolproof way is to write the data to a CSV file and read it from there into a
spreadsheet
Hi all,
I'm a newbie to R and it has been very helpful to use your website.
Unfortunately I've been struggling with my code now for two days so I wanted
to ask few questions. I've been trying to create nice graphs to put into a
pdf sheet but I'm having little problems with all the packages I've be
Hi Jean,
Thank you very much for getting back to me.
I tried the solutions that you have provided.
First I tried the
coef(result) statement
.and I got the below output
>coef(result)
(Intercept)X Volume
-30.40275264 0.57786290 0.02594024
Then, I simply selecte
I'm using eleaps to build a forward selection algorithm iteratively, but
the program unexpectedly crashes. In fact, it completely closes my session
in RStudio. The first 39 steps work fine, but on the 40th step, it
unexpectedly stops with no errors. I've isolated the error to the code
snippit below
Thanks a ton, much appreciated.
On 26-Jul-2012, at 8:35 PM, John Kane [via R] wrote:
> Let me count the ways...
>
> R supplies a number of different ways. Here is sample using basic R and some
> other packages. Youprobably will need to install the packages (
> ?install.packages) to run any
Thanks a ton, much appreciated...
On 26-Jul-2012, at 7:56 PM, Michael Weylandt [via R] wrote:
> On Thu, Jul 26, 2012 at 3:59 AM, guruappa <[hidden email]> wrote:
>
> > Hello all,
> >
> > I am a newbie at R, with some experience in PERL.
> >
> > I have a database table that contains the follo
Dear Daniel and Jorge,
Thank you very much and it does help.
If I have a string "ABCD", how can I access the second element of the
string "B"? Thanks,
Miao
2012/7/27 Daniel Nordlund
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.or
Hi Josh,
Check ?formatC and ?sprintf for some options.
Regards,
Jorge.-
Sent from my phone. Please excuse my brevity and misspelling.
On Jul 27, 2012, at 12:49 AM, LCOG1 wrote:
> Hi all,
> Trying to use an apply to add leading zeros to a set of values in a
> given vector. I only want to ad
Thank you, all !
That's very helpful.
Kind regards,
Chintanu
=
On Fri, Jul 27, 2012 at 12:57 PM, arun wrote:
> Hi,
>
> Try this:a<-c(4,5,23,34,43,54,56,65,67,324,435,453,456,567,657)
> a1<-melt(table(cut(a,breaks=c(0,10,20,30,60,120,240,480,960
> a2<-d
Hello,
I just joined this list today, so am worried about proper protocol, but would
like to post a question about lme4.
In Baayen, Davidson, and Bates (2008), Mixed-effects modeling with crossed
random effects for subjects and items, the authors describe steps for a Latin
Square Design (p. 40
Much easier than you think:
x <- c(1L, 9000L)
sprintf("%05i",x)
Best,
Michael
On Thu, Jul 26, 2012 at 8:08 PM, LCOG1 wrote:
> Hi all,
> Trying to use an apply to add leading zeros to a set of values in a
> given vector. I only want to add enough zeros so that the total number of
> charac
Hi,
Try this:a<-c(4,5,23,34,43,54,56,65,67,324,435,453,456,567,657)
a1<-melt(table(cut(a,breaks=c(0,10,20,30,60,120,240,480,960
a2<-data.frame(sapply(a1,function(x) gsub("\\(|\\]","",gsub("\\,","-",x
colnames(a2)<-c("numbers","Freq")
a2
# numbers Freq
#1 0-10 2
#2 10-20 0
#3
Hello,
I just joined this list today, so am worried about proper protocol, but would
like to post a question about lme4.
In Baayen, Davidson, and Bates (2008), Mixed-effects modeling with crossed
random effects for subjects and items, the authors describe steps for a Latin
Square Design (p. 40
Hi all
I was running randomForest with R 2.51.1& RStudio 0.96.316. when i fit
a classificassion there is an error "cannot allocate vector of size 113.3
Mb".then I saved workspace as default and quit RStudio. I try open it
later, it show the error"
Error: cannot allocate vector of size 27
Hello!
Is there an implementation of the MetaCost algorithm in R?
I found a project here:
https://r-forge.r-project.org/scm/viewvc.php/src/mlrCost/metacost.r?root=mlr&view=log
But I'm not sure about its status - it seems unfinished to me.
My goal is to use MetaCost for cost-sensitive learning of
HI,
I am not getting errors with this:
myvar1<- array(1:3, c(2,4))
myvar2<- array(4:6, c(2,4))
names(myvar1)
#NULL
names(myvar1)<-as.numeric(1:8)
names(myvar1)
[1] "1" "2" "3" "4" "5" "6" "7" "8"
names(myvar2)<-names(myvar1)
names(myvar2)
[1] "1" "2" "3" "4" "5" "6" "7" "8"
#But, if you loo
I wanted to wrap this up, since I feel it's been resolved.
R_HOME never did need to over-ridden by me, was not being over-ridden in
spite of my attempts, and was never a factor during the long period when
'everything worked'.
In fact, my entire ordeal was caused by removing a comment from the
rpr
Thank you Erdal and Hadley for your answeres. It now works perfectly.
Also, I will look at the github solution, even if I don't have any
experience of Ruby.
Once again, thank you.
Richard
2012/7/26 Hadley Wickham :
> On Thu, Jul 26, 2012 at 4:18 AM, Richard Ohrvall
> wrote:
>> Dear all,
>>
>> I
Hi all,
Trying to use an apply to add leading zeros to a set of values in a
given vector. I only want to add enough zeros so that the total number of
characters is 5, so if I have an element "1" i want "1" or "9000" I want
"09000". I tried
vec <- 1:1000
sapply(vec, FUN = sprintf(paste
Inline.
-- Bert
On Thu, Jul 26, 2012 at 8:12 PM, li li wrote:
> Thank you for the reply. I do have another question.
>
> I also want to estimate the derivatives of a density function using the
> derivatives of kernel density estimator.
>
> It is easy to write out the estimator, for example, for
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of jpm miao
> Sent: Thursday, July 26, 2012 9:12 PM
> To: r-help
> Subject: [R] How can I access the title of a table read via read.csv?
>
> Hi,
>
>I have a table which I can re
Try
colnames(fx1)[2]
See ?colnames
HTH,
Jorge.-
On Fri, Jul 27, 2012 at 12:12 AM, jpm miao <> wrote:
> Hi,
>
>I have a table which I can read via read.csv:
>
> fx1<-read.csv(file="A_FX_M.csv", header=TRUE)
>
> TIME REERNTDJPY GBPHKD
> 1 198001 124.26 36.030 237.96 2
Hi,
I have a table which I can read via read.csv:
fx1<-read.csv(file="A_FX_M.csv", header=TRUE)
TIME REERNTDJPY GBPHKD
1 198001 124.26 36.030 237.96 2.263980 4.8366
2 198002 126.59 36.030 244.05 2.290426 4.8765
3 198003 128.33 36.026 248.62 2.206045 4.9960
4 198004 127.
Thank you for the reply. I do have another question.
I also want to estimate the derivatives of a density function using the
derivatives of kernel density estimator.
It is easy to write out the estimator, for example, for Gaussian kernel.
The difficulty is
finding the appropriate bandwidth. Is th
On 12-07-26 9:06 PM, Spencer Graves wrote:
On 7/26/2012 4:51 PM, Duncan Murdoch wrote:
On 12-07-26 4:22 PM, Spencer Graves wrote:
Hello, All:
What references exist on how to link to C?
I'm familiar with sections 5.2 and 5.6 of the "Writing R
Extension" manual plus chapter
Various abortive attempts have been tried, but no -- nothing of production
quality. [To my knowledge]
Michael
On Jul 26, 2012, at 3:37 PM, suman kumar wrote:
> Hi all, is there a package for converting R code into C code?
> Thanks.
> Suman
>
>
>
> --
> View this message in context:
> http
Thank you very much.
Actually I have to delete the quotation mark of the file name in the file
"B_M2Q.csv"
A_FX_M.csv
and then it would work.
A similar problem emerges but I can't find a solution. The next step is to
read the date.
My date in the csv file is in the format "1981-01"
I can't read i
On Jul 26, 2012, at 4:46 AM, Guillaume Meurice wrote:
Dear all,
I was willing to use the library "rgl" to plot some 3D graphics, but
unfortunately, I wan't able to instal the library. The error message
is below.
I would be very grateful if you could give me any clues about how I
can so
table(cut(numbers, c(0, 10, 20, 30, . . .), include.lowest=TRUE))
--
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-hel
Combine cut() and table()
Michael
On Jul 26, 2012, at 8:22 PM, Chintanu wrote:
> Hi,
>
> This is a simple problem, but for the life of me I cannot find the answer.
> How to determine frequency within given ranges ?
> I know that table() gives frequency, for example
>
> a <- table(numbers)
>>
Hi,
This is a simple problem, but for the life of me I cannot find the answer.
How to determine frequency within given ranges ?
I know that table() gives frequency, for example
a <- table(numbers)
> a
numbers
4 5 23 34 43 54 56 65 67 324 435 453 456 567 657
2 1 2 2 1 1
On 7/26/2012 4:51 PM, Duncan Murdoch wrote:
On 12-07-26 4:22 PM, Spencer Graves wrote:
Hello, All:
What references exist on how to link to C?
I'm familiar with sections 5.2 and 5.6 of the "Writing R
Extension" manual plus chapter 6 of Venables and Ripley (2000) S
Programming
On Thu, Jul 26, 2012 at 4:19 PM, Thomas Lumley wrote:
> YOu need to update the survival package: from its NEWS file
>
> Changes in version 2.36-14
>A supposedly cosmetic change to coxph in the last release caused
> formulas with a "." on the right hand side to fail. Fix this and add a
> case
Hello,
Try the following.
m <- unlist(months)
v <- unlist(values)
aggregate(v ~ m, FUN=sum)
tapply(v, m, sum)
Hope this helps,
Rui Barradas
Em 26-07-2012 18:49, jcrosbie escreveu:
I have two data frames. One with a matrix of months and the other with a
matrix of values. The two dataframes c
On 12-07-26 4:22 PM, Spencer Graves wrote:
Hello, All:
What references exist on how to link to C?
I'm familiar with sections 5.2 and 5.6 of the "Writing R
Extension" manual plus chapter 6 of Venables and Ripley (2000) S
Programming (Springer). From these, I get the following:
On 12-07-26 7:46 AM, Guillaume Meurice wrote:
Dear all,
I was willing to use the library "rgl" to plot some 3D graphics, but
unfortunately, I wan't able to instal the library. The error message is below.
I would be very grateful if you could give me any clues about how I can solve
this.
I d
YOu need to update the survival package: from its NEWS file
Changes in version 2.36-14
A supposedly cosmetic change to coxph in the last release caused
formulas with a "." on the right hand side to fail. Fix this and add a
case with "." to the test suite.
-thomas
On Thu, Jul 26, 2012 at
Not answering your question but .
coord <- as.data.frame(coord)
names(coord) <- c("x","y")
require(deldir)
tryit <- deldir(coord)
plot(tryit)
yields the attached graph. No problema.
cheers,
Rolf Turner
On 26/07/12 19:26, Jean-Luc Dupouey wrote:
Dear
Hi all,
I cant' wrap my head around an error from the coxph function (package
survival). Here's an example:
library(survival)
n = 100;
set.seed(1);
time = rexp(n);
event = sample(c(0,1), n, replace = TRUE)
covar = data.frame(z = rnorm(n));
model = coxph(Surv(time, event)~ . , data = covar)
R g
Actually, better to use the names() extractor.
?names
-- Bert
Sent from my iPhone -- please excuse typos.
On Jul 26, 2012, at 3:08 PM, Rui Barradas wrote:
> Hello,
>
> About the cause of your problem, it's difficult to have an idea without any
> code. But maybe it's helpfull to know that 'na
I rather suspect you don't understand what it means to name an array.
Consider this example:
> myvar <- 1:4> myvar
[1] 1 2 3 4
> names(myvar)
NULL
> names(myvar) <- letters[1:4]
> myvar
a b c d
1 2 3 4
> names(myvar)
[1] "a" "b" "c" "d"
> as.numeric(names(myvar))
[1] NA NA NA NA
Warning message:
I would suggest that you think in terms of several different working
directories, one for each project and located wherever you want, rather
than a "WorkingDirectory" with sub-directories.
Then, when you start R, learn how to set its working directory to a
project's directory. That will keep your
Actually you probably want the full manual. It is here
http://cran.r-project.org/doc/manuals/fullrefman.pdf
--
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352
> -Original Message-
> From:
Hello,
About the cause of your problem, it's difficult to have an idea without
any code. But maybe it's helpfull to know that 'names' is an attribute,
so you can see its value with
attr(x, "names") # just 'names' attribute
attributes(x)# values of all attributes
Hope this helps,
Ru
You asked why you could not get two discriminant functions and that question
was answered. The number of discriminant functions is one less than the
number of groups (assuming you have more variables than groups). Now you are
asking a different question. How to plot the discriminant boundary betwee
Hello,
Surely one of
f <- function(a) a^2 - a - 8.313
curve(f, from=0, to=1)
# zeros of f
root <- polyroot(c(-8.313, -1, 1))
ifelse(Im(root) == 0, Re(root), root)
# minimum of f
optimize(f, interval=c(0, 1))
Hope this helps,
Rui Barradas
Em 26-07-2012 22:13, Nordlund, Dan (DSHS/RDA) escreve
If you want a recommendation, why not use the one that comes with the manual
page for density():
?density
Under bw
"The default, "nrd0", has remained the default for historical and
compatibility reasons, rather than as a general recommendation, where e.g.,
"SJ" would rather fit, see also V&R (20
Hello,
I am using names function to name an array.
It works first time when I use *as.numeric(names(myVar1)*
However, at a place later, when I tried to use a very similar line of code
*as.numeric(names(myVar2)*, it always returned 'numeric(0)' (or if I only
type 'names(myVar2), it gave me NULL'.
I've searched hard in texts, email threads, FAQs etc. and cannot find out how
to successfully utilize sub-directories below my WorkingDirectory. I can
create them, and create R objects within the sub-directories but (a) the
objects() command lists ONLY the objects in the WorkingDirectory and no
The values need not be a data frame as the number of unique months
could be different among the columns, right?. So you're going to have
to rethink your data structure. Probably as a list.
Once you get that straight,?tapply and friends should make it trivial,
if I understand you correctly.
-- Ber
Hi all, is there a package for converting R code into C code?
Thanks.
Suman
--
View this message in context:
http://r.789695.n4.nabble.com/code-coverter-r-to-C-tp4637999.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-projec
Hi Dennis,
Part of my problem could be that I'm unsure how to nest another variable
withn spd.f. Perhaps if I give a better explanation of my goal things will
make more sense.
My intent is to calculate two sets of confidence intervals to show the
benefits of a DOE approach versus a Non-DOE appro
Hi Arun,
Bymistake it kept X instead of Z16.
--
View this message in context:
http://r.789695.n4.nabble.com/Getting-warning-message-tp4637928p4637983.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
Dear list
I have a data set involving binary responses (successes failures) for which
some explanatory variables result in a quasi complete separation problem.
To deal with the separation problem I tried to run a glm with "bayesglm" in
the arm package.
However when I try to compare different bay
I have two data frames. One with a matrix of months and the other with a
matrix of values. The two dataframes correspond to each other. I would like
to sum up all the values in by month.
What would be an efficient way to do this?
a=C(2,3,5,2,3,5)
b=c(2,6,3,2,6,3)
c=c(2,6,7,2,6,5)
months <- dat
On Thu, Jul 26, 2012 at 5:16 PM, Diviya Smith wrote:
> Thank you for pointing me to the uniroot function?
>
> Is there a way to constrain this solution so that it only gives me values
> of 'a' between c(0,1)?
>
> I tried using nlminb and for some reason it always estimates a = 0, even
> when I cha
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Diviya Smith
> Sent: Thursday, July 26, 2012 1:50 PM
> To: r-help@r-project.org
> Subject: Re: [R] Solving quadratic equation in R
>
> Sorry it is important for me to constrain t
Sorry it is important for me to constrain the value of 'a' between c(0,1)
On Thu, Jul 26, 2012 at 4:48 PM, Diviya Smith wrote:
> Hi there,
>
> I would like to solve a simple equation in R
>
> a^2 - a = 8.313
>
> There is no real solution to this problem but I would like to get an
> approximate nu
Hi there,
I would like to solve a simple equation in R
a^2 - a = 8.313
There is no real solution to this problem but I would like to get an
approximate numerical solution. Can someone suggest how I can set this up?
Thanks in advance,
Diviya
[[alternative HTML version deleted]]
___
This will work:
model2007 <-
You can't start an identifier with a digit.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of msherwood
Sent: Thursday, 26 July 2012 9:44a
To: r-help@r-project.org
Subject: [R] Package 'nlme' linear mixed
Hello, All:
What references exist on how to link to C?
I'm familiar with sections 5.2 and 5.6 of the "Writing R
Extension" manual plus chapter 6 of Venables and Ripley (2000) S
Programming (Springer). From these, I get the following:
R storage mode C type
logical i
Hi,
You can try predict.rpart in rpart package for prediction on a test data.
?predict.rpart
Weidong
On Thu, Jul 26, 2012 at 12:30 PM, Orla Carey wrote:
> Hello,
>
> I am running classification trees fro the purpose of predicting dividends.
> I have training and test data sets, but am running t
"The following object(s) are masked from 'package:A'"
is equivalent to "The following object(s) from 'package:A' are masked"
and perhaps that might be a more universally understood phrasing.
I do find this better but I don't see any real need to change the status quo.
It becomes fairly obvious af
I might suggest:
integrate(dnorm, lower = -1.96 + 2 , upper = 1.96 + 2, mean = 2, sd = 1)
instead.
Incidentally, (and since I find this treatment of ... somewhat opaque)
I think anonymous first class functions are much easier:
integrate(function(x) dnorm(x, mean = 2, sd = 1), lower = -1.96, upp
Your post is unacceptable (imho, of course). Read the bottom of
this message (re: "posting guide") and re-post properly.
-- Bert
On Thu, Jul 26, 2012 at 9:30 AM, Orla Carey wrote:
> Hello,
>
> I am running classification trees fro the purpose of predicting dividends.
> I have training and test d
It would be a useful additon to the help page to add
integrate(dnorm, lower = -1.96, upper = 1.96, mean = 2, sd = 1)
as an example.
Thanks,
Frank
Chicago
> Date: Mon, 23 Jul 2012 19:54:45 -0700
> From: ehl...@ucalgary.ca
> To: kri...@ymail.com
> CC: chicagobrownb...@hotmail.com; r-help@
Sadly, your commonly held belief is wrong (imho) -- p
values/statistical significance are not a legitimate decision criteria
for model "appropriateness," especially scientific appropriateness.
That requires more careful consideration of a relevant "utility
function" (to use Frank Harrell's phrase),
1. Your post is unacceptable (imho, of course). Read the bottom of
this message (re: "posting guide") and re-post properly.
2. This is not an R-help question. Re-post on r-sig-mixed-models -- or
perhaps on a non-R statistical forum like stats.stackexchange.com, as
this appears to have little to do
Hi,
I'm trying to using pspline in bic.surv{BMA}.
#
library(BMA)
library(survival)
data(veteran)
test.bic.surv<- bic.surv(Surv(time,status) ~
karno+pspline(age,df=3)+diagtime+prior, data = veteran, factor.type = TRUE)
summary(test.bic.surv, conditional=FALSE, digits=2
Hello,
I am running classification trees fro the purpose of predicting dividends.
I have training and test data sets, but am running to issues when
evaluating the prediction accuracy of the tree as it isn't a simple
'predict' formulation as the determinant variable is not a simple set of
classifyi
Hi all,
I've fit a mixed linear model to some longitudinal data. I'm interested in the
differences in patterns of decrease in the dependent variable according to
group status, and my hypothesis particularly predicts a difference between the
groups in trajectory of change at between specific a
HI,
I posted reply in nabble.
One more comment regarding your code. If your dataset is X. I wonder how it
changed to Z16. Probably, you have to use X[5,2:5]
A.K.
- Original Message -
From: namit
To: r-help@r-project.org
Cc:
Sent: Thursday, July 26, 2012 9:23 AM
Subject: [R] Get
You can make different lm objects by adding all predictors and compare them
with anova(lm1,lm2,lm3...). See if p value is not significant, the more
complex model is not appropriate.
Dr Suman Kumar
--
View this message in context:
http://r.789695.n4.nabble.com/SSEc-and-SSEr-tp4637855p4637963.ht
It's sad, but not an impossible result with synchronization overhead
(though I wouldn't have guessed it would be that bad) -- can you try
it on a more reasonable benchmark?
Also, that advice might be somewhat out of date -- why not use the
tools provided in
library(parallel)
available for recen
On Thu, Jul 26, 2012 at 7:59 AM, Carrie Wager wrote:
> I'm currently developing several tools in R that I'd like to deploy for use
> by multiple analysts in my research group. Many of the analysts have no
> background in using R (but have plenty of experience with SAS), so part of
> my effort will
Is this what you mean?
dat1 <- data.frame( spd = c("s","f","f","s","f","s","s","s","f","f","s","f"),
r = c(4.9,3.2,2.1,.2,3.8,6.4,7.5,1.7,3.4,4.1,2.2,5))
myplot<-ggplot(dat1, aes(spd, r, colour = spd)) +
geom_errorbar(aes(ymin=3, ymax=5), width=.1) +
geom_point() + coord_flip
Hi.
I don't know how did you create data frame X but if you check str(X) you
will see that you have one or more factors inside.
Try using stringsAsFactors=FALSE options while creating data frame.
Hope this helps.
Andrija
On Thu, Jul 26, 2012 at 3:23 PM, namit wrote:
> Hi Friends,
>
>
> I have
Something as simple as dat1[2,2] <- "3%" where your data is in a data.frame
called dat will change 3 to 3% it but it changes everything in that column to
character if it was numeric.
str(dat1)
John Kane
Kingston ON Canada
> -Original Message-
> From: saileshchowd...@gmail.com
> S
Hi Friends,
I have a data frame X, and I want to add “%” & “$” in row 4 and 5
respectively. when I’m trying using below logic, I’m getting warning
message.
Can anyone help me out on this.
X:
Summary G Y R T
Accts582644 0 1226
AcctCov 230
Check str(lmobj). You can see the underlying structure of lm object. It is
actually a list. You can access its individual components with $ operator.
Bye
--
View this message in context:
http://r.789695.n4.nabble.com/Working-with-Numbers-generated-from-Regression-Output-tp4637919p4637957.htm
Ok, here a simple example. The file
http://r.789695.n4.nabble.com/file/n4637924/test.csv test.csv has 400 lines
containing 20 columns (1. column is class label, the other 19 are the
features).
So what I'm doing is
/
data <- read.csv(file="test.csv", head=F, sep=",")
names(data) <- c("Class","V1
Hi,
I am trying to optimize a complex model calibration using a genetic algorithm.
I choose rgenoud package because it allows for easy parallelization through
snow package. I am on a Mac Pro with 2 x 2.66 GHz 6-Core Intel Xeon machine,
i.e. I have 12 CPUs available.
So I set the cluster optio
thanks! the line command worked well.
--
View this message in context:
http://r.789695.n4.nabble.com/Adjust-the-position-of-main-in-par-mfrow-tp4637901p4637948.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mail
HI,
I guess this should be the one:
dat1<-read.table(text="
Postal Code | Superb
City1 | 2134 | 2
City2 | 254 | 5
City3 | 12 | 54433
",sep="|",header=TRUE)
write.table(dat1,"dat7.txt",sep="|",quote=FALSE)
#contents of dat7.txt
Postal.Code|
Dear all,
I have been trying to plot hazard function in R for survival data, but in
vain.
Can anybody help me out in plotting hazard function in R?
Dr Suman Kumar
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-plot-hazard-function-for-coxph-model-tp4637953.html
Sent fro
You can try this one...
#
library(RCurl)
library(rjson)
ids <- c("tt0110074", "tt0096184", "tt0081568", "tt0448134", "tt0079367")
titles <- data.frame()
for ( i in 1:length(ids)) {
req <- paste("http://www.imdbapi.com/?i=";, ids[i] , "&tomatoes=TRUE",
sep="")
u <- getURL(req)
j <- fromJSON(u
Thanks Gabor for your invaluable help! I learned a lot.
--
View this message in context:
http://r.789695.n4.nabble.com/strapply-and-characters-adjacent-to-the-matched-pattern-tp4637673p4637939.html
Sent from the R help mailing list archive at Nabble.com.
___
Hi all,
I am using R package 'ordinal' to fit a cumulative logit ordinal model with
random effects. Does someone know
1) The optimization method used in estimating the parameters from the
marginal likelihood?
2) In Adaptive Gauss-Hermite Quadrautre, let f() be the function to be
intergrated. The
Dear R-help list,
apparently lda from the MASS package can be used in situations with
collinear variables. It only produces a warning then but at least it
defines a classification rule and produces results.
However, I can't find on the help page how exactly it does this. I have a
suspicion (
Hello,
I'm attempting to plot error bars side by side rather than stacked on top
of each other with ggplot2. Here is the sample code I am using:
#Code
#Data
spd<-c("s","f","f","s","f","s","s","s","f","f","s","f")
r<-c(4.9,3.2,2.1,.2,3.8,6.4,7.5,1.7,3.4,4.1,2.2,5)
#Turn spd into a factor
spd.f<
Hello all,
My problem is similar to Sergey's.
I could not try what Mario suggested, since doMPI is not available for
windows.
I have tried the Cedrick's commands, i.e.
cl.tmp = makeCluster(rep("localhost",2), type="SOCK")
registerDoSNOW(cl.tmp)
but this is instead increasing the time taken. Fo
Hey,
I want to estimate a spatial linear mixed model y=X\beta+Zv+e with e\sim
N(0,4) and v\sim N(0,G).
G is a covariance matrix of a simultaneously autoregressive model (SAR) and
is given by
G=\sigma_v^2((I-pW)(I-pW^T))^{-1} where p is a spatial correlation parameter
and W is a matrix which desc
Hi,
I have problem to read hdf4 files in R, I would be very grateful if
somebody can tell me how to deal with hdf4 files.
I can read hdf5 using "hdf5" and "h5r" packages, but these packages does
not work for hdf4 files.
I was trying to open some MODIS data files those are in hdf4 format.
Th
Dear Henrik
Thank you so much for the clarification.
Best regards
waheed
On Thu, Jul 26, 2012 at 9:32 PM, Henrik Singmann [via R] <
ml-node+s789695n463791...@n4.nabble.com> wrote:
> Dear Waheed,
>
> As you correctly inferred, these are just warnings and dont need to bother
> you now. The maint
I'm currently developing several tools in R that I'd like to deploy for use
by multiple analysts in my research group. Many of the analysts have no
background in using R (but have plenty of experience with SAS), so part of
my effort will be in training them to use the new tools. Some of the
analyse
It is really not clear what you want without some idea of what the variables
and data look like.
However if the data is in a couple of vectors you could try something like this
postal <- c(2134, 54, 12)
superb <- c(2,5,54433)
cities <- c("City1", "City2", "City3")
hds <- c("Postal.Code",
I think it has been moved to the scales package but I've never used it so I
don't know the syntax.
John Kane
Kingston ON Canada
> -Original Message-
> From: fjpcaball...@gmail.com
> Sent: Thu, 26 Jul 2012 07:41:58 -0400
> To: r-help@r-project.org
> Subject: [R] scale_y_logit not present
You can learn a lot from the help files. Check out the help files for the
lm() and summary.lm() functions
?lm
?summary.lm
You can extract the beta values in a few different ways.
These two will give you just the estimates in a vector:
coef(result)
result$coef
These two will give you the estim
Sorry, got cut off...
On Thu, Jul 26, 2012 at 8:07 AM, Bert Gunter wrote:
> 1. m2q already is a data frame, so the m2qldf statement that follows
> is completely unnecessary.
>
> 2. Please read ?read.table carefully, and especially the bit about the
> stringsAsFactors argument. The problem is that
1 - 100 of 143 matches
Mail list logo