Hi everyone,
I want to modify two base R functions 'parse' and 'deparse'
immediately after R has started, so I added some code in the file
'Rprofile.site' under the 'etc' directory. Here is a simple example:
parse=function(...){
base::parse(...)
}
I'll get an error when I start R as follows:
Accepted and forgotten. It just reminds us to check on our prejudices once
in a while. Also, I realized that my description was not entirely accurate.
You actually had to click the link on the page you posted to get this:
http://www.odesk.com/jobs/College-Assistance_~~dd7622f6bdef9177
I am an MSc
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Antonio Paredes
> Sent: Saturday, October 03, 2009 5:53 PM
> To: r-help@r-project.org
> Subject: [R] Stranger Behavior -maybe not
>
> Hello everyone,
>
> When I run a for loop I
On 10/03/2009 04:15 AM, Andrew Spence wrote:
Dear R-help,
First of all, thank you VERY much for any help you have time to offer. I
greatly appreciate it.
I would like to write a function that, given an arbitrary number of factors
from a data frame, tabulates the number of occurrences of eac
Hi everyone,
Thanks for the help in advance. I just want to know if there is absolutely
any way of using multicore if my loop can't run in parallel as each
iteration depends on the previous iteration. I have Windows R 2.9.2 and
REvolution R Enterprise 2.0 for Windows 64 bit. I also have if necess
On Oct 3, 2009, at 11:14 PM, Tim Clark wrote:
David,
Thanks, that helps me in making an example of what I am trying to
do. Given the following example, I would like to run through a for
loop and obtain a vector of the data only for the 100, 75, and 50
percent values. Is there a way to
Yes of course. I was sticking to R.
On 3-Oct-09, at 7:42 PM, hadley wickham wrote:
The point Duncan was making was
"What other value would you expect it to have after incrementing
from 1 to
200 and stopping"?
Well, depending on the scoping rules of the language you are used to,
you migh
This person has probably mistaken "expelsior" for "excelsior."
However, be that as it may, I am personally annoyed by your statement,
David, in which you indicate that you believe this to be an MBA/business
school problem, especially since the delinquent clearly indicates in his
post - for which
David,
Thanks, that helps me in making an example of what I am trying to do. Given
the following example, I would like to run through a for loop and obtain a
vector of the data only for the 100, 75, and 50 percent values. Is there a way
to get this to work, either using paste as in the exampl
On Oct 3, 2009, at 10:26 PM, Tim Clark wrote:
Dear List,
I can't seem to get a simple paste function to work like I need. I
have an object I need to call but it ends in a character string.
The object is a list of home range values for a range of percent
isopleths. I need to loop throu
> The point Duncan was making was
>
> "What other value would you expect it to have after incrementing from 1 to
> 200 and stopping"?
Well, depending on the scoping rules of the language you are used to,
you might expect i at the top-level to remain undefined.
Hadley
--
http://had.co.nz/
_
The point Duncan was making was
"What other value would you expect it to have after incrementing from
1 to 200 and stopping"?
On 3-Oct-09, at 6:39 PM, Antonio Paredes wrote:
Thank you very much!!!
Next time, if I know you are going to read the e-mail; I make sure to
include an explanation
On Oct 3, 2009, at 7:05 PM, Sebastian P. Luque wrote:
Hi,
I thought the following would only remove the legend element of a
trellis object, but it actually removes both the legend and key
elements:
------
fig <- xyplot(Se
Dear List,
I can't seem to get a simple paste function to work like I need. I have an
object I need to call but it ends in a character string. The object is a list
of home range values for a range of percent isopleths. I need to loop through
a vector of percent values, so I need to paste the
Mark had intended to send the message below but due to a technical
problem only a blank message appeared on r-help:
David: I'm on the moderator list that checks which non subscriber
emails go through. I confess to letting that one
through because I figured it was better for the person to receive t
Dear all,
Have you experienced problem of using numerical.summary() function? I used
to be able to run this function in R, but not any more. Now I try to use
this function, it gives me error like this:
Error: could not find function "numerical.summary"
I used to be able to run this fu
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
On Oct 3, 2009, at 8:31 PM, Mahesh Krishnan wrote:
Hello,
Can anybody help me in solving these exercises on regular basis paid
or
unpaid basis.
If he/she want to pay by PayPal then it should be noticed that
mention at
this email kindly
your paypal email account where one can transfer mon
Thank you very much!!!
Next time, if I know you are going to read the e-mail; I make sure to
include an explanation in the form of an answer to any issue that I'm
inquiring about.
On Sat, Oct 3, 2009 at 9:17 PM, Duncan Murdoch wrote:
> On 03/10/2009 8:53 PM, Antonio Paredes wrote:
>
>> Hel
On 03/10/2009 8:53 PM, Antonio Paredes wrote:
Hello everyone,
When I run a for loop I noticed that the looping variable gets assigned the
last value in the loop:
For example, if I let h=200, and I run
for(i in 1:h),
i gets the value 200. What's wrong here?
Nothing?
Duncan Murdoch
Hi,
I thought the following would only remove the legend element of a
trellis object, but it actually removes both the legend and key
elements:
------
fig <- xyplot(Sepal.Length ~ Petal.Length, groups=Species, data=iris,
Hello,
Can anybody help me in solving these exercises on regular basis paid or
unpaid basis.
If he/she want to pay by PayPal then it should be noticed that mention at
this email kindly
your paypal email account where one can transfer money in all cases.
But please respect the deadline in al cases
Hello everyone,
When I run a for loop I noticed that the looping variable gets assigned the
last value in the loop:
For example, if I let h=200, and I run
for(i in 1:h),
i gets the value 200. What's wrong here?
--
-Tony
[[alternative HTML version deleted]]
__
Thanks, as you suggested,
do.call(rbind, lapply(foo, unlist))
does the trick.
On Sat, Oct 3, 2009 at 8:30 PM, David Winsemius wrote:
>
> On Oct 3, 2009, at 7:51 PM, Andrew Yee wrote:
>
> Take the following code:
>> foo <- list()
>>
>> foo[[1]] <- list(a=1, b=2)
>> foo[[2]] <- list(a=11, b=22)
>
On Oct 3, 2009, at 7:51 PM, Andrew Yee wrote:
Take the following code:
foo <- list()
foo[[1]] <- list(a=1, b=2)
foo[[2]] <- list(a=11, b=22)
foo[[3]] <- list(a=111, b=222)
Instead, perhaps:
> do.call(rbind, lapply(foo, unlist))
a b
[1,] 1 2
[2,] 11 22
[3,] 111 222
> do.call
The object out in my post is identical to the object, result, in your
post. If that was not what you are looking for some additional
explanation is needed on what it is that you seek.
> M <- matrix(list(1, 11, 111, 2, 22, 222), nc = 2, dimnames = list(NULL,
> c("a", "b")))
>
> foo <- list()
>
>
Gabor, thanks for the reply.
However, the output of matrix(list(1, 11, 111, 2, 22, 222), nc = 2, dimnames
= list(NULL, c("a", "b"))) is a matrix of lists.
foo <- matrix(list(1, 11, 111, 2, 22, 222), nc = 2, dimnames = list(NULL,
c("a", "b")))
foo[,'a'] # returns a list
One possible solution is as
Try this:
matrix(list(1, 11, 111, 2, 22, 222), nc = 2, dimnames = list(NULL, c("a", "b")))
or
out <- list(1, 11, 111, 2, 22, 222)
dim(out) <- c(3, 2)
colnames(out) <- c("a", "b")
On Sat, Oct 3, 2009 at 7:51 PM, Andrew Yee wrote:
> Take the following code:
> foo <- list()
>
> foo[[1]] <- list
Take the following code:
foo <- list()
foo[[1]] <- list(a=1, b=2)
foo[[2]] <- list(a=11, b=22)
foo[[3]] <- list(a=111, b=222)
result <- do.call(rbind, foo)
result[,'a']
In this case, result[,'a'] shows a list. Is there a more elegant way such
that result is a "regular" matrix of vectors? I imag
Hi,
I thought the following would only remove the legend element of a
trellis object, but it actually removes both the legend and key
elements:
fig <- xyplot(Sepal.Length ~ Petal.Length, groups=Species, data=iris,
key=list(x=1, y=0.02, corner=c(1, 0), size=3, between=1,
On 03/10/2009 5:26 PM, Jim Silverton wrote:
I have having the following error message when trying to optimize a function
using optim:
optim(c(10,100),fn,method="BFGS")
Error in optim(c(10, 100), fn, method = "BFGS") :
cannot coerce type 'S4' to vector of type 'double'
Can someone tell me
I have having the following error message when trying to optimize a function
using optim:
> optim(c(10,100),fn,method="BFGS")
Error in optim(c(10, 100), fn, method = "BFGS") :
cannot coerce type 'S4' to vector of type 'double'
>
Can someone tell me what this means?
Jim
[[alternative
(I am also cc-ing the author of Hmisc)
Hello
Thank you for clearing this up. One more concern, though.
On 10/3/09, Mark Difford wrote:
> >> Does this mean that Hmisc produces LyX code (as opposed to LaTeX code)?
> No. Sorry for confusing you: it means that html does not know what
> tabularnewli
On 03/10/2009 3:33 PM, Marianne Promberger wrote:
Two problems with your code:
(1) The "else" has to be on the same line as the closing "}" -- this was
confusing for me as well.
(2) "and" probably should be "&", but read up on logical operators: ?&
Better to always use && in an if.
Duncan M
If you look at layout's help page there appears to be a worked example
of an even more complex task. The answer appears to be assingning
numbers to regions and then inserting par(mar= with an appropriately
constructed destination arguments prior to each added piece.
--
David
On Oct 3, 200
Two problems with your code:
(1) The "else" has to be on the same line as the closing "}" -- this was
confusing for me as well.
(2) "and" probably should be "&", but read up on logical operators: ?&
Try:
ini=3
b=4
if (ini==1) {
a=3
} else if (ini>1 & b>2 ) {
a=3
} else {
a=6
}
HTH,
Ma
Dear R users,
I create a graphic with two plots side by side using layout(), like this:
layout(matrix(c(1,2),1))
plot(1:10,main="left plot")
lines(c(3:7,7:3),col="red")
plot(10:1,main="right plot")
The lines() obivously get added to the "left plot" plot.
Now, I'm trying to write a function that
On Sat, Oct 3, 2009 at 2:57 PM, LinZhongjun wrote:
>
> The reason may be that I used a vista machine. I tried on a XP machine, and
> there were no error messages..
>
Try right clicking on the R icon on your desktop and choose Run as
Adminstrator and see if that helps.
_
Duncan:
I took your suggestion and upgraded to R 2.9.2, but the problem persists.
I am not able to reproduce the problem in a simple case. In my
actual code the functions some.function.1() and some.function.2() are
quite complicated and call various other functions which also access
elements of
The reason may be that I used a vista machine. I tried on a XP machine, and
there were no error messages..
> Date: Sat, 3 Oct 2009 11:49:25 +0200
> From: lig...@statistik.tu-dortmund.de
> To: lin_zhong...@hotmail.com
> CC: r-help@r-project.org
> Subject: Re: [R] Winbugs under R's error messa
Do you have a citation for that statement? I cannot convince myself
that it should be true.
After looking at the CRAN Task View, I would suggest the OP look at
rlm(MASS) or lmrob(robustbase).
--
David
On Oct 2, 2009, at 11:05 AM, Kjetil Halvorsen wrote:
On Fri, Oct 2, 2009 at 8:45 AM, Da
Liviu,
>> Does this mean that Hmisc produces LyX code (as opposed to LaTeX code)?
No. Sorry for confusing you: it means that html does not know what
tabularnewline means, it cannot interpret it. My reply showed where the
problem lies and how to fix it.
You need to add the following command to t
Hello
On 10/3/09, Mark Difford wrote:
> This has nothing to do with Hmisc or hevea.
>
Although I have LyX installed, I don't quite understand where LyX
comes into play. The R code in the original e-mail takes a table-like
object and transforms it into LaTeX; then html() calls hevea to conver
.tex
You need to give reproducible code for a question like this, not pseudocode.
And you should consider using a recent version of R, not the relatively
ancient 2.8.1 (which was released in late 2008.
Duncan Murdoch
On 03/10/2009 1:30 PM, Rajeev Ayyagari wrote:
Hello,
I can't think of an explan
That info along with drop=FALSE seems to be a reasonable hack.
Thanks again-
David
Gabor Grothendieck wrote:
>
> You can use names using your example ts series like this
>
> x[, "Juan"]
>
>
> On Sat, Oct 3, 2009 at 11:04 AM, David Stoffer
> wrote:
>>
>> Thanks for the help. My basic prob
Hello,
I can't think of an explanation for this memory allocation behaviour
and was hoping someone on the list could help out.
Setup:
--
R version 2.8.1, 32-bit Ubuntu 9.04 Linux, Core 2 Duo with 3GB ram
Description:
Inside a for loop, I am passing a list to a function. The f
On 03/10/2009 11:54 AM, Chen Gu wrote:
Hello,
I am doing a simple if else statement in R. But it always comes out error
such as 'unexpected error'
There are two variables. ini and b. when ini=1, a=3; when ini>1 and b>2,
a=5; all other situations, a=6. I don't know where it is wrong.
Here is my c
On Oct 3, 2009, at 11:54 AM, Chen Gu wrote:
Hello,
I am doing a simple if else statement in R. But it always comes out
error
such as 'unexpected error'
There are two variables. ini and b. when ini=1, a=3; when ini>1 and
b>2,
a=5; all other situations, a=6. I don't know where it is wrong.
align the 'else if' and 'else' with the closing curly brackets.
if (condA){
doStuff()
} else if (condB){
doOtherStuff()
} else {
doWhatever()
}
b
On Oct 3, 2009, at 12:54 PM, Chen Gu wrote:
Hello,
I am doing a simple if else statement in R. But it always comes out
error
such as 'une
Hello,
I am doing a if else statement in R. But it always comes out error such as
'unexpected symbol'
There are two variables. ini and b. when ini=1, a=3; when ini>1 and b>2,
a=3; all other situations, a=6. I don't know where it is wrong.
Here is my code
ini=3
b=4
if (ini==1) {
a=3
Hello,
I am doing a simple if else statement in R. But it always comes out error
such as 'unexpected error'
There are two variables. ini and b. when ini=1, a=3; when ini>1 and b>2,
a=5; all other situations, a=6. I don't know where it is wrong.
Here is my code
ini=3
b=4
if (ini==1) {
a=3
Well, yes: add them up and divide by 3.
What did you try that didn't work?
Sarah
On Sat, Oct 3, 2009 at 12:06 PM, ANJAN PURKAYASTHA
wrote:
> Hi all,
> Here is my problem:
> I have 3 matrices , A, B, C.
> Each is an nXn matrix.
> I need to create matrix D such that : D[i,j]= (A[i,j]+B[i,j]+C[i,
You can just do D<-(A+B+C)/3.
Best regards,
Ondrej.
On 03/10/2009, ANJAN PURKAYASTHA wrote:
>
> Hi all,
> Here is my problem:
> I have 3 matrices , A, B, C.
> Each is an nXn matrix.
> I need to create matrix D such that : D[i,j]= (A[i,j]+B[i,j]+C[i,j])/3.
> Being a newbie this is proving to be a
Hi,
I know the following code can show the dendrogram. But I also want to
plot the points on a figure and have circles (or boxes) around the
points in a cluster (see
http://www.autonlab.org/tutorials/kmeans11.pdf for some examples). I
am wondering how to do so in R.
Regards,
Peng
x1 = c(0,0)
x2
Hi all,
Here is my problem:
I have 3 matrices , A, B, C.
Each is an nXn matrix.
I need to create matrix D such that : D[i,j]= (A[i,j]+B[i,j]+C[i,j])/3.
Being a newbie this is proving to be a challenge.
Any ideas on how best to accomplish this?
Thanks!
Anjan
--
=
anja
You can use names using your example ts series like this
x[, "Juan"]
On Sat, Oct 3, 2009 at 11:04 AM, David Stoffer wrote:
>
> Thanks for the help. My basic problem is that I have given my series names,
> but I still have to call them number 1, 2, and so on, to do things with
> them. If I wa
On Oct 1, 2009, at 11:04 AM, Tammy Ma wrote:
provide commented, minimal, self-contained, reproducible code.
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-hel
Hi, I'm not able to find a rpm of "gregmisc" library (>2.0.0) for Linux
Mandriva 2008 Spring.
Any suggestion?
Thanks
_
[[elided Hotmail spam]]
[[alternative HTML version deleted]
Thanks for the help. My basic problem is that I have given my series names,
but I still have to call them number 1, 2, and so on, to do things with
them. If I want to compare "GNP" with "Private Investment", I have to
remember which columns contains those series.
The concern I have is that I'm
--- begin included message -
T
rying to fit a model using the Surv() with a frailty term but get the
following cryptic error message:
--
Error in frailty.brent(sqrt(x), y, lower = 0) :
Ties for max(y), I surrender
Cal
--- begin included message ---
I'm trying to fit a parametric survival model using the survreg function
with a Weibull distribution.
I'm studying the time to death of individuals from different families
and I would like to fit different shape parameters (ie 1/scale in R) for
each of the familie
Hi Liviu,
>> > tmp <- latex(.object, cdec=c(2,2), title="")
>> > class(tmp)
>> [1] "latex"
>> > html(tmp)
>> /tmp/RtmprfPwzw/file7e72f7a7.tex:9: Warning: Command not found:
>> \tabularnewline
>> Giving up command: \...@hevea@amper
>> /tmp/RtmprfPwzw/file7e72f7a7.tex:11: Error while reading
>LinZhongjun wrote:
>>
> >I ran Winbugs under R. I could get the results, but I kept getting the error
> >messages:
>>
> >Error in
> > file(con, "wb") : cannot open the connection
> >In addition: Warning messages:
> >1: In file.c
Dear R community,
The hier.part package applies hierarchical partitioning based upon a GLM
(generalized linear model) framework to assess the independent and joint
effect from a set of predictors onto a single quantitative response
variable. Conceptually and from a statistical point of view, are t
Why do you post twice?
ANway, same answer as before:
You probably do not have write permissions for those WinBUGS files that
R2WinBUGS tries to rewrite.
Uwe Ligges
LinZhongjun wrote:
Dear R lists,
I ran Winbugs under R. I could get the results, but I kept getting the error
messages:
LinZhongjun wrote:
Dear R lists,
I ran Winbugs under R. I could get the results, but I kept getting the error
messages:
Error in file(con, "wb") : cannot open the connection
In addition: Warning messages:
1: In file.cr
This turns out to be quite easy...
Given:
> head(data)
inst a1 a2 a3 a4 a5 a6 a7 a8 escore
11 1 1 0 1 1 0 0 0 4
21 0 1 0 0 0 0 0 0 1
31 1 0 0 1 0 1 1 1 2
41 0 1 0 0 0 1 0 0 1
You can use grep on the names of the columns in d
thanks very much for the quick and accurate response!
Rnewb
--
View this message in context:
http://www.nabble.com/getting-variables-based-on-name-tp25725837p25726184.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.o
Dear R lists,
I ran Winbugs under R. I could get the results, but I kept getting the error
messages:
Error in file(con, "wb") : cannot open the connection
In addition: Warning messages:
1: In file.create(to[okay]) :
cann
Dear R lists,
I ran Winbugs under R. I could get the results, but I kept getting the error
messages:
Error in file(con, "wb") : cannot open the connection
In addition: Warning messages:
1: In file.create(to[okay]) :
cann
I have a file like this:
a1,a2,a3,b1,b2,b3
1,2,3,4,5,6
0,1,2,3,4,5
...
In interactive command-line R, I type
data<-read.table('file.txt', sep=',', header=TRUE)
I then want to get all the columns which start with the letter a. For this
particular file, I can the type:
data[1:3]
What if i don
71 matches
Mail list logo