similar to: Three most useful R package

Displaying 20 results from an estimated 30000 matches similar to: "Three most useful R package"

2010 May 13
1
ggplot2: qplot won't work
I have a script running in the StatET Eclipse environment that executes the ggplot2 command qplot in a function: # Creates the plot createPlot <- function(){ print("Lets plot!") qplot(1:10, letters[1:10]) } When executing the qplot line directly, it works. When executing the script it does not open a window and it it does not plot. Is there something important I have forgotten? I
2010 Jun 24
8
Install package automatically if not there?
Hi fans, is it possible for a script to check if a library has been installed? I want to automatically install it if it is missing to avoid scripts to crash when running on a new machine... Ralf
2010 Aug 04
3
Output (graphics and table/text)
Hi R Users, I need to produce a simple report consisting of some graphs and a statistic. Here simplification of it: # graphics output test a <- c(1,3,2,1,4) b <- c(2,1,1,1,2) c <- c(4,7,2,4,5) d <- rnorm(500) e <- rnorm(600) op <- par(mfrow=c(3,2)) pie(a) pie(b) pie(c) text(ks.test(d,e)) obviously, the ks.test does not make it to the output. How can this be archived by a)
2010 Mar 03
1
: Three most useful R package
ad 1) ggplot2, Hmisc, RODBC ad 2) A package to produce high quality tables with summary statistics for publications in scientific journals. Regards, Frank >>> Ralf B <ralf.bierig@gmail.com> 02.03.2010 21:13 >>> Hi R-fans, I would like put out a question to all R users on this list and hope it will create some feedback and discussion. 1) What are your 3 most useful R
2010 Oct 06
5
Create variable by name
Can one create a variable through a function by name createVariable <- function(name) { outputVariable = name name <- NULL } after calling createVariable("myVar") I would like to have a variable myVar initialized with NULL in my environment. Is this possible? Ralf
2010 Jul 29
2
Reset R environment through R command
Is it possible to remove all variables in the current environment through a R command. Here is what I want: x <- 5 y < 10:20 reset() print(x) print(y) Output should be NULL for x and y, and not 5 and 10:20. Can one do that in R? Best, Ralf
2010 Jun 24
4
Simple qqplot question
I am a beginner in R, so please don't step on me if this is too simple. I have two data sets datax and datay for which I created a qqplot qqplot(datax,datay) but now I want a line that indicates the perfect match so that I can see how much the plot diverts from the ideal. This ideal however is not normal, so I think qqnorm and qqline cannot be applied. Perhaps you can help? Ralf
2010 Sep 21
5
Combined plot: Scatter + density plot
Hi, in order to save space for a publication, it would be nice to have a combined scatter and density plot similar to what is shows on http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=78 I wonder if anybody perhaps has already developed code for this and is willing to share. This is the reproducible code for the histogram version obtained from the site: def.par <-
2010 Jul 09
3
Plotting text in existing plot?
I would like to plot some text in a existing plot graph. Is there a very simple way to do that. It does not need to be pretty at all (just maybe a way to center it or define a position within the plot). ( ? ) Ralf
2010 Sep 27
2
rimage package problems
Hi all, I tried to install the rimage in order to get to the function ?read.jpeg. However, I get this error, independent what mirror I choose: install.packages("rimage") --- Please select a CRAN mirror for use in this session --- Warning message: In getDependencies(pkgs, dependencies, available, lib) : package ?rimage? is not available > Does anybody know what happend with the
2010 May 06
3
Intersection list
How can I create intersections of vectors? a <- c(1,2,3) b <- c(1,5,6) the intersected list c should contain c(1)... Ralf
2011 Feb 17
3
ggplot2, 'se' variable in geom_errorbar's limits?
Dear R-list I'm working with with geom_errorbar; specifically I'm trying to reproduce the example Hadley Wickham have on http://had.co.nz/ggplot2/geom_errorbar.html (all in the button of the page) where he makes an nice plot with errorbars and then draw lines between the points. What confuses me is the 'limits' he defines for the errorbars from the se variable. First he creates
2010 Jul 29
3
Statistical mailing list
I am looking for a mailing list for general statistical questions that are not R related. Do you have any suggestions for lists that are busy and helpful and/or lists that you use and recommend? Thanks in advance, Ralf
2008 Oct 16
2
Grouped Histogram (colored)
Hi all, I'm trying to create a histogram which shows the frequency of variables within a certain timeframe. I've been using SPSS before, but I didn't quite like it... To describe my problem further here are some example variables: the "event" is actually a string which I recoded using: [code] data$event_class = as.numeric(as.factor(data$event)) [/code] I've recoded
2011 Dec 07
2
plotting and coloring longitudinal data with three time points (ggplot2)
Dear list, I have been struggling with this for some time now, and for the last hour I have been struggling to make a working example for the list. I hope someone out there have some experience with plotting longitudinal data that they will share. My data is some patient data with three different time stamps. First the patients are identified at different times (first time stamp). Second, they
2010 Sep 22
3
Extracting bins and frequencies from frequency table
Dear R users, I would like to great a frequency table from raw data and then access the classes/bins and their respective frequencies separately. Here the code to create the frequency tables: x1 <- c(1,5,1,1,2,2,3,4,5,3,2,3,6,4,3,8) t1 <- table(x1) print(t1[1]) Its easy to plot this, but how do I actually access the frequencies alone and the bins alone? Basically I am looking to get:
2010 Oct 06
3
Source awareness?
Here the general (perhaps silly question) first: Is it possible for a script to find out if it was sourced by another script or run directly? Here a small example with two scripts: # script A print ("This is script A") # script B source("C:/scriptA.R") print ("This is script B") I would like to modify script A in a way so that it only outputs 'This is script
2010 Aug 04
4
Adding collumn to existing data frame
Hi experts, I am trying to write a very flexible method that allows me to add a new column to an existing data frame. This is what I have so far: add.column <- function(df, new.col, name) { n.row <- dim(df)[1] length(new.col) <- n.row names(new.col) <- name return(cbind(df, new.col)) } df <- NULL df <- data.frame(a=c(1,2,3)) df # corect: added NA to new collumn df <-
2010 Jul 09
3
Non-parametric regression
I have two data sets, each a vector of 1000 numbers, each vector representing a distribution (i.e. 1000 numbers each of which representing a frequency at one point on a scale between 1 and 1000). For similfication, here an short version with only 5 points. a <- c(8,10,8,12,4) b <- c(7,11,8,10,5) Leaving the obvious discussion about causality aside fro a moment, I would like to see how
2010 May 11
3
Smoothing Techniques - short stepwise functions with spikes
R Friends, I have data from which I would like to learn a more general (smoothened) trend by applying data smoothing methods. Data points follow a positive stepwise function. | x x | xxxxxxxx xxxxxxxx | x x |xxxx xxx xxxx | xxxxxxxxxxxxxxxxx | |