You will find all you need here:
http://wiki.stdout.org/rcookbook/Graphs/
Cheers,
Neil
On Tue, Jan 22, 2013 at 6:27 AM, Janesh Devkota wrote:
> I have created a graph with basic R plot with 2 rows and 3 columns. With
> the basic plot feature of R I had to write several lines of code to come
I am sorry for my careless. I forgot implementing the last code
corresponding to setting y-axis. Thanks Mark Leeds and all guys.
2013/1/22 hp wan
> Thanks. This time the x-axis works well but the y-axis is missing.
>
> 2013/1/22 Mark Leeds
>
>> Hi Hp: I decided to use axis because names.arg
Thanks. This time the x-axis works well but the y-axis is missing.
2013/1/22 Mark Leeds
> Hi Hp: I decided to use axis because names.arg wasn't working very well.
> Below is
> an improvement and I'm sure, given enough effort, it can be improved much
> more. But
> atleast below will get you start
On 01/22/2013 11:12 AM, mary wrote:
Hi,
I have to construct an ellipse interval region on a PCAbiplot, I have my
parameters "a" and "b" and I would apply the formula:
draw.ellipse(x, y, a = , b = )
I have done a PCA on my data so I have my scores and loading for the first
and second component,
On Jan 21, 2013, at 6:39 PM, David Winsemius wrote:
>
> On Jan 21, 2013, at 6:15 PM, Katherine Gobin wrote:
>
>> Dear Sir,
>>
>> Thanks a lot for your eye-opener reply. I was just thinking of our usual
>> commands like rnorm, runif etc. So I was wondering if there exists something
>> like rw
Dear Sir,
Thanks a lot for your eye-opener reply. I was just thinking of our usual
commands like rnorm, runif etc. So I was wondering if there exists something
like rwakeby etc.
And lastly, I have calculated the parameters using
> lmr = lmom.ub(amounts)
> parameters_of_Wakeby
Hi,
I have to construct an ellipse interval region on a PCAbiplot, I have my
parameters "a" and "b" and I would apply the formula:
draw.ellipse(x, y, a = , b = )
I have done a PCA on my data so I have my scores and loading for the first
and second component, but my answer is what I have to choose
On Jan 21, 2013, at 6:15 PM, Katherine Gobin wrote:
> Dear Sir,
>
> Thanks a lot for your eye-opener reply. I was just thinking of our usual
> commands like rnorm, runif etc. So I was wondering if there exists something
> like rwakeby etc.
>
> And lastly, I have calculated the parameters usi
Hi Hp: I decided to use axis because names.arg wasn't working very well.
Below is
an improvement and I'm sure, given enough effort, it can be improved much
more. But
atleast below will get you started.
breaks=c(-1.55,-1.50,-1.45,-1.40,-1.35,-1.30,-1.25,-1.20,-1.15,-1.10,-1.05,-1.00,-0.95,-0.90,-0.
hi Rusers
I am trying to use symbos in gtools package
symbols(data1,data3,circle=data1/data3,inches=0.1,bg="lightgreen")
Now I want to give a lengend to tell the reader the meaning or magnitude of
these circle.
How can I add these information in symbols plot just like legend in plot ?
thank y
Hi: if you mean that you want the labels to be the strings "-1.55", "-1.50"
etc then you
can use the names.arg argument for that. You can create a vector of
character strings
binstrings = c("-1.55","-1.50", )
or just convert your data to strings using as.character. Then, in the call
to barpl
But the x-axis of barplot is still not what I want. The xlab is breaks, not
-1.55,-1.50,,0.55.
2013/1/22 Mark Leeds
> Hi Hp: I'm not sure what you want. Below looks slightly better but if you
> want the x-axis
> to have better labels, then there is a names.arg argument to barplot. see
> ?bar
Hi Hp: I'm not sure what you want. Below looks slightly better but if you
want the x-axis
to have better labels, then there is a names.arg argument to barplot. see
?barplot.
I don't know what each of the bins represents but if you want to include
all of those zeros then I don't think there's any w
Ok, that is no problem.
2013/1/22 Mark Leeds
> let me look at but it's probably best to send to the whole list because
> there are many
> people on it way more knowledgable than myself. I'm ccing the list and
> hope you
> don't mind. my fault for replying privately initially.
>
>
>
> On Mon, Jan
let me look at but it's probably best to send to the whole list because
there are many
people on it way more knowledgable than myself. I'm ccing the list and hope
you
don't mind. my fault for replying privately initially.
On Mon, Jan 21, 2013 at 7:36 PM, hp wan wrote:
> Thanks for your reply!
>
On 13-01-21 6:41 PM, Simonas Kecorius wrote:
Dear R users,
I came up to a problem dealing with percentiles in R.
From my previous questions: I do have a big data.frame, with lots of
columns and rows. The following command enables me to calculate means for
all data frame.
dat1$newID<-rep(1:(n
Dear R users,
I came up to a problem dealing with percentiles in R.
>From my previous questions: I do have a big data.frame, with lots of
columns and rows. The following command enables me to calculate means for
all data frame.
dat1$newID<-rep(1:(nrow(dat1)/12),each=12) #if nrow(dat1)/12 is inte
On 13-01-21 5:18 PM, hp wan wrote:
Hi All,
When carrying out hist(samples,breaks=50,probability=TRUE), the column
values are considerably greater than 1, which seams very unreasonable. The
plot is attached.
I think the column value of the hist plot should correspond to
x$counts/sum(x$counts)
Hi All,
When carrying out hist(samples,breaks=50,probability=TRUE), the column
values are considerably greater than 1, which seams very unreasonable. The
plot is attached.
I think the column value of the hist plot should correspond to
x$counts/sum(x$counts)
(x=hist(samples,breaks=50,probabilit
Hello,
Em 21-01-2013 20:52, Duncan Murdoch escreveu:
On 13-01-21 3:20 PM, Jeff Newmiller wrote:
Apparently Extended RegExp syntax eliminated the
"^-is-an-ordinary-character-except-for-two-uses" meaning that I am
familiar with from the Basic RegExp usage, since GNU grep with the -e
option also r
I have created a graph with basic R plot with 2 rows and 3 columns. With
the basic plot feature of R I had to write several lines of code to come up
with the graph https://www.dropbox.com/s/f7d6ei6krtcrtti/hello.png
I was wondering whether we can plot multiple series in each plot using
ggplot a
Dear Ista,
Thank you so much for the prompt reply. Yes, using the annotate instead of
the geom_text definitely speed up my graph and look much better.
Thanks.
Best Regards,
Janesh Devkota
On Mon, Jan 21, 2013 at 3:46 PM, Ista Zahn wrote:
> Hi,
>
> One problem is that you are printing the reg
Hi,
One problem is that you are printing the regression equation multiple
times. Compare:
> system.time({
+ p2 <- p1 + annotate(x = -0.1, y = 0.5, geom="text", label =
lm_eqn(mydata), parse = TRUE)
+ print(p2)
+ })
user system elapsed
0.930 0.006 0.976
> system.time({
+ p3 <- p1
Hello All,
I have plotted a scatter plot in ggplot2 and added a regression line and a
regression equation. But the processing is very very slow. One reason might
be because I have so many data pairs. Is there any way to speed up this
code ? I need to create a multiple layout as well.
The code I h
On 13-01-21 3:20 PM, Jeff Newmiller wrote:
Apparently Extended RegExp syntax eliminated the
"^-is-an-ordinary-character-except-for-two-uses" meaning that I am familiar with from the
Basic RegExp usage, since GNU grep with the -e option also refuses to match the carat unless it is
escaped. The
Apparently Extended RegExp syntax eliminated the
"^-is-an-ordinary-character-except-for-two-uses" meaning that I am familiar
with from the Basic RegExp usage, since GNU grep with the -e option also
refuses to match the carat unless it is escaped. The TRE library treats BRE as
obsolete, so we on
On Jan 21, 2013, at 10:30 AM, Katherine Gobin wrote:
> Dear R forum
>
>> From the given data, I have estimated the parameters of Wakeby distribution
>> using lmomco package as
>
> library(lmomco)
>
> (amounts <- read.csv("input_S.csv")$amount)
>
> # __
Hi,
I guess there should be missing values.
set.seed(5)
data1<-data.frame(commNo=sample(786:789,10,replace=TRUE),Col2=rnorm(10,10))
set.seed(5)
data2<-data.frame(commNo=sample(c(786:789,NA),10,replace=TRUE),Col2=rnorm(10,10))
data1[data1$commNo==786, "commNo"]<-"Name of the Community"
data2[data
Hi,
If 'commNo` is factor.
set.seed(5)
data1<-data.frame(commNo=sample(786:789,10,replace=TRUE),Col2=rnorm(10,10))
set.seed(5)
data2<-data.frame(commNo=sample(c(786:789,NA),10,replace=TRUE),Col2=rnorm(10,10))
data4<-within(data1,{commNo<-factor(commNo)})
data4[data4$commNo==786, "commNo"]<-"Name
On 13-01-21 1:05 PM, Jeff Newmiller wrote:
So what is the special behavior of the ^ symbol when not at the beginning of
the string that occurs when it is not escaped?
I think it retains its meaning as an assertion that it occurs at the
beginning of the line, and so a pattern like "a^b" could
On Jan 21, 2013, at 10:05 AM, Jeff Newmiller wrote:
So what is the special behavior of the ^ symbol when not at the
beginning of the string that occurs when it is not escaped?
Isn't there a distinction between what _is_ "special" and what should
be "special". You are saying that "^" after
Dear R forum
>From the given data, I have estimated the parameters of Wakeby distribution
>using lmomco package as
library(lmomco)
(amounts <- read.csv("input_S.csv")$amount)
# ___
# Wakeby distribution - Parameter estimation
N
On Mon, Jan 21, 2013 at 12:36 PM, R_Antony wrote:
> Hi all,
>
> i need a small help that i want to access data from a url.
> i tried with
> read.table(URL,header=TRUE) - but getting errors. actually no idea that how
> can be done. I am in new in this function as well as in R.
>
> Could anyone plea
So what is the special behavior of the ^ symbol when not at the beginning of
the string that occurs when it is not escaped?
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##
On 13-01-21 11:48 AM, Jeff Newmiller wrote:
I am not sure I understand what worked perfectly, since it is my understanding
that ^ is only special at the beginning of the regex (to anchor the pattern at
the beginning of the target string) or as the first character of a character
set (to indicat
On Jan 21, 2013, at 7:35 AM, David Studer wrote:
Hello everybody!
I am trying to replace community numbers with community names
(character).
I am using the following code:
data[data$commNo==786, "commNo"]<-"Name of the Community"
data$commNo is probably a factor. As such the equality te
On Mon, 21 Jan 2013, mtb...@gmail.com wrote:
I am trying to search for string that includes the caret symbol, using the
following code:
grepl("latitude^2",temp)
Many regex implementations require us to escape a metacharacter such as
'^' by preceeding it with a backslash. This indicates the n
I am not sure I understand what worked perfectly, since it is my understanding
that ^ is only special at the beginning of the regex (to anchor the pattern at
the beginning of the target string) or as the first character of a character
set (to indicate exclusion of the listed characters). In any
On 13-01-21 10:56 AM, Collins, Stephen wrote:
Hello,
I'm trying to read a file rows at a time, so as to not read the entire file into memory. When reading the
"connections" and "readLines" help, and "R help archive," it seems this should be possible with
read.csv and a file connection, making
On 21-01-2013, at 16:56, "Collins, Stephen"
wrote:
> Hello,
>
> I'm trying to read a file rows at a time, so as to not read the entire file
> into memory. When reading the "connections" and "readLines" help, and "R
> help archive," it seems this should be possible with read.csv and a file
Another approach
> critical<- c(1.61,75.89, 1.61, 75.89)
> colSums(sweep(mydata, 2, critical, "<"))
V1 V2 V3 V4
0 19 0 0
--
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352
> -Original Mess
Hi,
On Mon, Jan 21, 2013 at 10:59 AM, Andre Zege wrote:
> I started to look at ways to improve times of certain very parallel tasks and
> thought that foreach should be a valid candidate to do the job.
> So, i opened foreach tutorial by Steve Weston and started timing examples
> from it. First
You're probably being killed by the overhead of parallelization which
is, in this case, far more than actual computation time. I've not dug
through foreach() in a while, but I think this winds up spawning many
many subprocesses which isn't cheap in Windows.
MW
On Mon, Jan 21, 2013 at 3:59 PM, And
Hi all,
i need a small help that i want to access data from a url.
i tried with
read.table(URL,header=TRUE) - but getting errors. actually no idea that how
can be done. I am in new in this function as well as in R.
Could anyone please help me out, how we can do it without installing any
package
Hello,
I'm trying to read a file rows at a time, so as to not read the entire file
into memory. When reading the "connections" and "readLines" help, and "R help
archive," it seems this should be possible with read.csv and a file connection,
making use of the "nrows" argument, and checking wher
I started to look at ways to improve times of certain very parallel tasks and
thought that foreach should be a valid candidate to do the job.
So, i opened foreach tutorial by Steve Weston and started timing examples from
it. First example from tutorial is
>system.time(for(i in 1:10) sqrt(i
Hi Roslina,
No problem.
If you take out the i from the code,
1-(res/1000)
# V1 V3 V2 V4
#1.000 1.000 0.981 1.000
Is it what you were looking for?
Also, in addition, you could also try:
#if the total column number is even
critical<-rep(c(1.61,75.89),ncol(mydata)/2)
#if it is odd,
cri
> I am trying to replace community numbers with community
> names (character).
> I am using the following code:
>
> data[data$commNo==786, "commNo"]<-"Name of the Community"
>
> Unfortunately, I get the error message
> missing values are not allowed in subscripted assignments of
> data frame
Hi Tsjerk, many thanks...that worked perfectly!
Mark Na
On Mon, Jan 21, 2013 at 9:36 AM, Tsjerk Wassenaar wrote:
> Oh, I'm jetlagged. ^ is a control character for 'start of string'. In the
> context of a character set it means negation: [^a-z].
>
> Ciao,
>
> Tsjerk
>
>
> On Mon, Jan 21, 2013
Usually, foods have more ingredients than listed nutritional component values.
Further, for many foods nutritional composition (particularly fat, protein,
fibre, carbohydrate, calorie count) are cacluated from the ingredient list and
caloprie count in particular is derived from the fat, protein
Oh, I'm jetlagged. ^ is a control character for 'start of string'. In the
context of a character set it means negation: [^a-z].
Ciao,
Tsjerk
On Mon, Jan 21, 2013 at 4:33 PM, Tsjerk Wassenaar wrote:
> Hi Mark Na,
>
> Try:
>
> grepl("latitude\\^2",temp)
>
> ^ is a control character for negation,
Hello everybody!
I am trying to replace community numbers with community names (character).
I am using the following code:
data[data$commNo==786, "commNo"]<-"Name of the Community"
Unfortunately, I get the error message
missing values are not allowed in subscripted assignments of data frames
Hi Mark Na,
Try:
grepl("latitude\\^2",temp)
^ is a control character for negation, so you have to escape it.
Cheers,
Tsjerk
On Mon, Jan 21, 2013 at 4:26 PM, wrote:
> Hello R-helpers,
>
> I am trying to search for string that includes the caret symbol, using the
> following code:
>
> grepl(
Hello R-helpers,
I am trying to search for string that includes the caret symbol, using the
following code:
grepl("latitude^2",temp)
And R doesn't like that. It gives me:
> temp<-c("latitude^2","latitude and latitude^2","longitude^2","longitude
and longitude^2")
> temp
[1] "latitude^2"
Andreas Karpf malix.univ-paris1.fr> writes:
>
> Hello,
>
> I searched everywhere but I didn't find what I want, that is why I as the
> question here. Threads discussing this issue on this mailing list are
> already quite old. Does anybody know of a function in R which allows to
> estimate order
For your first question -- read the manual. ?survfit.coxph will reveal the "censor"
argument, which controls the inclusion of points where the curve does not drop.
For your second, "smooth" is in the eye of the beholder, literally. If the reason for a
smooth curve is to plot it, you need to d
OK. I uploaded files to
https://drive.google.com/?tab=wo&authuser=0#folders/0B-hUB8Dm7X_VYWhwWFNmVkl0cEE
and I hope you are able to download it.
Sorry for the inconvenience.
Best regards
Petr
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> projec
I am sorry, pictures did not went through. Using dput is not a way to go, the
output file has over 3 MB. I try to find a suitable way where to put those
pictures (they have about 100 kB) for you to be able to use the code.
Petr
> -Original Message-
> From: r-help-boun...@r-project.org
Here is one way to read the data. Modified your sample for the line
counts of actual data:
x <- readLines(textConnection("40 Terry Cove-Model
300 .300110459327698
300.041656494141 .289277672767639
300.083343505859 .276237487792969
300.125 .258902788162231
300.166656494141 .236579895019531
300.20
That was it. Thanks!
On Mon, Jan 21, 2013 at 11:21 AM, Milan Bouchet-Valat wrote:
> Le lundi 21 janvier 2013 à 10:32 +0100, Christoph Lange a écrit :
> > Dear all,
> >
> > please excuse the somewhat special question:
> >
> > >From within R I create a Tk windows with a list of checkboxes, which c
Hello,
I searched everywhere but I didn't find what I want, that is why I as the
question here. Threads discussing this issue on this mailing list are
already quite old. Does anybody know of a function in R which allows to
estimate ordered probit/logit model with random coefficients.
The only mix
Dear all
I try to evaluate pictures and find positions, size and amount of dropouts (I
enclose two pictures to play with and a code I used below). You can see that
the first picture is smooth with only few dropouts in entire area. The second
picture has many dropouts and even a scratch, with nu
Dear R user,
I am a newcomer and need help concerning 'draw a random number for a
restricted area of a prareto distribution'.
(1) For estimation of pareto distribution:
>http://stats.stackexchange.com/questions/27426/how-do-i-fit-a-set-of-data-to-a-pareto-distribution-in-r<
We calculate the pare
Hi Erin,
how about this:
dta<-read.table(textConnection("trt resp
A 23
A 28
A 37
A 30
B 37
B 44
B 31
B 35
C 42
C 47
C 52
C 38"),header=T)
summary(ano<-aov(resp~trt,dta))
ano0<-update(ano,.~.+0)
confint(ano0)
# and the corresponding means are
coef(ano0)
# or use the effects package
library(effect
Since this topic was mine originally, I supposed I can give my opinion,
for what it's worth!
First, it is true that there is some help in the manuals. The problem
with these manuals (or at least, my problem) is that there were much too
complicated when I started to learn R. Then I got used to
Le lundi 21 janvier 2013 à 10:32 +0100, Christoph Lange a écrit :
> Dear all,
>
> please excuse the somewhat special question:
>
> >From within R I create a Tk windows with a list of checkboxes, which can
> bekome too long for the screen. The obvious solution would be to put all
> checkboxes into
As Michael already mentioned, the error:
Error in qr.solve(wX, diag(k)) : singular matrix 'a' in solve
indeed indicates that your design matrix is not of full rank (i.e., there are
linear dependencies among your predictors). With this many factors in the same
model, this is not surprising if k
Dear all,
please excuse the somewhat special question:
>From within R I create a Tk windows with a list of checkboxes, which can
bekome too long for the screen. The obvious solution would be to put all
checkboxes into a frame and make that scrollable. Alas, there are (for
whatever reason!) no scr
At 14:48 20/01/2013, Alma Wilflinger wrote:
Hi,
thank you very much for your kind answer.
>If you look a bit further down the manual page you will see
>### using a model formula to specify the same model
>rma(yi, vi, mods=~factor(alloc)+year+ablat, data=dat, method="REML",
>btt=c(2,3))
>which
On 20/01/2013 22:03, Duncan Murdoch wrote:
On 13-01-20 4:51 PM, Nick Matzke wrote:
Hi, here's an obscure question someone can hopefully help with.
I have some R code that uses stuff from parallel (now a part
of the R core in 2.15 I believe), especially clusterApply.
However, this seems to cause
You have to sync up the data before you can do a scatter plot. If the data are
changing slowly relative to the sample rates then you can use approx to
interpolate one data set at the timestamps of the second to generate a column
you can add to the second data frame.
-
I was able to read the data using the following code:
jd1 <- read.table('Practicedata.dat',header=T,sep="\t",nrow=6240)
jd2 <- read.table('Practicedata.dat',header=T,sep="\t",skip=6241)
colnames(jd1) <- c("Date","Mod")
colnames(jd2) <- c("Date", "Obs")
p <- ggplot(jd1,aes(x=Date,y=Mod))+geom_line(
72 matches
Mail list logo