similar to: How to repeat code snippet for several variables in a data frame?

Displaying 20 results from an estimated 2000 matches similar to: "How to repeat code snippet for several variables in a data frame?"

2005 Apr 22
1
Help needed with lattice graph!
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 =
2005 Feb 16
5
Repeating grey scale in graph?
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, 0.038507288,0.094184749,0.140959431,0.180803984,0.215159105,0.245096084,0.271412845,
2005 May 13
5
Conflict between xtable and Hmisc when using Sweave?
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 a workaround? Thanks, Sander. *******************
2005 May 24
3
Plot range resizing when adding additiona lines
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 displayed in a different color, so it seems the only way to do this is to create a plot and then use the lines() function.
2005 Jun 10
2
Replacing for loop with tapply!?
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 daily temperatures for each of 15000 weather stations: m <- 37 n <- 2 outmat88 <- matrix(0,
2005 Jun 09
7
plot3d
hello, to use the function plot3d, i should use the package R.basic! plot3d {R.basic} If people know exactly a site to load this package, please give me the URL! Thanks Sabine --------------------------------- [[alternative HTML version deleted]]
2005 May 15
3
adjusted p-values with TukeyHSD?
hi list, i have to ask you again, having tried and searched for several days... i want to do a TukeyHSD after an Anova, and want to get the adjusted p-values after the Tukey Correction. i found the p.adjust function, but it can only correct for "holm", "hochberg", bonferroni", but not "Tukey". Is it not possbile to get adjusted p-values after
2005 May 29
6
R GUI for Linux?
Hello all, I noticed that both Windows and OS X version of R have a GUI (Rconsole). Is there a GUI for Linux? I'm running Debian on which the CLI for R works just fine. Regards, - Robert
2005 Feb 18
3
Hosting a R Graph Gallery?
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/ISpersonnel/lecoutre/stats/fichiers/_gallery.pdf It would be very useful to many beginners, but probably also advanced users of R, to have an
2005 Feb 24
1
zeichnung eines wahrscheinlichkeitsnetztes
ich hätte ein problem: im rahmen meiner projektarbeit stehe ich vor der aufgabe, einen beliebigen datensatzt einzulesen, die empirische verteilungsfunktion des datensatztes zu zeichnen, aber das ganze so, dass die y-achse nach der quantilsfunktion der exponetialverteilung mit parameter=1 transformiert werden soll! leider steh ich da jetzt wirklich an! würde mich serh freuen, wenn mir jemand
2005 Jun 06
2
Polar Graph
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 vidéos ! [[alternative HTML version deleted]]
2006 Aug 04
2
Data frame referencing?
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$y>0.5,y] <-1 Error in "[<-.data.frame"(`*tmp*`, a$y > 0.5, y, value = 1) :
2005 Mar 09
3
from long/lat to UTM
Hi: Is there any function in R which can convert the long/lat to UTM(Universal Transverse Mercator)? There are quite a few converters on Internet. However, the interface is designed as input->output which I can not convert lots of locations at the same time. Another question is whether there is a function in R which can tell the time zone from the location's lat/long? Thank you!
2004 May 29
3
panel function in a conditioned lattice graphic
I'm trying to use plotting character to encode the variable "block" from my dataset in a conditioned lattice graphic (R 1.9.0 on Mac OS 10.3.3). The data I'm using is the dataframe "dryoutcover" which is here (4k): http://anthony.darrouzet-nardi.net/downloads/dryoutcover.Rdata The code that generates my graphic almost correctly is as follows: xyplot(coversage ~
2014 Dec 17
3
Problema con el subset
Hola a todos, Agradeceros de antemano vuestro tiempo y paciencia ya que soy un poco novato y tal vez esto sea un poco trivial.  Lo que quiero hacer es que me represente en eje de las x las fechas (columna fecha) y los valores de z (columna z) pero de los datos que he filtrado antes en (dfgrupo<-subset(df,df$parametroslaboratorio=="Aflatoxinas ByG")) y que los parámetros iguales
2010 Jun 11
1
Windows, OSX and Linux: updating a graphic device and double buffering
Hello there, I'm struggling with the base graphics system on different operating systems. I would like to get an animation effect by re-plotting with the plot function. See the attached code example: move the slider quick from one side to the other. I experience different levels of success, depending on which OS I use. - Linux (Ubuntu >9.10, R 2.9.2-3): Each plot command gets
2011 Oct 18
1
Function to "lump" factors together?
Sorry about the odd terminology, but I suspect that my intent might be completely missed had I used "aggregate" or "classify" (each of which appears to have some rather special meanings in statistical analysis and modeling). I have some data about software builds; one of the characteristics of each is the name of the branch. A colleague has generated some fairly interesting
2011 Jan 10
2
Calculating Portfolio Standard deviation
Dear R helpers I have following data stocks <- c("ABC", "DEF", "GHI", "JKL") prices_df <- data.frame(ABC = c(17,24,15,22,16,22,17,22,15,19),                                          DEF = c(22,28,20,20,28,26,29,18,24,21),                                           GHI = c(32,27,32,36,37,37,34,23,25,32),                                          
2006 Oct 27
3
Suppress blanks/spaces in character
Hi all I'm have a character vector and would like to suppress the blanks if there are more than one after the other. Example: Character value is: "abc def ghi" The result should be: "abc def ghi" I know that it's possible to delete the leading blanks with the command "trim". But how can I delete blanks within a character? Thank you very much in
2005 May 30
4
Very simple traffic shaping script for H.323
Hello - What I want to do seems very simple - I want to make sure any H.323 traffic gets processed before anything else entering or leaving this network. The network has a videoconferencing device on the LAN at 192.168.16.4. A Linux firewall NATs an external IP Address to this internal address and I have appropriate SNAT and DNAT rules that work. The NAT and connection tracking rules all work