.
Patrick Kuss wrote:
Dear Sander Oom and Jim Lemon,
thanks for putting the soils.texture() function into R. However, for
whatever reason I am not able to display the triangle correctly. Each of
the 27 tick labels shows as c(10,20,30,40,50,60,70,80,90) and thus
basically cover the whole triangle
Dear R users,
When you do:
x - rnorm(10)
y - rnorm(10)
z - rnorm(10)
a - data.frame(x,y,z)
a$x
[1] 1.37821893 0.21152756 -0.55453182 -2.10426048 -0.08967880 0.03712110
[7] -0.80592149 0.07413450 0.15557671 1.22165341
Why does this not work:
a[a$y0.5,y] -1
Error in
://www.student.kuleuven.be/~m0390867/dimitris.htm
- Original Message -
From: Sander Oom [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent: Friday, August 04, 2006 1:48 PM
Subject: [R] Data frame referencing?
Dear R users,
When you do:
x - rnorm(10)
y - rnorm(10)
z - rnorm(10
Dear R-users,
I need to do an SQL like, conditional, operation on a data frame using
an ifelse construction. However I can not get it to work.
Example:
x1 - rnorm(10)
x2 - rnorm(10)
x3 - rnorm(10)
x3 - NA
y - cbind(x1,x2,x3)
y
x1 x2 x3
[1,] -0.56927780 -0.30952274
- ifelse(y$x1 0, y$x2, y$x3)
From: [EMAIL PROTECTED] on behalf of Sander Oom
Sent: Sat 11/03/2006 11:23 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Conditional operation on columns in data frame
Dear R-users,
I need to do an SQL like
Thanks for the very useful tips!
Now I have enough round and square bracket and other tricks to wrap up
the function! The double square bracket trick in test[[varname]] is golden!
Thanks again,
Sander.
__
R-help@stat.math.ethz.ch mailing list
Dear all,
I have a data frame containing the results of an experiment. Like this:
a-seq(1,4,by=1)
b-seq(1,2,by=1)
test-expand.grid(b,a,a)
colnames(test)-c(replicates,bins, groups)
test$abc - rnorm(32)
test$def - rnorm(32)
test$ghi - rnorm(32)
test
The following code snippet aggregates the data
Shame nobody has included this function in their package! Would be
useful to have as a standard function!
Sander.
Dimitris Rizopoulos wrote:
take a look at this function by Kevin Wright
RSiteSearch(sort.data.frame)
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
, Sander Oom wrote:
Dear all,
Dimitris and Andy, thanks for your great help. I have progressed to the
following code which runs very fast and effective:
mat - matrix(sample(-15:50, 15 * 10, TRUE), 15, 10)
mat[mat45] - NA
mat-NA
mat
temps - c(35, 37, 39)
ind - rbind(
t(sapply(temps, function(temp
Dear all,
We have a large data set with temperature data for weather stations
across the globe (15000 stations).
For each station, we need to calculate the number of days a certain
temperature is exceeded.
So far we used the following S code, where mat88 is a matrix containing
rows of 365
: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
- Original Message -
From: Sander Oom [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Sent: Friday, June 10, 2005 10:50 AM
Subject: [R
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
- Original Message -
From: Sander Oom [EMAIL PROTECTED]
To: Dimitris Rizopoulos [EMAIL
Sabine,
It helps us to help you if you tell us what you want to do, preferably
with a code example, and what system/version of R you have: type version.
On my PC I get:
version
_
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
status
major2
Now you made me curious!
Installed the package myself as well!
Maybe you can send an example graph to Romain, to be included in the
graph gallery. Then we can all see what plot3d does!
Thanks,
Sander.
Sander Oom wrote:
Sabine,
It helps us to help you if you tell us what you want to do
.
Chris Evans wrote:
On 6 Jun 2005 at 17:48, Sander Oom wrote:
... much snipped ...
The whole point of a gallery is to show something to the user before
the user knows what he is looking for. The R help functions currently
available are hopeless when you have a picture of a graph in your head
Oooops, already missed one:
5. search of the R mailing lists: http://maths.newcastle.edu.au/~rking/R/
ad5. never used this before. Think Google also does an excellent job
finding these if you start search with R.
Sander.
Sander Oom wrote:
Maybe some of this confusion about search
Why ask if you already know the answer. Did you try table()?
Other commands related: reshape {stats} and xtabs {stats}
I learned about this only a couple of days ago on this list!
Meanwhile read the posting guide and send your requests in English.
Good luck,
Sander.
Hansi Weissensteiner
.
Romain Francois wrote:
Le 07.06.2005 12:36, Sander Oom a écrit :
I agree that a wiki to facilitate submission of graph code could be
very effective! Still needs to be well protected against vandalism.
Seems a regular backup, to facilitate a clean restore, is the best
approach.
Romain, would you
Maybe some of this confusion about search opportunities and pros/cons
could be avoided if the search page on CRAN
(http://cran.r-project.org/search.html) would be extended to cover all
main search tools!
Quickly scanning the discussion, I found these:
1- simply Google: some tips and tricks
Navarre Sabine wrote:
Hi,
I would like to do a polar graph (=star graph) ! is that graph existing on R?
Because more softwares can do that but I don't found it on R!
Thanks
Sabine
-
ils, photos et vids !
[[alternative
Barry Rowlingson wrote:
Romain Francois wrote:
Graphics will be classified in :
- categories
- sub-categories within those categories
So far so good.
Maybe, maybe not! Would a system of keywords work better than strict
hierarchical categories, as long as plots can have more than one
Hi Thomas,
Your code works perfectly!
Thanks a lot,
Sander.
Thomas Lumley wrote:
On Fri, 3 Jun 2005, Sander Oom wrote:
Dear R users,
I have received a table in the following format:
id a b c1 c2 d1 d2
1 1 1 65 97 78 98
2 1 2 65 97 42 97
3 2 1 65 68 97 98
Dear R users,
I have received a table in the following format:
id a b c1 c2 d1 d2
1 1 1 65 97 78 98
2 1 2 65 97 42 97
3 2 1 65 68 97 98
4 2 2 65 97 97 98
Factors of the design are: a, b, and e, where e has levels c and d. The
levels c and d then have 2
An interesting thought just came to me when reading this discussion! I
use both R and Latex and have never had the trouble of overlooking error
messages when debugging long Latex code!
Of course this is because when compiling a latex document, a summary of
the compilation process is provided
Indeed it does! Sorry for the impulsive response!
Sander.
Duncan Murdoch wrote:
Sander Oom wrote:
An interesting thought just came to me when reading this discussion! I
use both R and Latex and have never had the trouble of overlooking
error messages when debugging long Latex code
Hi Charles,
Warm felt sympathies for your struggles. I consider myself a happy GUI
user and have also struggled with the 'command line' history and lack of
out-of-the-box functionality associated with Linux. However, Linux does
have many, many advantages over other OS's, so I will stick to
HI Robert,
Of course Linux already has a console! Just type R in the Terminal
console and R will start (assuming all is installed correctly). Graphics
will be launched in separate windows.
If you want more then the Terminal console, try:
http://www.sciviews.org/_rgui/
Good luck,
Sander.
with the generic plot functions works well.
Makes the function less dependent on other packages!
Will merge the two functions into one and post it back to the mailing
list! Then the graph might be ready for the graph gallery!
Thanks,
Sander.
Jim Lemon wrote:
Sander Oom wrote:
Hi Jim
(pi/3))
#
# Author(s)
#
# Jim Lemon
# Sander Oom
#
# References
#
# Soil Survey Division Staff. 1993. Soil survey manual. Soil Conservation
Service.
# U.S. Department of Agriculture Handbook 18.
#
# Examples
#
# # some triangular data
# library(MASS)
# tmp-(Skye/100)
# # colnames choosen
Dear R users,
has anybody made an attempt to create the soil texture triangle graph in
R? For an example see here:
http://www.teachingkate.org/images/soiltria.gif
I would like to get the lines in black and texture labels in gray to
allow for plotting my texture results on top.
Any
]
tmp
library(vcd)
## Mark groups
ternaryplot(tmp,
grid=FALSE,
dimnames.position = none,
pch=1, col=black,
scale=1, main=NULL,
prop.size=FALSE,
)
soil.triangle()
Sander Oom wrote:
Hi Jim,
This looks impressive! It gives me the 'background' graph. However, I'm
not sure how I can use
- rep(black,10)
pch - rep(1, 10)
plot.soiltexture(tmp,pch,col=black)
Sander Oom wrote:
Right,
Got the data points plotted on top of the soil texture background,
thanks to Jim and ternaryplot{vcd}! See code below.
Now there is some fine tuning to do, as it should really look like this
graph
Dear R users,
I would like to use sub- and super-script in axis labels. I assume this
is best done using Hershey symbols. When trying to find information on
using Hershey font symbols in axis labels, I came across the following
discussion thread:
Hikel, Jerry wrote:
Hi -- I have searched the documentation and archives on graphing
capabilities in R for the past couple of hours, but I haven't been able
to find anything directly related to my problem.
I want to create a plot with several lines displayed on it. I want each
line to be
Hi Chris and Chris,
I was keeping my eye on this thread as I have also been discovering
multiple comparisons recently. Your instructions are very clear! Thanks.
Now I would love to see an R boffin write a nifty function to produce a
graphical representation of the multiple comparison, like this
is different from
mean three but not mean one. You then get: a, ab, c for mean one, two
and three respectively.
Of course what is often used does not constitute the best way of doing it.
Sander.
Liaw, Andy wrote:
From: Sander Oom
Hi Chris and Chris,
I was keeping my eye on this thread as I have also
) to export the anova table, but results are not
promising! I prefer xtable!!
Thanks,
Sander.
Frank E Harrell Jr wrote:
Sander Oom wrote:
Dear Frank,
I have a Sweave document in which I export anova (aov) tables to Latex
and calculate some summary statistics with summarize{Hmisc} for a
graph
specifically.
Andy
From: Of Sander Oom
Dear David,
I would like to use summarize(Hmisc) and print.xtable(xtable) in a
single Sweave document, but a conflict with the 'label' function
prohibits this at the moment!
Would you be able to correct the conflicting code? I will gladly test
the new package!
I
suggested to access label() in xtable. (I
would use some other name, though: label() in xtable is already an S3
generic).
Andy
From: Sander Oom
Hi Andy and Gabor,
Thanks for your help so far! I am discovering another R dimension.
Trying to put my head around all thisthe conflict
actually
of that, you should make sure that Hmisc is loaded later than
xtable,
and use something like what Gabor suggested to access label() in
xtable. (I
would use some other name, though: label() in xtable is already an S3
generic).
Andy
From: Sander Oom
Hi Andy and Gabor,
Thanks for your help so far
),
xlab=Position, ylab=Sodium
)
Sander Oom wrote:
Dear all,
I am trying to plot means and error bars using xYplot, but I get an
error message from xYplot which I can not figure out:
Error in Summary.factor(..., na.rm = na.rm) :
range not meaningful for factors
The data frame (tmpNa
.
***
\documentclass[a4paper]{article}
\title{Sweave Test for summarize}
\author{Sander Oom}
\usepackage{a4wide}
\begin{document}
\maketitle
\begin{figure}[ht]
\begin{center}
fig=TRUE,echo=FALSE=
# library(xtable)
library(Hmisc)
set.seed(111)
dfr - expand.grid(month=1:12, year=c
, ...)
},
par.settings = sp,
auto.key=list(columns=1, x=0.7, y=0.8, corner = c(0,0))
)
Sander Oom wrote:
An off list response from Mat Soukop (thanks Mat!!) provides an even
more elegant solution (see code below)! I have included the original
code, so people
Hi Deepayan!
Deepayan Sarkar wrote:
On Friday 13 May 2005 08:07 am, Sander Oom wrote:
An off list response from Mat Soukop (thanks Mat!!) provides an even
more elegant solution (see code below)! I have included the original
code, so people can decide whether to plot in a single panel
:
On Friday 13 May 2005 10:36 am, Sander Oom wrote:
Hi Deepayan!
Deepayan Sarkar wrote:
On Friday 13 May 2005 08:07 am, Sander Oom wrote:
An off list response from Mat Soukop (thanks Mat!!) provides an even
more elegant solution (see code below)! I have included the original
code, so people can decide
wrote:
Sander Oom wrote:
Dear R users,
The Sweave code below runs fine, as it is. However, an error occurs
when the line 'library(xtable)' is uncommented:
Error: chunk 1
Error in label-(`*tmp*`, value = month) :
no applicable method for label-
Is anybody aware of this and knows
Dear all,
I am trying to plot means and error bars using xYplot, but I get an
error message from xYplot which I can not figure out:
Error in Summary.factor(..., na.rm = na.rm) :
range not meaningful for factors
The data frame (tmpNa) was created using aggregate. I have used dump to
) ~ month|continent, groups=sex, data=dfr); Key()
# add ,label.curves=FALSE to suppress use of labcurve to label curves where
# farthest apart
Deepayan Sarkar wrote:
On Wednesday 04 May 2005 10:30, Sander Oom wrote:
Dear R graphics gurus,
Another question about lattice graphics. This time I would like
Dear R graphics gurus,
Another question about lattice graphics. This time I would like to plot
means and confidence intervals by group factor in a lattice graph. I can
not find any working lattice examples. Maybe a custom panel function is
the answer, but that is a bit beyond me for now.
The
Dear R users,
If I manage to sort out this graph, it is certainly a candidate for the
new R graph gallery
(http://addictedtor.free.fr/graphiques/displayGallery.php)!
I created the following lattice graph:
library(lattice)
tmp - expand.grid(geology = c(Sand,Clay,Silt,Rock),
species =
(as a matrix I suppose but what file formats
are supported)? I've seen the pixmap library but the formats are not broadly
supported.
-Original Message-
From: Sander Oom [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 16, 2005 3:49 AM
To: [EMAIL PROTECTED]
Subject: Apack information?
Dear Apack
Hi Yyan,
The proj4R package by Roger Bivand will allow you to project data in
many ways and directions.
http://spatial.nhh.no/R/Devel/proj4R-pkg.pdf
It uses the proj libraries from:
http://www.remotesensing.org/proj/
Not sure where you would derive the time zone!
Good luck,
Sander.
yyan liu
Hi Ernst,
Pretty soon some one is going to: 1) tell you that the mailing list is
in English, 2) that you should provide more details of your data and 2)
that your message should show signs that you have read the posting guide
and have searched the help documentation in a first attempt to find
.
Romain.
Le 18.02.2005 14:33, Sander Oom a écrit :
Dear R users,
Following some of the recent questions and discussions about the R
plotting abilities, it occurred to me again that it would be very
valuable to have an R graph gallery.
Eric Lecoutre made a very nice example in:
http://www.stat.ucl.ac.be
Dear R users,
Could somebody tell me why the grey color ramp is repeated in this
graph, eventhough the ramp values go from 0 to 1? I must be missing
something obvious, but I can not see it!
z -
c(0.064329041,0.117243316,0.161565116,0.19923015,0.231642175,0.259835539,0.284571226,
the ramp even
though it has a surplus of colours (grey levels)! Why not just ignore
the surplus colours?
Anyway it works,
Sander.
Peter Dalgaard wrote:
Sander Oom [EMAIL PROTECTED] writes:
Dear R users,
Could somebody tell me why the grey color ramp is repeated in this
graph, eventhough
of the
original data that it is a good idea to plot his graphs in R instead of
excel. ;-)
Duncan Murdoch wrote:
On Wed, 16 Feb 2005 15:44:00 +0200, Sander Oom
[EMAIL PROTECTED] wrote :
Thanks Peter!
Of course I only have (nx-1)(ny-1) facets in a x*y plot!
The help page line:
...
col the color(s
, mingw32
status
major2
minor0.1
year 2004
month11
day 15
language R
Jim Lemon wrote:
Sander Oom wrote:
Dear R users,
In order to illustrate the possible effects of events on variables
plotted against time, I would like plot a time line of events along side
the plot
Rudi,
If it turns out that fonts can not be embedded with R, then one option
is to import/export the file through CorelDraw (or other vector drawing
software equivalent). The 'export to eps' function in CorelDraw provides
an option to embed all the fonts!
It requires manual labour, but it will
!?
Any suggesting how to resize the graph to plot the time line correctly
in postscript?
Thanks,
Sander.
Jim Lemon wrote:
Sander Oom wrote:
Dear R users,
In order to illustrate the possible effects of events on variables
plotted against time, I would like plot a time line of events along side
the plot
(the third dimension).
Ray Brownrigg
From: Sander Oom
Dear all,
As our previous email did not get any response, we try again with a
reformulated question!
We are trying to do something which needs an efficient loop
over a huge
array, possibly functions such as apply and related (tapply
Dear all,
As our previous email did not get any response, we try again with a
reformulated question!
We are trying to do something which needs an efficient loop over a huge
array, possibly functions such as apply and related (tapply,
lapply...?), but can't really understand syntax and examples
Dear all,
We are trying to clean multiple realizations of a pattern. Erroneous NODATA
and spurious DATA occur in the realizations. As we have to do a 1000
realizations for many patterns, efficiency of the code is important.
We need to correct the realizations with a 'mask' pattern of
11
for (i in rngNum){
+ XY$DistXY2[i] - ifelse(i=min(rngNum), NA, sqrt(((X[i]-X[i-1])^2) +
((Y[i]-Y[i-1])^2)) )
+ }
Error in ifelse(i = min(rngNum), NA, sqrt(((X[i] - X[i - 1])^2) + ((Y[i] - :
unused argument(s) (i ...)
detach(XY)
Any suggestions much appreciated,
Sander Oom
(gregmisc)
XY - data.frame(num = seq(0,10), X = seq(0,30,3), Y = seq(0, 40, 4) )
DistXY - function(idx) {
i - idx[2]
with(XY, sqrt( (X[i]-X[i-1])^2 + (Y[i]-Y[i-1])^2 ) )
}
XY$Dist - running( 1:nrow(XY), width=2, fun = DistXY, pad = TRUE )
Sander Oom slist at oomvanlieshout.net writes:
:
: Dear
The plot is nearly there! Using the axis.POSIXct command I have got the
x-axis under control. However, the units for the y-axis (Time) are in
seconds by default (i.e. range is from 0 to 1440). I'm trying to plot hours
along the y-axis, without changing the units for the plot itself, but
At 18:39 2004/05/17, you wrote:
On Mon, 17 May 2004, Sander Oom wrote:
The plot is nearly there! Using the axis.POSIXct command I have got the
x-axis under control. However, the units for the y-axis (Time) are in
seconds by default (i.e. range is from 0 to 1440). I'm trying to plot
hours
along
67 matches
Mail list logo