I don't understand what's your meaning, do you mean that i should do some file
processing,(like writing a script) ,so that i could add # in any line i
wanted.
I think it is not convenient.
And, it does seems that there is no way to multi line comment in R. But when i
turn to using Rstudio, a
FYI:
I get the same for Windows 7 and 8, no RStudio:
edit(vignette("grobs",package = "grid")) works for me
edit(file=vignette("grobs",package = "grid")) does not
> edit(file=vignette("grobs",package = "grid"))
Error in tempfile(name$topic, fileext = ".R") :
argument "name" is missing, with no de
A workaround is to escape the evaluation of the lines. For example:
tt <- 0
while(tt > 0){
cat('rr\n')
}
Regards,
Pascal
On Tue, Sep 9, 2014 at 11:49 AM, PO SU wrote:
>
> Dear expeRts,
>I find it's terrible when i want to comment multi paragraph (e.g. a 30
> lines function) , i have t
There are no multi line comment markers in R. However, since you are always
referring to RStudio you might want to look into roxygen, since their editor
supports that tool.
I would also suggest making more functions that are smaller.
--
Dear expeRts,
I find it's terrible when i want to comment multi paragraph (e.g. a 30
lines function) , i have to comment each line with #, is there any good way to
do that ?
I investgate it, but found no easy way, may you help me ?
--
PO SU
mail: desolato...@163.com
Majored in S
OK, i get it, i should set the editor argument , i don't know how to report a
bug to Rstudio, may you do that ?
--
PO SU
mail: desolato...@163.com
Majored in Statistics from SJTU
At 2014-09-09 00:41:33, "William Dunlap" wrote:
>Complain to the RStudio people - RStudio defines its own
Hello,
Couldn't think of a better subject line. Rather than a matrix like
x,y
..,..
.,..
I have a matrix like
x,y,n,
..,..,..,
..,..,..
and so on. Also, sum(n) is roughly few hundred million. The number of rows
is <1MM
Are they routines to fit a 2d kde estimate to data provided in this form?
I
Hi,
I am trying to test for heteroskedascity in an OLS model, but I am not
able to run the white.test() if the model has dummy variables built
from factors. Any suggestions?
Please find a reproducible code below:
myswiss <- swiss
myswiss$fert <- ifelse(
myswiss$Fertility>70,
"High","Low")
mysw
On Sep 8, 2014, at 2:01 PM, David Winsemius wrote:
>
> On Sep 8, 2014, at 12:08 PM, eliza botto wrote:
>
>>
>>
>
> This is typical use for base function aggregate:
>
>> with( dfrm, aggregate(dfrm[4:7], dfrm[1:2], FUN=sum))
> year month A B C D
> 1 1961 1 78 102 138 258
>
>>
On Sep 8, 2014, at 12:08 PM, eliza botto wrote:
> Dear R members,
>
> I have this data frame of 100 years in the following format
>
> yearmonth day A B C D
>
> where A,B,C and D are item number sold each day. I am trying
>
> 1-split the
On Mon, Sep 8, 2014 at 2:08 PM, eliza botto wrote:
> Dear R members,
>
> I have this data frame of 100 years in the following format
>
> yearmonth day A B C D
>
> where A,B,C and D are item number sold each day. I am trying
>
> 1-split the dat
?tapply
e.g.
with(yourdata, tapply(A,list(year,month),sum,simplify=FALSE))
This assumes "sum them up" means summing each column separately. You
were unclear as to exactly what you meant by this.
-- Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
"Data is not information. I
Hi, R users,
Is it possible to use R to obtain access token to Facebook API automatically?
The access token generated in Facebook Graph API expires very soon so I'd like
to use R to generate new access token and grab it and save it to a variable
automatically every 60 days.
Is it possible? If
Dear R members,
I have this data frame of 100 years in the following format
yearmonth day A B C D
where A,B,C and D are item number sold each day. I am trying
1-split the data w.r.t the monthly values for each year
2-then, sum them up
I
Hi,
Is there any package (or homegrown function) that can produce
"Parliament Seats Graph"? I'm referring to the nice looking concentric
half circles of colored "seats" as seen on Wikipedia (for example).
I can pretty easily plot the points and color them. But I can't group
the colored points in
Use geom_jitter() instead of geom_point
On Mon, Sep 8, 2014 at 12:37 PM, Tom Wright wrote:
> ggplot(data,aes(x = z1, y = x, fill=x2)) +
> geom_boxplot() +
> geom_point(alpha=0.5,
> position=position_jitterdodge(jitter.width=0.1),
> aes(group=x2))
>
> On Mon, 2014-09-08 at 13:1
On 08/09/2014 12:48 PM, Duncan Murdoch wrote:
On 08/09/2014 12:35 PM, Duncan Murdoch wrote:
> On 08/09/2014 12:21 PM, PO SU wrote:
> > Tks for correcting me not using the file argument, but the codes you supply
seem still not work.
> >
> > edit(vignette("grobs",package = "grid")) can't work.
>
ggplot(data,aes(x = z1, y = x, fill=x2)) +
geom_boxplot() +
geom_point(alpha=0.5,
position=position_jitterdodge(jitter.width=0.1),
aes(group=x2))
On Mon, 2014-09-08 at 13:10 -0400, Tom Wright wrote:
> Hi,
> I'm trying to create a boxplot overlayed with points where the data is
Hi,
I'm trying to create a boxplot overlayed with points where the data is
split by two factor groups.
So far:
x1<-factor(rep(LETTERS[1:4],5))
x2<-factor(rep(letters[1:2],10))
z<-runif(20,0,10)
data<-data.frame(x1=x1,x2=x2,z=z)
ggplot(data,aes(x=x1,y=z,fill=x2)) +
geom_boxplot() +
On 08/09/2014 12:35 PM, Duncan Murdoch wrote:
On 08/09/2014 12:21 PM, PO SU wrote:
> Tks for correcting me not using the file argument, but the codes you supply
seem still not work.
>
> edit(vignette("grobs",package = "grid")) can't work.
> I am using win7, the latest version of Rstudio which u
Others have discussed some of the theoretical approaches (delta
method), but as has also been pointed out, this is a mailing list
about R, not theory, so here are some approaches to your question from
the approach of those of us who like programming R more than
remembering theory.
I assume that on
Complain to the RStudio people - RStudio defines its own
options("editor") which is not completely compatible with R's
option(editor="internal"). If you set options(editor="internal") in
RStudio then you can look at the code in the vignette. (I tried with
last year's RStudio 0.98.501 and this may
On 08/09/2014 12:21 PM, PO SU wrote:
Tks for correcting me not using the file argument, but the codes you supply
seem still not work.
edit(vignette("grobs",package = "grid")) can't work.
I am using win7, the latest version of Rstudio which using R.3.1.1.The error is:
Error in editor(file = fil
On Mon, Sep 8, 2014 at 11:21 AM, PO SU wrote:
>
> Tks for correcting me not using the file argument, but the codes you supply
> seem still not work.
>
> edit(vignette("grobs",package = "grid")) can't work.
> I am using win7, the latest version of Rstudio which using R.3.1.1.The error
> is:
> Er
Tks for correcting me not using the file argument, but the codes you supply
seem still not work.
edit(vignette("grobs",package = "grid")) can't work.
I am using win7, the latest version of Rstudio which using R.3.1.1.The error is:
Error in editor(file = file, title = title) :
argument "name"
d <- data.frame(Choices=c("One","Two","One","Three"), X=1:4)
i <- 1 # possible output of menu(unique(d$Choices))
d[ d$Choices[i] == d$Choices, ]
# Choices X
#1 One 1
#3 One 3
I believe this sort of thing is covered in the Introduction to R pdf
that comes with R. It is worth reading.
Bil
On Mon, 8 Sep 2014 07:55:23 -0700
William Dunlap wrote:
Again, feed the output of menu() directly into "[". Do not use
switch(). Bill Dunlap
The function was changed to:
testdataextract1<-function (testdata) {
selectionresult<-menu(c(unique(levels(testdata[,1]))),graphics=FALSE,title='Selec
Again, feed the output of menu() directly into "[". Do not use switch().
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Mon, Sep 8, 2014 at 2:12 AM, wrote:
> On Sat, 6 Sep 2014 08:21:19 -0700
> William Dunlap wrote:
>
>> >
>> > testdataextract1<-switch(menu(c(unique(levels(testdata[,1]))),gr
Try:
edit(vignette("grobs",package = "grid"))
(edit is a method. It looks at the class of the first entry, name, to identify
which method to use. See ?edit. You want it to use edit.vignette, so you need
to drop 'file=' so you pass the vignette to edit as the first argument or
name=. Then edit
On Sat, 6 Sep 2014 08:21:19 -0700
William Dunlap wrote:
>
testdataextract1<-switch(menu(c(unique(levels(testdata[,1]))),graphics=FALSE,title='Select
> something'))
The switch function does not work the way you are expecting it to.
Read help("switch") and read the introduction to R that comes
30 matches
Mail list logo