Hello, My name is Philippe Favrot, I'm a french occupational doctor (working in Luxembourg), and I'm an "R beginner". I would be happy you could help me about the utilization of "R". Recently, I measured sound levels in a plant. Before the measuring, I divided the plant in 3 virtual rows and 8 virtual columns. I measured the sound level at each intersection of rows and columns and obtained a set of 24 "sound level" values. I wrote the results in a excel's spreadsheet. My question is: I know to do import from excel into "R" (with read.table()), but how can I draw a three dimensional graphic of the plant's sound level ? Can I overlay a map of this factory (as a rectangle with a grid representing each spots where I measured )? I'd understand if you are too busy to reply to my mail. Thanks. Best regards Philippe Favrot
Philippe a ??crit :> ... how can I draw a three dimensional graphic of the > plant's sound level ?Not an answer, but I find image() very useful to visualize 3D data simply on a 2D colored image. hih
Le 25.08.2005 15:54, Philippe a ??crit :>Hello, >My name is Philippe Favrot, I'm a french occupational doctor (working in >Luxembourg), and I'm an "R beginner". >I would be happy you could help me about the utilization of "R". >Recently, I measured sound levels in a plant. Before the measuring, I >divided the plant in 3 virtual rows and 8 virtual columns. I measured >the sound level at each intersection of rows and columns and obtained a >set of 24 "sound level" values. >I wrote the results in a excel's spreadsheet. >My question is: I know to do import from excel into "R" (with >read.table()), but how can I draw a three dimensional graphic of the >plant's sound level ? Can I overlay a map of this factory (as a >rectangle with a grid representing each spots where I measured )? >I'd understand if you are too busy to reply to my mail. >Thanks. >Best regards >Philippe Favrot > >Bonjour Philippe, Have you tried : ** RSiteSearch('3D') ** RSiteSearch('map') ** http://addictedtor.free.fr/graphiques/search.php?q=3D ** http://addictedtor.free.fr/graphiques/search.php?q=map ** http://www.stat.auckland.ac.nz/~paul/RGraphics/rgraphics.html about a great book on R graphics (I can't wait to have my copy, just ordered one by amazon) Also, have a look at the package rgl on cran, that's terrific !! Cheers, Romain -- visit the R Graph Gallery : http://addictedtor.free.fr/graphiques ~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~ ~~~~~~ Romain FRANCOIS - http://addictedtor.free.fr ~~~~~~ ~~~~ Etudiant ISUP - CS3 - Industrie et Services ~~~~ ~~ http://www.isup.cicrp.jussieu.fr/ ~~ ~~~~ Stagiaire INRIA Futurs - Equipe SELECT ~~~~ ~~~~~~ http://www.inria.fr/recherche/equipes/select.fr.html ~~~~~~ ~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
Also, for the three dimensional graphic, help.search("3d") will lead to a reference to the cloud() function in the lattice package. I don't remember if the lattice package is installed by default. If not, you will have to install it. (If you're using a Mac or Windows computer, there's a menu item for installing packages. Otherwise you have to use the install.packages() function.) Then require(lattice) ?cloud to first load the lattice package, and then view the online documentation for the cloud() function. You can view one of the cloud() examples like this: require(datasets) cloud(Sepal.Length ~ Petal.Length * Petal.Width | Species, data = iris, screen = list(x = -90, y = 70), distance = .4, zoom = .6) You could consider a bubble plot. There are two packages with functions for bubble plots, gstat and sp. (Neither of them is installed by default.) I suspect the one in gstat will be easier to use, at least for someone new to R. After having installed either of these packages, say gstat, then ?bubble to get its documentation. Overlaying a grid on the plot created by cloud() might be difficult for an R beginner. Here's a simple example: bubble(data.frame(x=1:5,y=1:5,z=1:5)) -Don At 3:54 PM +0200 8/25/05, Philippe wrote:>Hello, >My name is Philippe Favrot, I'm a french occupational doctor (working in >Luxembourg), and I'm an "R beginner". >I would be happy you could help me about the utilization of "R". >Recently, I measured sound levels in a plant. Before the measuring, I >divided the plant in 3 virtual rows and 8 virtual columns. I measured >the sound level at each intersection of rows and columns and obtained a >set of 24 "sound level" values. >I wrote the results in a excel's spreadsheet. >My question is: I know to do import from excel into "R" (with >read.table()), but how can I draw a three dimensional graphic of the >plant's sound level ? Can I overlay a map of this factory (as a >rectangle with a grid representing each spots where I measured )? >I'd understand if you are too busy to reply to my mail. >Thanks. >Best regards >Philippe Favrot > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html-- -------------------------------------- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA
You might find image() useful, to plot the factory map and overlay the sound levels as colors. You could also use persp(), or have a look at rgl.surface in the rgl package on http://cran.r-project.org. Reid Huntsinger -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Philippe Sent: Thursday, August 25, 2005 9:55 AM To: r-help at stat.math.ethz.ch Subject: [R] Help about R Hello, My name is Philippe Favrot, I'm a french occupational doctor (working in Luxembourg), and I'm an "R beginner". I would be happy you could help me about the utilization of "R". Recently, I measured sound levels in a plant. Before the measuring, I divided the plant in 3 virtual rows and 8 virtual columns. I measured the sound level at each intersection of rows and columns and obtained a set of 24 "sound level" values. I wrote the results in a excel's spreadsheet. My question is: I know to do import from excel into "R" (with read.table()), but how can I draw a three dimensional graphic of the plant's sound level ? Can I overlay a map of this factory (as a rectangle with a grid representing each spots where I measured )? I'd understand if you are too busy to reply to my mail. Thanks. Best regards Philippe Favrot ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html