Skip to content
Prev 140463 / 398506 Next

Combining several mappings in ggplot2

Dear Tribo,

I've made a little mistake. It should have been

Orange2 <- data.frame(Tree = as.factor(Tree_v), age = age_v,
circumference = circumference_v)
Orange2$Lines <- factor(as.numeric(Orange2$Tree) %% 4)

Have a look at help("%%")

HTH,

Thierry


------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium 
tel. + 32 54/436 185
Thierry.Onkelinx op inbo.be 
www.inbo.be 

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: Tribo Laboy [mailto:tribolaboy op gmail.com] 
Verzonden: woensdag 26 maart 2008 17:42
Aan: ONKELINX, Thierry
CC: hadley wickham; r-help op r-project.org
Onderwerp: Re: [R] Combining several mappings in ggplot2

Hi Thierry

Thanks for replying. I tried your code, but it spit an error on me:
+ circumference = circumference_v, Lines =
factor(as.numeric(Orange2$Tree) + %% 4))
Error: unexpected SPECIAL in:
"Orange2 <- data.frame(Tree = as.factor(Tree_v), age = age_v,
circumference = circumference_v, Lines = factor(as.numeric(Orange2$Tree)
+ %%"

Am I typing it correctly? What does the %% 4 or %%5 mean by the way?

Regards,

TL


On Wed, Mar 26, 2008 at 11:26 AM, ONKELINX, Thierry
<Thierry.ONKELINX op inbo.be> wrote:
5.
factor(as.numeric(Orange2$Tree)
factor(as.numeric(Orange2$Tree)
------------------------------------------------------------------------
Nature
more
to
not
[mailto:r-help-bounces op r-project.org]
in
Tree,
Tree))
<tribolaboy op gmail.com>
haven't
variable
graphic