Dear RĂ¼diger,
Try to uninstall AND fysically remove (delete) lme4 and Matrix from the
harddisk. Then installing them again should do this trick. At least it did on
my laptop.
HTH,
Thierry
ir. Thierry Onkelinx
Institu
Dear Harsh,
You have to replace each "\" with "\\" or try to use "/" instead.
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, method
Dear Juliet,
I think you want this
dataset <- rbind(foo, bar)
ggplot(dataset, aes(x = x, y = y, colour = membership)) + geom_point() +
scale_colour_manual(values = c("green", "red", "black"))
HTH,
Thierry
ir. Thier
Dear Ben,
I'm cc'ing R-sig-mixed-models because that's a more appropriate list for
questions on lme().
Lme() is only able to work with nested random effects, not with crossed
random effects. Therefore you would need lmer() from the lme4 package.
But I don't think you need crossed random effects.
Another options is to write a custom function that saves the plot to a file and
generates the required latex code. Here is a rather simple function that
creates jpeg files with the ggplot2-package. But you could easily modify it to
work with other devices or other packages.
exportJpeg <- fu
Dear Jason,
Have a look at scale_y_continuous() and scale_fill_discrete(). This might work
(untested as your example is not reproducible with a (dummy) dataset).
qplot(Age, data = recerts_combined_values, binwidth = 5, fill =
combined_values$Test.Type, main="Combined Age Histogram") +
scale_x_
Yoo should have a look at ?write.table
dataset <- cbind(foo, bar, qux)
#write to a file
write.table(x = dataset, file = "your_file_name.txt", sep = "\t",
row.names = FALSE)
#wrfite to the console
write.table(x = dataset, file = "", sep = "\t", row.names = FALSE)
HTH,
Thierry
-
Dear Baptiste,
You can avoid the recursive stuff. And it will run about twice as fast.
> order.factor <- function (x, ref)
+ {
+ last.index <- length(ref) # convenience for matlab's end keyword
+ if(last.index == 1) return(relevel(x, ref)) # end case, normal case
+ my.new.list <- list(x=re
Dear Bunny,
You need to add a comma: data[data$particularcol ==1, ]
data[put here the conditions for rows, put here conditions for columns].
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
Dear Jason,
I would suggest xtable (from the xtable package) and LaTeX / Sweave.
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
Cel biometrie, met
Use the is.na function to test for NA values. And do read about
vectorizing your code. You don't need loops for this problem. Without
loops your code will run more than 400 times faster!
> n <- 1000
> x <- matrix(data=rep(c(1,2,3,NA), n), ncol=n, nrow=n)
>
> system.time({
+ y <- matrix(data=0
Dear Jos,
In R you don't need to create you own dummy variables. Just create a
factor variable LABOUR (with two levels) and rerun your model. Then you
should be able to calculate all coefficients.
HTH,
Thierry
ir. Thi
Have you tried specifying an absolute path in prefix.string instead of a
relative one?
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie
Dear Robin,
It is rather easy if you combine melt() and cast() from the reshape
package.
dataset <- expand.grid(year = 1940:1942, cell = 1:2)
dataset$Q1 <- rnorm(nrow(dataset))
dataset$Q2 <- rnorm(nrow(dataset))
dataset$Q3 <- rnorm(nrow(dataset))
dataset$Q4 <- rnorm(nrow(dataset))
library(reshape
Hi Felipe,
As I recall that is a known bug in the current version of ggplot2.
Cheers,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, met
Dear Felipe,
Provide a dummy sample if your dataset is big or confidential. The
actual values are not that important to figure out what kind of plot you
want.
How did you code Week? Numeric? Try convert it into a factor with levels
= c(27:52, 1:26). And then set the breaks to seq(1, 52, by = 2).
Dear Vikas,
First a few remarks:
- as we don't have your dataset, your example is not reproducible.
Please do add a (dummy) dataset next time.
- adding spaces makes code much more readable.
- why do you use scale_colour_gradient2 if you set the midpoint at the
lower level? Use scale_colour_gradien
yahoo.com]
Verzonden: vrijdag 23 januari 2009 18:44
Aan: r-h...@stat.math.ethz.ch; ONKELINX, Thierry
Onderwerp: RE: [R] ggplot seq
Actually 'levels' works OK by ordering the x axis labels but since I
have 52 weeks it gets too crowded.
Here's part of my dataset with a reproducible exam
You'll need the [[ operator.
Your.list.name[[3]] gives the third element.
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteits
Dear Andrew,
Have a look at ggplot2
library(ggplot2)
ggplot(curr_assoc, aes(x = BP, y = P, colour = FILE)) + geom_point() +
scale_y_log10()
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek /
Dear Fritz,
I'm wondering if the use of plain HTML is a conditio sine qua non. What are the
advantages of maintaining the website via SVN? IMO maintaining a website and
source code are two separate things.
Just my 2 cents.
Thierry
-
Have a look at cast() form the reshape package.
library(reshape)
set.seed(123)
myD <- data.frame( Light = sample(LETTERS[1:2], 10, replace=T),
Feed = sample(letters[1:5], 20, replace=T),
value=rnorm(20) )
cast(myD, Light ~ ., fun = mean)
cast(myD, Feed ~ ., fun = m
First make a factor with the levels.
jet$Classes <- factor(ifelse(jet$amtemp < 90, "low", ifelse(jet$amtemp <
100, "medium", "high")))
Then make life easier and use ggplot
install.packages("ggplot2")
library("ggplot2")
ggplot(jet, aes(x = amtemp, y = thrust, colour = Classes)) +
geom_point()
HT
Dear Samor,
Note that the R-Sig-mixed-models is more suitable for that kind of questions.
You need to add "+", ":" or "*" between the variables in the formula
The correlation is lme() is not the same as the correlation in SAS. The
correlation in lme() is the correlation among residuals, not am
Megan,
Try to uninstall both packages, remove them from the harddrive and then
reinstall them. That worked for me when I had a similar problem (lme4
complaining about Matrix).
HTH,
Thierry
ir. Thierry Onkelinx
Institu
Dear Megan,
It looks like you don't have the latest version of the Matrix package.
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, me
Dear Jason,
Convert Person to a factor with the levels in the order that you want.
Group_df$Person <- factor(Group_df$Person, levels = c("Them", "You", "Me"))
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur-
hat a reasonable answer can be extracted from a given body of
data.
~ John Tukey
Van: Jason Rupert [mailto:jasonkrup...@yahoo.com]
Verzonden: donderdag 5 februari 2009 17:44
Aan: R-help@r-project.org; ONKELINX, Thierry
CC: ggpl...@googlegroups.com
Onderwerp: RE: [R]
Try using a mirror instead of cran.r-project.org.
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Se
Dear Glenn,
Are you looking for str()? Try str(bycontract)
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteits
Via the menu choose: Format --> Block --> Comment
Or use the shortcut key alt+C
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
Cel biometrie, metho
bericht-
Van: mihai.mira...@bafin.de [mailto:mihai.mira...@bafin.de]
Verzonden: woensdag 11 februari 2009 11:18
Aan: soren.hojsga...@agrsci.dk; ONKELINX, Thierry; r-help@r-project.org
Onderwerp: AW: [R] How to comment in R
Well, I don't care so much if it is */ or something else, I just want to find
Dear Harsh,
Have a look at geom_text()
ggplot(df, aes(x = Models, y = Values)) + geom_bar() + geom_text(aes(y =
Values + 1, label = round(Values, 2))) + facet_grid(.~Type)
HTH,
Thierry
ir. Thierry Onkelinx
Instituu
That is not strange behaviour. It's a case of FAQ 7.31:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bo
Hi Monica,
merge(t1, t2) works on your example. So why don't you use merge?
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodolo
Have a look at ?tail
tail(x, -3) should do the trick.
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg
Dear Tania,
Shouldn't that be varIdent(form = ~species.group) instead of
varIdent(form = ~1|species.group)?
Notice that this is untested as you did not provide a self-contained
example (as de posting guide asked you to do).
HTH,
Thierry
PS Next time try the mixed-models mailing list with quest
Dear Tanja,
R-Sig-Mixed-models is a better list for questions about lme4 and nlme.
There you are much more likely to get an answer from the mixed models
specialists.
First of all I would recommend you to write the random effect as
(1|fips) instead of (1|as.factor(diab$fips)). You will run into tr
Dear Tom,
I think you better switch to ggplot() instead of qplot().
library(ggplot2)
dat <- expand.grid(id = 1:10, time = 1:3, group = 1:3)
dat$Freq <- rnorm(nrow(dat), mean = dat$id * dat$time)
ggplot(dat, aes(x = factor(time), y = Freq)) + geom_boxplot() +
geom_jitter(aes(colour = factor(id)))
It looks like your data has not enough information to estimate the
parameter for metaCl. Maybe because metaCL is identical to one of the
other variables or a constant.
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor
I would think that the lines below should work but they give an error.
Hadley, can you clarify this?
Cheers,
Thierry
> library(ggplot2)
> qplot(mpg, wt, data=mtcars, colour=cyl) + opts(legend.position =
"bottom")
Error in grid.Call.graphics("L_setviewport", pvp, TRUE) :
Non-finite location an
Dear Pascal,
I thik you need to define the facets as
facets = ~ Par
Instead of
facets = Par ~ .
The Par ~ . Syntax can be used with facet_grid and not with facet_wrap.
HTH,
Thierry
ir. Thierry Onkeli
Hi Harold,
What about this? You one have to make the crosstabulation once.
> qq <- data.frame(student = factor(c(1,1,2,2,2)), teacher =
factor(c(10,10,20,20,25)))
> tab <- table(qq$student, qq$teacher)
> data.frame(Student = rownames(tab), Freq = rowSums(tab), tch =
rowSums(tab > 0) == 1)
Stude
Dear John,
It looks like you are stuck in both the second and the third circle of
the R inferno (http://www.burns-stat.com/pages/Tutor/R_inferno.pdf)
You problem is easy to vectorise.
#could the number of columns >= 64 in each row
NumCols <- rowSums(datax >= 64)
#select rows with at least one co
Dear Dave,
Another option would be to manually create the breaks of your plot.
library(ggplot2)
myBreaks <- sort(c(pretty(mtcars$mpg), min(mtcars$mpg)))
ggplot(aes(x = wt, y = mpg), data = mtcars) + geom_point() +
geom_hline(yintercept = min(mtcars$mpg)) + scale_y_continuous(breaks = myBreaks)
Dear Tom,
You can control the size of the axis title in ggplot2. It is described in the
ggplot2 book. Have a look at Chapter 8: Polishing your plots for publication.
You can find the book on the ggplot2 website.
I tend to create my own theme for some specific type of plots. Below you can
find
Hi all,
I have managed to create a figure on the screen with multiple plots in
it. Something like the example below. When I save that with ggsave(),
only the last plot gets saved (pPath in the example) instead of the
entire figure. Any suggestions how I can save this kind of figures
automated?
Th
Hi Emma,
Continuous predictors are no problem at all. You can mix both continuous
and categorial predictors if needed. I suppose your response are counts
(the number of bats that passes)? In that case a generalised linear
mixed model is more appropriate. With the lme4 package you could try
somethi
-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
Namens Dieter Menne
Verzonden: donderdag 12 maart 2009 9:04
Aan: r-h...@stat.math.ethz.ch
Onderwerp: Re: [R] Ggplot2: saving a grid with multiple plots
ONKELINX, Thierry inbo.be> writes:
> I have managed to create a figure on
?pdf reads: width, height the width and height of the graphics region in
inches. The default values are 7.
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel bio
2009 10:50
Aan: ONKELINX, Thierry; Emma Stone; r-help@r-project.org
Onderwerp: RE: [R] Mixed models fixed effects
Hi Thierry,
That's great thanks!
I have done as you have said but I keep getting a warning message here
is
my code:
G1Hvol<-glmer(passes~hvolume+style+habitat(1|Site),family =
an be extracted from a given body of
data.
~ John Tukey
-Oorspronkelijk bericht-
Van: Emma Stone [mailto:emma.st...@bristol.ac.uk]
Verzonden: vrijdag 13 maart 2009 11:08
Aan: ONKELINX, Thierry; Emma Stone; r-help@r-project.org
Onderwerp: RE: [R] Mixed models fixed effects
Hi Thierry,
Thank
That's an easy one with ggplot2.
library(ggplot2)
dataset <- data.frame(variable = gl(2, 50, labels = c("x", "z")), value
= c(runif(50), rnorm(50)))
ggplot(data = dataset, aes(x = value, fill = variable)) +
geom_histogram(position = "dodge") + scale_fill_manual(values = c("red",
"blue"), guide = "
Dear Rainer,
I think you'll have to recode the labels of the levels to get the output
that you want.
levels(ssq$gi) <- c("gi = 1", "gi = 2", "gi = 3")
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bos
Maybe this is what you'd like.
library(ggplot2)
freqs <- data.frame(value= c(
0.000,1.204,1.301,1.362,1.447,1.505,1.602,1.653,1.756,1.806,1.903,1.959,
2.053,2.107,2.204,2.258,2.354,2.408,2.505,2.559,2.656,2.709,2.806)
,
tp1= c( 8,1,0,13,0,6,0,25,0,5,0,15,0,4,0,7,0,0,0,1,0,0,0)
,
Tribo,
Use data.frame() and rbind() to combine the vectors.
x_test1 <- c(1:10)
y_test1<-rnorm(10)
x_test2 <- c(1:15)
y_test2<-rnorm(15)
x_test3 <- c(1:20)
y_test3<-rnorm(20)
dataset <- rbind(data.frame(Test = "Test 1", x = x_test1, y = y_test1),
data.frame(Test = "Test 2", x = x_test2, y
ics say until you have carefully
considered what they do not say. ~William W. Watt
A statistical analysis, properly conducted, is a delicate dissection of
uncertainties, a surgery of suppositions. ~M.J.Moroney
-Oorspronkelijk bericht-
Van: Tribo Laboy [mailto:[EMAIL PROTECTED]
Verzonden: vr
2008 15:18
Aan: ONKELINX, Thierry
CC: r-help@r-project.org
Onderwerp: Re: [R] Reformatting data into data frame and plotting it in
ggplot2
For some reason I get the following error:
"Error: could not find function "scale_colour_manual"
so I couldn't make the plots.
Otherwis
You'll need to transform your dataset in a long format first.
library(ggplot2)
n <- 5
MyValues <- data.frame(Gene = factor(LETTERS[seq_len(n)]), ES =
rnorm(n), MEF = rnorm(n), Embrio = rnorm(n), EShyp = rnorm(n))
MyValuesMelt <- melt(MyValues, id.var = "Gene")
ggplot(MyValuesMelt, aes(x = Gene, y
It seems like you didn't look at the examples in the helpfiles. See ?gls
and ?corAR1.
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en
Tribo,
Suppose you dataset is called bode. Then "melt" it:
Melted <- melt(bode, id.var = c("frequency", "system")
Then you'll get something like.
frequency | system | variabele | value
0 | system 1 | phase | 0
0 | system 1 | gain | 100
then this line below should do the trick (untested)
ggplo
Gabriella,
First of all I would suggest that you upgrade to a recent R version
(2.6.2).
Without a reprodicible example of your code it is very hard to examine
the problem. Use traceback() to identify were the problem occurs in your
code.
HTH,
Thierry
--
Alexander,
Learn to use the data argument. E.g.
plot(rgnpc, incmean, data = pol572a1)
Model <- lm(incmean ~ rgnpc, data = pol572a1)
to get the fitted values:
Model$fitted
HTH,
Thierry
PS It seems to me that you might want to read a good introduction into
R.
?aov
?anova
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
G
Have a look at ?try
try(t.test(x))
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometri
Try this.
ggplot(data = DF, aes(x=Hora, y=PAC) + geom_line()
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteit
Just to inform the list that the problem is solved:
This problem was due to DF$Hora being a factor. Converting it to numeric
or time solved the problem.
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzo
You'll need to store it in a list rather than a vector.
library(ggplot2)
DF<-data.frame(A=rnorm(12),B=c(1:12),C=rep(c(1:4),each=3))
Q <- list()
PAC<-geom_point(mapping=aes(x=A,y=B),data=DF[DF$C==1,])
P<-ggplot()+PAC
Q[[length(Q) + 1]] <- P
Q[[1]]
You could shorten this into
library(ggplot2)
DF<-
Format your dataframe into a long format. Then use a grouping variable
to distinguish both lines.
library(ggplot2)
DF <- data.frame(X = rep(0:20, 2), Y = c(rnorm(21), runif(21)), Z =
gl(2, 21))
ggplot(data = DF, aes(x = X, y = Y, colour = Z)) + geom_line()
HTH,
Thierry
PS. I suggest you read th
If someone told you to learn R, then there must a local R guru in your
neighbourhood. Therefore I would suggest that you consult this person
first. Reading an introduction into R will help you too (e.g. Peter
Dalgaard. Introductory Statistics with R. Springer, 2002. ISBN
0-387-95475-9)
HTH,
Thie
Store the models into a list and the use an apply-function.
x=1:10 #this creates some example data
y=rnorm(10)
m1=lm(x~y)
m2=lm(x~1)
Models <- list(m1, m2)
lapply(Models, summary)
HTH,
Thierry
ir. Thierry Onkelinx
I
The negation of Height.1 == 0 & Height.2 == 0 was incorrect. Use
subset(raw.all.clean, !(Height.1 == 0 & Height.2 == 0))
or
subset(raw.all.clean, Height.1 != 0 | Height.2 != 0)
HTH,
Thierry
ir. Thierry Onkelinx
Inst
ronkelijk bericht-
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Namens Neil Shephard
Verzonden: maandag 25 februari 2008 15:36
Aan: ONKELINX, Thierry
CC: r-help
Onderwerp: Re: [R] Logical statements and subseting data...
Thanks Thierry, they do both leave me with what I expected.
On Mon, Feb
Chris,
1.
This code will give you the boxplot that you want.
library(ggplot2)
series <- c('C2','C4','C8','C10','C15','C20')
ids <- c('ID1','ID2','ID3')
mydata <-
data.frame(SERIES=rep(series,30),ID=rep(ids,60),VALUE=rnorm(180))
ggplot(mydata, aes(y = VALUE, x = factor(1))) + geom_boxplot() +
sc
Chris,
The order of the facets row or column depend on the order in the
associated factor. The code below is what you want. Note that I have
changed 'cases' in 'series' because your example was not reproducible as
a definition of 'cases' was missing.
library(ggplot2)
series <- c('C2','C4','C8','C
rry for the cut & paste error ... getting used to Xemacs on Windows. I
used emacs years ago on Unix but now my environment is Windows. So far
I
find the Xemacs/Ess combo to be very powerful and flexible. Just need to
get
used to C-x C-c etc differences.
ONKELINX, Thierry wrote:
>
> Chr
atures such as the position of the median, IQR etc.
Or perhaps I've completely misunderstood your point (highly likely I
think).
Thanks again for your help. Much appreciated.
ONKELINX, Thierry wrote:
>
> Chris,
>
> 1.
>
> This code will give you the boxplot that you w
seudo-ish code)
for id, ser in ids, series:
dat <- subset(mydata, (id %in% ids & ser %in% series)
boxplot(dat) in grid position id, ser
Can I specify grid plotting grid by grid with ggplot or do I need to
look at
lattice graphics? (I'd like to stick with ggplot if I can)
ON
s here ... position="identity"
AND
x=dummy.
Can I ask where you learned these things. I've read a lot of the online
reference manual, "the book", other presentations of ggplot2 and don't
recall seeing these, especially the x=dummy reference.
Does this come from exper
Dear Shu,
Why not store your dataset in a database? Then you can start each loop
by reading the submatrix you need for the analysis. This will require
much less memory. loops from the apply-family with work better than the
for loop.
HTH,
Thierry
-
Dear Chris,
You'll need to add information on the facet factor (color) to the
medians dataset.
library(ggplot2)
medians <- aggregate(diamonds$price, list(cut = diamonds$cut, color =
diamonds$color), median)
ggplot(data=diamonds, aes(x=price)) + geom_density(aes(color=cut)) +
geom_vline(data=media
Guillaume,
Have a look at the ggplot book on p. 29
(http://had.co.nz/ggplot2/book.pdf).
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometri
plot2
Thierry
First thank you for the celerity of your response.
Second I use ggplot2 like this :
>ggplot(data, aes(x,y,fill)) + geom_point() + etc.
Where did you your xlab and ylab when using ggplot2 like that?
Guillaume
2008/3/5, ONKELINX, Thierry <[EMAIL PROTECTED]>:
>
> Guillaume
Bob,
You can copy the files from the packages to your new computer. Then run
update.packages(checkBuilt = TRUE).
That should do.
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research In
Yvonne,
With ggplot2 you could tackle this problem with the code below.
library(ggplot2)
graphs<- read.table("table.txt", header=T)
ggplot(data = graphs, aes(x = bif, y = abund)) + geom_point() +
geom_smooth(method = "lm") + facet_grid(. ~ experiment)
Have a look at the ggplot2 website for more
have a look at the collapse argument in ?paste.
paste(paste(c("a","b","c"), collapse = ""), "d", sep = ""))
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and
Dear Paolo,
Have a look at this thread:
http://www.nabble.com/Automating-citations-in-Sweave-td20128175.html#a20
128175
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute fo
-Oorspronkelijk bericht-
Van: Paolo Sonego [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag 28 oktober 2008 18:08
Aan: ONKELINX, Thierry
CC: R-List Help - use this to post
Onderwerp: Re: [R] Sweave, Bibtex, package references
Dear Thierry,
Thank you very much for you very useful advice!
I
Laura,
Order works fine. The output tells you that the third element of a is
the smallest, the first element is a second smallest, ... Try
a[order(a)] that should be equal to sort(a).
HTH,
Thierry
ir. Thierry Onkelin
Dear Bernd,
AFAIK you can only get counts, densitys, counts scale to a maximum of 1
and likewise densitys. But you can alter the labels on the scales
manually.
library(ggplot2)
dataset <- data.frame(x = rnorm(1000))
ggplot(dataset, aes(x = x)) + stat_bin(aes(y = ..ncount..))
ggplot(dataset, aes(x
Dear Jeff,
Have you tried to insert the graph at the indended position? That is
pasting
<>=
plot( rnorm( 100 ) )
@
At the location of
A graph goes here
So the code would be
\begin{figure}
\vspace*{.1in}
\framebox[\textwidth]{\hfill \raisebox{-.45in}{\rule{0in}{1in}}
<>=
plot( rnorm( 100 ) )
@
Dear Dinesh,
Have a look at ?cast for the reshape package
> dataset <- data.frame(Col1 = LETTERS[1:3], Col2 =
sort(rev(LETTERS)[1:3]), value = 1:3)
> dataset
Col1 Col2 value
1AX 1
2BY 2
3CZ 3
> library(reshape)
> cast(Col1 ~ Col2, data = dataset, fill = 0)
First open the device, then plot
x11()
plot(A5e$ECAB,A5e$EXPEND,type='p',main='Per capita expenditure against
economic ability index without
liners',xlab='ECAB',ylab='EXPEND',xlim=c(0,150),ylim=c(150,400),
col='red',col.axis='blue')
HTH,
Thierry
-
Dear David,
You could put the numbers on the graph with geom_text()
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en
Dear Barry,
Have a look at the function cast() in the reshape package. That should
be able to do what you need.
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
Dear Jake,
Have a look at glmer in the lme4 package. The will allow you to model
the trend with repeated measurements.
The easiest way to do some power analysis for repeated measurement will
probably be by simulation.
HTH,
Thierry
--
Dear Ben,
Your questions suite better in R-SIG-Mixed-Models which I am cc'ing.
Have checked the mailing list? Try RSiteSearch("lme4 false convergence")
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en boso
Dear Martin,
How many levels has PLANT? Does it is an ID for the individual plants? In that
case it is pointless to add it to a random effect. Because then each group at
the higest level would contain only one observation.
There is a mailing list dedicated to mixed effects models: R-Sig-mixed-m
Hi Stephen,
I think you will need to clarify what your problem is with the second plot.
HTH,
Thierry
-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] namens stephen sefick
Verzonden: di 2-12-2008 22:52
Aan: hadley wickham; R-help
Onderwerp: [R] ggplot2 facet_wrap problem
Hadley,
I don
Hi Stephen,
Have a look at the ggplot2 book. You will find an example on p. 6 of
http://had.co.nz/ggplot2/book/polishing.pdf
HTH,
Thierry
-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED] namens stephen sefick
Verzonden: wo 3-12-2008 0:31
Aan: R-help
Onderwerp: [R] ggplot2 45deg axis la
501 - 600 of 618 matches
Mail list logo