Thank you, the problem was indeed about factors.
Case solved
On Fri, Jul 14, 2023 at 7:05 PM Rui Barradas wrote:
>
> Às 17:33 de 14/07/2023, Luigi Marongiu escreveu:
> > Hello,
> > I am measuring a certain variable at given time intervals and
> > different concentrations of a reagent. I would
Às 17:33 de 14/07/2023, Luigi Marongiu escreveu:
Hello,
I am measuring a certain variable at given time intervals and
different concentrations of a reagent. I would like to make a scatter
plot of the values, joined by a line to highlight the temporal
measure.
I can plot this all right. Now,
В Fri, 14 Jul 2023 18:33:38 +0200
Luigi Marongiu пишет:
> COLS = c("green", "red", "blue", "yellow")
> geom_errorbar(aes(x=Time, ymin=ddC-SD, ymax=ddC+SD, colour=mM,
> group=mM), width=.1, colour=COLS) +
The last `colour` argument in the call above is a character vector of
length 4. You
Hello,
I am measuring a certain variable at given time intervals and
different concentrations of a reagent. I would like to make a scatter
plot of the values, joined by a line to highlight the temporal
measure.
I can plot this all right. Now, since I have more than one replicate,
I would like to
Dear Jim and Ana,
Why not skip the legend and put the counts in the labels?
with(df, pie(n, paste0(V1, " (", n, ")"),
col=c(3, 2), main="Yes and No", radius=1))
Best,
John
On 2022-08-15 9:43 p.m., Jim Lemon wrote:
Hi Ana,
A lot of work for a little pie.
df<-read.table(text="V1 n
Yes
On Mon, 15 Aug 2022 19:20:28 -0700
Bert Gunter wrote:
> Fortune Nomination!
>
> "A lot of work for a little pie." (in response to a query about how to
> improve a pie chart)
> -- Jim Lemon
I second the nomination.
cheers,
Rolf
>
> On Mon, Aug 15, 2022 at 6:43 PM Jim Lemon
> wrote:
> >
>
Hello ...
raws <- c("field_1", "field_2", "field_3")
paste0("['", paste0(raws, collapse="', '"), "']")
rasmus@eightforty ~ % python
Python 3.10.5 (main, Jun 6 2022, 18:49:26) [GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> ['field_1',
Hello,
I need to convert an R vector to a python array. Essentially, I got a
vector of strings where each element must be enclosed in single
quotes. The problem is that each closing single quote should contain a
comma. What is the regex trick to do that?
I tried with:
```
> (raws = c("field_1",
Thank you, but on the example in use, it draws at each x a triplet of
y from the same class linked by a segment. It is essentially a strip
plot rather than a scatter plot...
On Mon, Oct 11, 2021 at 10:28 PM Bert Gunter wrote:
>
> Your panel function needs to plot the points! See at
Your panel function needs to plot the points! See at below
xyplot(Value ~ Concentration,
group = Substance, data = df,
pch = 16, cex = 1.2, type = "b",
xlab=expression(bold(paste("Concentration (", mu, "M)"))),
ylab=expression(bold("Infection rate")),
Thanks,
now I got the bars (although without notch) but I lost the main plot:
```
xyplot(Value ~ Concentration,
group = Substance, data = df,
pch = 16, cex = 1.2, type = "b",
xlab=expression(bold(paste("Concentration (", mu, "M)"))),
ylab=expression(bold("Infection rate")),
col=COLS,
scales =
On Mon, Oct 11, 2021 at 5:41 PM Luigi Marongiu wrote:
>
> Hello,
> I am trying to plot data using lattice. The basic plot works:
> ```
> Substance = rep(c("A", "B", "C", "D"),4)
> Concentration = rep(1:4,4),
> Value = c(62.8067, 116.2633, 92.2600, 9.8733, 14.8233,
>
Hello,
I am trying to plot data using lattice. The basic plot works:
```
Substance = rep(c("A", "B", "C", "D"),4)
Concentration = rep(1:4,4),
Value = c(62.8067, 116.2633, 92.2600, 9.8733, 14.8233,
92.3733, 98.9567, 1.4833, 0.6467, 50.6600,
ect.org] On Behalf Of Charles Thuo
Sent: Friday, June 05, 2020 12:18 AM
To: r-help@r-project.org
Subject: [R] how to add a calculated column into a data frame
Dear Sirs,
I have a data frame that has a column that shows the transaction date.
How do i add another column that extracts the year o
This should get you started:
x <- "2009-03-21"
substr( x, 1, 4 )
y <- as.integer( substr( x, 1, 4 ) )
y
or
yy <- as.POSIXlt( x )$year + 1900
yy
RShowDoc( "R-intro" )
On June 4, 2020 9:18:00 PM PDT, Charles Thuo wrote:
>Dear Sirs,
>
>I have a data frame that has a column that shows the
Dear Sirs,
I have a data frame that has a column that shows the transaction date.
How do i add another column that extracts the year of transaction from the
transaction date.
Charles
[[alternative HTML version deleted]]
__
Hello,
I have a code like this:
p <- ggplot(data = df, aes(x = Name, y = prop, fill = Name)) +
geom_bar(stat = "identity") +
labs(x = "", y = "EQTL / gene") +
scale_fill_brewer(palette="Greens",name = "Number of cis EQTL") +
theme(legend.position = "none")
p
which produces the attached
I tried doing this but it didn't help
p <- ggplot(data = df, aes(x = Name, y = prop, fill = Name)) +
geom_bar(stat = "identity") +
labs(x = "", y = "EQTL / gene") +
scale_fill_brewer(palette="Greens",name = "Number of cis EQTL") +
theme_classic()+
theme(panel.grid.major.x =
Hi Ana,
You seem to have a p-value at the top of the second plot. Do you just
want that p-value in a different place?
My first guess would be the "annotate" argument. Say you wanted your
p-value in the middle of the plot.
# your ggplot line
p+annotate("text",x=1.5,y=0.05,label="p = 1.6x10-16")
p
Well that means already a ratio. Could you show me how the data frame looks
like? If they are array of values then you compare the distribution of your
ratios like Ratio1 array from “ (#of EQTLs)/(#of genes)” vs Ratio 2 arrays
of the “same for the other, RG condition”.
ratio1 = c(ratio1Value1,
Awesome, thanks!
Yes those two numbers on y axis I calculated as (#of EQTLs)/(#of genes) and
the same for the other, RG condition. So implicitly I do have a spread just
that data was not used to plot this, only those ratios. Is in this case
still p value not necessary?
On Fri, 27 Sep 2019 at
Ah, this is a single observation and not pvalue calculation over a
distribution. You don’t seem to have a spread. Here your code seemed like
it was over all genes(more than 1) vs RG genes(also more than one). But it
is basically an observation of difference of 2 values. So it doesn’t need
to
You will need to add stat_compare_means. Take a look at here.
http://www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/76-add-p-values-and-significance-levels-to-ggplots/
library(ggpubr)
p + stat_compare_means()
Should be fine.
Vivek
On Fri, Sep 27, 2019 at 7:29 PM Ana Marija
Hi,
I created a bar plot with this code:
library(ggplot2)
df <- data.frame("prop" = c(7.75,70.42), "Name" = c("All Genes","RG Genes"))
p<-ggplot(data=df, aes(x=Name, y=prop,fill=Name)) +
geom_bar(stat="identity")+ labs(x="", y = "Proportion of cis
EQTLs")+ scale_fill_brewer(palette="Greens") +
I am almost certain that no dummy variables are necessary -- but mixed
models questions are always better posed on the r-sig-mixed-models list.
Bert
On Sun, Nov 4, 2018 at 1:38 PM Yune S. Lee wrote:
> Dear R experts --
>
> I never needed to add a dummy column and always query statistical
Dear R experts --
I never needed to add a dummy column and always query statistical results
by querying summary(model) for GLMER. However, I was recently asked to add
a dummy column for interaction variables when performing GLMER. Could
anyone tell me if it's necessary to add a dummy column for
Got it thank you
From: Riley Finn
Sent: Thursday, August 23, 2018 10:24 PM
To: reichm...@sbcglobal.net
Cc: R-help@r-project.org
Subject: Re: [R] How to add a geom_smooth() line
Jeff,
You need to reshape your data frame. If you use ggplot, you will often have to
present your data
Jeff,
You need to reshape your data frame. If you use ggplot, you will often
have to present your data in "long format"
Use the reshape2 package.
I made a sample data frame because you didn't provide one. I also change
your x and y labels because they made no sense.
data <- data.frame(
Hello,
if you want to fit different models to each of deliveries and launches,
use the wide format instead:
ggplot(data = data, aes(x = timeline)) +
geom_point(aes(y = deliveries), color = "blue") +
geom_smooth(aes(y = deliveries), color = "blue", method = lm, formula
= y ~ log(x)) +
Sorry, should be geom_smooth, not stat_smooth. They both work the same
way or very close to it.
Rui Barradas
On 24/08/2018 05:08, Rui Barradas wrote:
Hello,
The trick is to reshape your data from wide to long format.
There are many ways to do this, I will use package reshape2.
Make up a
Hello,
The trick is to reshape your data from wide to long format.
There are many ways to do this, I will use package reshape2.
Make up a dataset:
library(ggplot2)
library(reshape2)
set.seed(9773)
n <- 20
data <- data.frame(timeline = 1:n,
deliveries = log(1:n) + runif(n),
R-help
I want to add two smooth lines (geom_smooth()) for each scatter plot. How
do I do that?
ggplot() +
geom_point(data=data, aes(x=timeline, y=deliveries), color="blue") +
geom_point(data=data, aes(x=timeline, y=launches), color="red") +
xlab("Deliveries") +
rg> On Behalf Of Bond, Stephen
Sent: Thursday, March 22, 2018 9:51 AM
To: 'Ben Tupper' <btup...@bigelow.org>
Cc: 'r-help' <r-help@R-project.org>
Subject: Re: [R] how to add a child to a child in XML
Just to clarify and hopefully catch the attention of the maintainer:
The newXMLNode
, March 22, 2018 10:40 AM
To: Bond, Stephen
Cc: r-help
Subject: Re: [R] how to add a child to a child in XML
Hi,
It's a reasonable question. The answer is that it actually is included, but
there are many instances across packages where multiple functions are
documented on a single help page
nt: Wednesday, March 21, 2018 6:18 PM
> To: Bond, Stephen
> Cc: r-help
> Subject: Re: [R] how to add a child to a child in XML
>
> Hi,
>
> XML doesn't use the `$` to access child nodes. Instead use either `[name]`
> to get a list of children of that name or `[[name]]` to g
: [R] how to add a child to a child in XML
Hi,
XML doesn't use the `$` to access child nodes. Instead use either `[name]` to
get a list of children of that name or `[[name]]` to get the just the first
child of that name encountered in the genealogy. Thus for your example...
> root$child1
N
Hi,
XML doesn't use the `$` to access child nodes. Instead use either `[name]` to
get a list of children of that name or `[[name]]` to get the just the first
child of that name encountered in the genealogy. Thus for your example...
> root$child1
NULL
> root[['child1']]
On the other hand,
I am trying to add a child to a child using XML package in R. the following
fails
library(XML)
node1 <- c("val1","val2","val3")
names(node1) <- c("att1","att2","att3")
root <- xmlNode("root", attrs=node1)
node2 <- LETTERS[1:3]
names(node2) <- paste("name",1:3,sep="")
root <-
On 09/15/2017 08:57 AM, Michael Dewey wrote:
In line
On 15/09/2017 13:30, Martin Møller Skarbiniks Pedersen wrote:
On 15 September 2017 at 14:13, Duncan Murdoch
wrote:
On 15/09/2017 8:11 AM, Martin Møller Skarbiniks Pedersen wrote:
Hi,
I am installing a lot
In line
On 15/09/2017 13:30, Martin Møller Skarbiniks Pedersen wrote:
On 15 September 2017 at 14:13, Duncan Murdoch
wrote:
On 15/09/2017 8:11 AM, Martin Møller Skarbiniks Pedersen wrote:
Hi,
I am installing a lot of packages to a new R installation and it
On 15 September 2017 at 14:13, Duncan Murdoch
wrote:
> On 15/09/2017 8:11 AM, Martin Møller Skarbiniks Pedersen wrote:
>
>> Hi,
>>
>>I am installing a lot of packages to a new R installation and it takes
>> a
>> long time.
>>However the machine got 4 cpus and
On 15/09/2017 8:11 AM, Martin Møller Skarbiniks Pedersen wrote:
Hi,
I am installing a lot of packages to a new R installation and it takes a
long time.
However the machine got 4 cpus and most of the packages are written in
C/C++.
So is it possible to add a -j4 flag to the make command
Hi,
I am installing a lot of packages to a new R installation and it takes a
long time.
However the machine got 4 cpus and most of the packages are written in
C/C++.
So is it possible to add a -j4 flag to the make command when I use the
install.packages() function?
That will probably
On 25/09/2016 7:51 AM, Matti Viljamaa wrote:
I have created a 2x2 plot using par(mfrow = c(2, 2)).
I can add x- and ylabels to individual plots, but what I want is to add overall
xlabel and ylabel for the entire 2x2 plot.
How to do this?
First you need to make space using par(oma=...), then
Hi,
Here's a place to start...
https://www.r-bloggers.com/two-tips-adding-title-for-graph-with-multiple-plots-add-significance-asterix-onto-a-boxplot/
You might also want to checkout the text() function and the xpd argument to par.
Ben
> On Sep 25, 2016, at 7:51 AM, Matti Viljamaa
I have created a 2x2 plot using par(mfrow = c(2, 2)).
I can add x- and ylabels to individual plots, but what I want is to add overall
xlabel and ylabel for the entire 2x2 plot.
How to do this?
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and
?rbind
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Thu, Mar 24, 2016 at 9:49 PM, Hiroyuki Sato wrote:
> Hello members
>
> Question
>
Hello Ulrik and Jeff
Thank you for replying.
I succeed to create data frame following steps.
s <- structure(list(ID = c(101L, 102L, 103L, 103L), DATE = c(20160301L,
20160301L, 20160301L, 20160302L), VAR = c(1L, 1L, 1L, 1L), CODE =
structure(c(1L,
2L, 3L, 3L), .Label = c("PDT1", "PDT2", "PDT3"),
You could make a vector with all possible IDs. Use %in% to get just those
that are missing.
missing.id <- c (101:1000)
missing.id <- missing.id[! missing.id %in% s $ID]
Df2 <- data.frame(ID = missing.id,
CODE = paste0 (PDT, missing.id),
VAR = 0)
Modify your original data.frame so you can rind
Suggested reading
An Introduction to R, section 5.3
The Posting Guide, mentioned at the bottom of this message, which mentions that
this is a pain text mailing list so don't post in HTML (it gets mangled).
--
Sent from my phone. Please excuse my brevity.
On March 24, 2016 10:09:46 PM PDT,
Hello Ulrik
Thank you for replying.
The real data has many IDs( about 3,000 IDS). So I want to find missing
values with function or something.
If 104 not in s, then add 104 value with all column zero.
And also real data has many columns( 80 ~ 5,000, columns. it is not fixed
length ).
So I would
Hi Hiroyuki,
The row bind function rbind() is what you need
s <- dcast(s,ID ~ CODE, value.var="VAR",sum)
df2 <- data.frame(ID = c(104, 105), PDT1 = 0, PDT2 = 0, PDT3 = 0)
rbind(s, df2)
hope this helps
Ulrik
On Fri, 25 Mar 2016 at 05:52 Hiroyuki Sato wrote:
> Hello
Hello members
Question
Could you tell me how to add ID 100, 104, 105 values with zero?
1, Source data
ID 100, 104 and 105 has no values.
> s
ID DATE VAR CODE
1 101 20160301 1 PDT1
2 102 20160301 1 PDT2
3 103 20160301 1 PDT3
4 103 20160302 1 PDT3
s <- structure(list(ID = c(101L, 102L, 103L,
Hi C W,
I would guess you are trying to use the base graphics "legend" function.
Have you tried one of the scale_* functions in ggplot?
Jim
On Sat, Oct 31, 2015 at 3:10 PM, C W wrote:
> Hi,
>
> I am trying to do add a legend to an overplot, something like this:
>
> ggplot()
Remove show_guide = FALSE?
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live:
Hi,
I am trying to do add a legend to an overplot, something like this:
ggplot() +
geom_density(data = df1, aes(x = x), fill = "green", show_guide =
FALSE) +
geom_area(data = df2, aes(x = x), fill = "yellow", show_guide = FALSE) +
scale_color_manual(values = c("green", "yellow"),
I think is time to learning Rcpp! :-)
thank you (Peter Dalgaard and Dirk Eddelbuettel ) by the examples!
the more simples are often more informatives...
cleber
Em 21/09/2015 12:36, Dirk Eddelbuettel escreveu:
peter dalgaard gmail.com> writes:
C is call by value and k and res are
peter dalgaard gmail.com> writes:
> C is call by value and k and res are pointers. You need a dereferencing
step or nothing with happen. Try
>
> *res = *k + 1;
Or you use Rcpp which writes the glue code. Save the following into a file:
#include
// [[Rcpp::export]]
int adder(int x, int y) {
> On 21 Sep 2015, at 04:03 , Cleber N.Borges wrote:
>
> Dear useRs,
>
> I would like some help on how to make the sum of 1 + 1
> but using the interface between A and C.
>
> the function call does .call lock and close the R.
>
> Thank you for any help it.
Either you
Dear useRs,
I would like some help on how to make the sum of 1 + 1
but using the interface between A and C.
the function call does .call lock and close the R.
Thank you for any help it.
Cleber
###
R code
text_code <-"
#include
#include
#include
void
of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of li li
Sent: Wednesday, 3 June 2015 13:07
To: r-help
Subject: [R] How to add legend to a dotplot
Hi
-project.org] On Behalf Of li li
Sent: Wednesday, 3 June 2015 13:07
To: r-help
Subject: [R] How to add legend to a dotplot
Hi all,
I wanted to add the legend to a dotplot using legend funciton. If
does not seem to be working? Anyone have any suggestions?
Thanks!
Hanna
Hi Hanna,
That is because dotplot is a lattice graphics function and legend
is a base graphics function. There are two things you can do to fix
this. One is to use the dotchart function in base graphics. The
other is to use simpleKey in the latticeExtra package for the legend.
Jim
On Wed, Jun
Hi all,
I wanted to add the legend to a dotplot using legend funciton. If
does not seem to be working? Anyone have any suggestions?
Thanks!
Hanna
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
Doh, can't believe I missed that. Sorry Bert.
On Tue, Jan 27, 2015 at 5:08 PM, Bert Gunter gunter.ber...@gene.com wrote:
Well, the OP already referred to segplot.
But, see, he shouldn't be doing this plot in the first place. Yes, I
know it's fairly standard in science, but it's a bad idea
See segplot in the latticeExtra package.
Kevin
On Mon, Jan 26, 2015 at 7:58 PM, Jun Shen jun.shen...@gmail.com wrote:
Dear list,
I have a couple of lines (superimposed) in an xyplot and just want to add
error bars to each of the data point. It's been a while since this question
was asked
Well, the OP already referred to segplot.
But, see, he shouldn't be doing this plot in the first place. Yes, I
know it's fairly standard in science, but it's a bad idea (as are many
others, like the infamous dynamite plot). If uncertainty intervals
are desired, they should be model based,
You might want to look at the examples in error.bars.by in the psych package.
Bill
On Jan 26, 2015, at 7:58 PM, Jun Shen jun.shen...@gmail.com wrote:
Dear list,
I have a couple of lines (superimposed) in an xyplot and just want to add
error bars to each of the data point. It's been a
Hi Jun,
Here is one way to do this using the mtcars data set, although there
are probably better ways.
mtcars$sd-runif(32,1,2)
mpgxhp-xyplot(mpg~hp,mtcars,
main=Miles per gallon by horsepower,
xlab=Horsepower,ylab=Miles per gallon,
panel=function(x,y,ulim,llim) {
yspace-diff(range(y))/100
Dear list,
I have a couple of lines (superimposed) in an xyplot and just want to add
error bars to each of the data point. It's been a while since this question
was asked last time. But the segplot from latticeExtra is not straight
forward. Just wonder if there is a better way to do this.
Jun:
Call a custom panel function that adds horizontal lines at the means
of your groups. Something like (for vertical boxes, i.e.horiz=FALSE;
make appropriate change for horizontal boxes)
e.g.
panel.mn - function(x,y,box.width=.5,horiz=FALSE,...){
panel.bwplot(x,y,box.width,horiz=horiz,...)
Dear list,
The bwplot generates box plots with a dot in median. How do I add a line of
mean to the boxes? Thanks a lot.
Jun
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
#How to add a legend for this bubble plot
#I prefer p2 with a legend for each bubble
library(graphics)
set.seed(1234)
n=20
x - rnorm(n)*2
y - rnorm(n) * 1/10
Z - rnorm(n)+ 100
df$r - sqrt(z/pi)
df$l - replicate(n, paste(sample(LETTERS, 3, replace=TRUE), collapse=))
N - nrow(df)
p1 -
Dear Sir/Madam,
It is possible to make grouped bar plots via barplot. But I want to add a
break in y axis for data that largely differs. However, this seems
complicated. Although gap.barplot may add a break in y asis, but the bars
are not grouped as I wanted. Could you help me with this
On Tue, 27 May 2014 11:36:21 AM Wei Qin wrote:
...
#Then my questions is how to make a broken y axis in grouped
barplot
figures?
# In another words, how to combine the function of barplot and
gap.barplot?
Hi Wei,
The gap.barplot function doesn't do grouped bars (yet). You can probably
,
daniel
Feladó: r-help-boun...@r-project.org [r-help-boun...@r-project.org] ;
meghatalmaz#243;: Helen Gao [helengao...@gmail.com]
Küldve: 2014. május 23. 16:38
To: r-help@r-project.org
Tárgy: [R] how to add a table under a plot?
Dear all,
If you
Dear Jim,
Thank you very much indeed for your quick reply and kind help.
The code you provided works perfectly, which is exactly what I want.
Kind regards,
Wei
On 27 May 2014 14:11, Jim Lemon j...@bitwrit.com.au wrote:
On Tue, 27 May 2014 11:36:21 AM Wei Qin wrote:
...
#Then my questions
Kingston ON Canada
-Original Message-
From: helengao...@gmail.com
Sent: Fri, 23 May 2014 15:38:45 +0100
To: r-help@r-project.org
Subject: [R] how to add a table under a plot?
Dear all,
If you know how to add a table under a plot, could you please send me
your
code?
In R
Dear all,
If you know how to add a table under a plot, could you please send me your
code?
In R documentation, there is a function addtable2plot{}, do you know where
to download the function?
Thank you in advance,
Helen
[[alternative HTML version deleted]]
[helengao...@gmail.com]
Küldve: 2014. május 23. 16:38
To: r-help@r-project.org
Tárgy: [R] how to add a table under a plot?
Dear all,
If you know how to add a table under a plot, could you please send me your
code?
In R documentation, there is a function addtable2plot{}, do you know where
There is an addtable2plot function in the plotrix package, which is on
CRAN and can be installed using install.packages or other standard
ways of installing packages.
If you need the table to line up with parts of the plot then you could
leave extra margin area and call the axis function multiple
I would like to add some boxes with special extent to my plot.
Example
gh - raster()
gh[] - 1:ncell(gh)
SP - spsample(Spatial(bbox=bbox(gh)), 10, type=random)
Then plot them
levelplot(gh, col.regions = rev(terrain.colors(255)), cuts=254,
margin=FALSE) +
layer(sp.points(SP,
On Dec 15, 2013, at 4:46 AM, 水静流深 wrote:
t--4:4
y-c(5,7,10,13,15,16,14,12,11)
plot(t,y,type=l)
how can i add a curve y=0.83*t-0.44*t^2 in the graph?
[[alternative HTML version deleted]]
t--4:4
y-c(5,7,10,13,15,16,14,12,11)
plot(t,y,type=l, ylim=c(-4,16))
curve( 0.83*x-0.44*x^2 ,
t--4:4
y-c(5,7,10,13,15,16,14,12,11)
plot(t,y,type=l)
how can i add a curve y=0.83*t-0.44*t^2 in the graph?
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Hi,
On itself one way of doing this is:
lines(seq(-4,4,0.1),sapply(seq(-4,4,0.1),function(t)0.83*t-0.44*t^2))
The curve does not fit in the scale, however. Are you sure the formula is
correct? Then you have to adapt the scale:
plot.new()
plot.window(xlim=c(-4,4), ylim=c(-10,16))
axis(1)
axis(2)
Hi All,
I'm trying to figure out how in my data set to add a column including a
count of unique events based on date. Here is a part of my data set:
trialno event date time
3 11301pm_intake 2010-11-24
Hi,
May be you can try:
###Use dput()
dat1 - structure(list(trialno = c(11301L, 11301L, 11301L, 11301L, 11301L,
11301L, 11301L, 11301L, 11301L, 11301L, 11302L, 11302L, 11302L,
11302L, 11302L, 11302L, 11302L, 11302L, 11302L, 11302L), event = c(pm_intake,
am_intake, pk1, pm_intake, am_intake,
Hi,
May be you can try:
###Use dput()
dat1 - structure(list(trialno = c(11301L, 11301L, 11301L, 11301L, 11301L,
11301L, 11301L, 11301L, 11301L, 11301L, 11302L, 11302L, 11302L,
11302L, 11302L, 11302L, 11302L, 11302L, 11302L, 11302L), event = c(pm_intake,
am_intake, pk1, pm_intake, am_intake,
conne2 - file(C:\\ome1440s.bin,rb)
bioms- readBin(conne2, integer(), size=1, n=1440*720, signed=F)
library(raster)
library(rasterVis)
data(wrld_simpl)
library(maptools) ## needed for wrld_simpl
r - raster(nrow=720, ncol=1440)
r[] - bioms;
Hello,
One way is:
levelplot(r, col.regions=myPal) +
layer(sp.polygons(wrld_simpl, lwd=0.5)) +
layer(panel.rect(2,45,8,51))
Regards,
Pascal
2013/9/24 Jonsson amen.alya...@bordeaux.inra.fr
conne2 - file(C:\\ome1440s.bin,rb)
bioms- readBin(conne2, integer(), size=1, n=1440*720,
That worked fine, thanks. But only worked when the values are positive but
when I added negative values, the box was wrong. May be the order I lat and
long should be different?any ideas
--
View this message in context:
Thanks.That worked fine.Is there a way to print a number like 1 inside the
box plotted?
--
View this message in context:
http://r.789695.n4.nabble.com/how-to-add-a-box-to-map-plotted-by-a-levelplot-tp4676815p4676825.html
Sent from the R help mailing list archive at Nabble.com.
Hello,
?panel.text
?grid.text
Regards,
Pascal
2013/9/24 Jonsson amen.alya...@bordeaux.inra.fr
Thanks.That worked fine.Is there a way to print a number like 1 inside the
box plotted?
--
View this message in context:
Hi,
How can I add to LDA ggplot axes the Percentages of variance explained?
Script:
/require(MASS)
require(ggplot2)
iris.lda-lda(Species ~ Sepal.Length + Sepal.Width + Petal.Length +
Petal.Width, data = iris)
datPred-data.frame(Species=predict(iris.lda)$class,predict(iris.lda)$x)
: suparna.mitra...@gmail.com
Sent: Thu, 20 Jun 2013 12:56:24 +0800
To: r-help@r-project.org
Subject: [R] how to add any extra word to existing column heading in R
Hello R experts,
I want to add some extra words to number to existing column header. Can
anybody tell me how to do that.
e.g. if I
Hello R experts,
I want to add some extra words to number to existing column header. Can
anybody tell me how to do that.
e.g. if I have a data.frame
Height.1 Height.2 Height.6 Height.8 Height.10 Height.11 Height.17
Height.20 Height.22 Height.31
MBR174 720 104
Hello,
What did you try to do by yourself before to ask?
Regards,
Pascal
On 20/06/13 13:56, Suparna Mitra wrote:
Hello R experts,
I want to add some extra words to number to existing column header. Can
anybody tell me how to do that.
e.g. if I have a data.frame
Height.1 Height.2
Hello,
I
was trying ways to define new column names. Or very traditional way to
export the data and add names in excel.
But thought there must a way, but searched with several key words in
forum, but couldn't find the exact what I mean.
May be my search terms are not perfect.
Thanks,
Mitra
On
Hello,
Two keywords: colnames and paste.
Regards,
Pascal
On 20/06/13 14:09, Suparna Mitra wrote:
Hello,
I
was trying ways to define new column names. Or very traditional way to
export the data and add names in excel.
But thought there must a way, but searched with several key words in
Hi,
Not sure if this is what you meant.
dat1- read.table(text=
id t scores scores2 scores3
2 0 1.2 1.4 1.9
2 2 2.3 2.5 2.2
2 3 3.6
1 - 100 of 332 matches
Mail list logo