Displaying 20 results from an estimated 10000 matches similar to: "Dealing with data frame column names beginning with a numeric"
2012 Mar 16
2
Elegant Code
Hi,
Can anyone help to write a more elegant version of my code? I am sure
this can be put into a loop but I am having trouble creating the
objects b1,b2,b3,...,etc.
b1 <- rigamma(50,1,1)
theta1 <- rgamma(50,0.5,(1/b1))
sim1 <- rpois(50,theta1)
b2 <- rigamma(50,1,1)
theta2 <- rgamma(50,0.5,(1/b2))
sim2 <- rpois(50,theta2)
b3 <- rigamma(50,1,1)
theta3 <-
2012 Jun 11
6
Why is my data always imported as a list?
Hi,
I am a relatively new to R. So, this is probably a really basic issue that
I keep hitting.
I read my data into R using the read.csv command:
x = rep("numeric", 3)
CB_un=read.csv("Corn_Belt_unirr.csv", header=TRUE, colClasses=c("factor",
x))
# I have clearly told R that I have one factor variable and 3 numeric
variables in this table.
#but if I try to do
2012 Mar 15
3
Adding mean values to boxplots
Hello there,
I was wondering if anyone might be able to help me as I'm pretty new to R.
I'm trying to create a boxplot from a data table returned from an sproc. I
have the following code, which generates the plot as I'd like it:
library("RODBC");
conn <- odbcConnect("datawarehouse"); # connect to datawarehouse
results <- sqlQuery(conn, "call
2005 Jul 10
2
Boxplot in R
I am trying to draw a plot like Matlab does:
The upper extreme whisker represents 95% of the data;
The upper hinge represents 75% of the data;
The median represents 50% of the data;
The lower hinge represents 25% of the data;
The lower extreme whisker represents 5% of the data.
It looks like:
--- 95%
|
|
------- 75%
| |
|-----| 50%
| |
| |
-------
2012 Aug 15
4
boxplot help
Hi, im a newbie with very wobbly coding abilities.
Tearing my hair out over getting the boxplot i want...
I have a dataset called 'eagle' which consists of year (2011 or 2012), month
(jan - dec), roof (TT6, TT13 or BARE) and temp (the continuous variable that
i want to plot).
So i want boxplots of the three roof treatments in every month organised in
chronical order along x axis 2011 -
2006 Mar 05
1
predicted values in mgcv gam
Hi,
In fitting GAMs to assess environmental preferences, I use the part
of the fit where the lower confidence interval is above zero as my
criterion for positive association between the environmental variable
and species abundance. However I like to plot this on the original
scale of species abundance. To do so I extract the fit and SE using
predict.gam.
Lately I compared more
2006 Apr 28
2
How to get a grid behind a boxplot
I am using R 2.2.1 on a Windows 2000 PC.
When I do a grid() after the boxplot
it overprints the boxplot:
> boxplot(count ~ spray, data = InsectSprays, col = "lightgray")
> grid(nx=NA, ny=NULL)
>
if I try the panel.first
> boxplot(count ~ spray, data = InsectSprays, col = "lightgray",
+ panel.first=grid(nx=NA, ny=NULL))
>
I can see the grid flash
2011 Jan 26
1
boxplot - code for labeling outliers - any suggestions for improvements?
Hello all,
I wrote a small function to add labels for outliers in a boxplot.
This function will only work on a simple boxplot/formula command (e.g:
something like boxplot(y~x)).
Code + example follows in this e-mail.
I'd be happy for any suggestions on how to improve this code, for example:
- Handle boxplot.matrix (which shouldn't be too hard to do)
- Handle cases of complex
2006 Mar 07
3
Boxplot Help Needed
Hi R-Experts,
How can I show all the relevant measures like mean, median, min. value,
max. value, outlier in a single boxplot diagram?
Suppose I have a data set c(2,4,5,7,12,14,15,13,8,5,23,98,11)
Sumanta Basak.
[[alternative HTML version deleted]]
2011 Apr 17
3
Box plot with 5th and 95th percentiles instead of 1.5 * IQR: problems implementing an existing solution...
Hi all,
I'm just getting started with R and I would appreciate some help. I'm having
trouble creating a boxplot with whiskers at the 95th and 5th percentiles
instead of at 1.5 * IQR. I have read the relevant documentation, and checked
existing mails on this topic. I found a small modification that should work
: https://stat.ethz.ch/pipermail/r-help/2001-November/016817.html and tried
to
2012 Mar 12
2
How to create interrupted boxplot
Hello,
I have created two boxplots with following R code. There is one outlier in
B group.
The outlier is 33. But the all other data are between 0 to 4.
How can I skip y-axis around 5 to 25, and expand 0-4 for this case. Also I
want keep the outlier in my boxplot.
I want my boxplot look like the second one, keep the outlier, and make an
interrupt of y-axis from 5 to 25.
Thanks,
Jianghong
2011 Nov 17
1
Small inconsistency with boxplot
Dear R-core team,
I think I found a small inconsistency in the boxplot function. I don't want to post it as a bug since I'm not sure this might be considered as one according to the FAQ --- and this is not a major problem. Don't hesitate to tell me if I'm wrong.
If you try to do a boxplot on a matrix and set the "at" argument to some vector different from 1:n, n is the
2009 Aug 12
1
A function for plotting a boxplot with added dot and bars (for mean and SE) - please help improve my code
Hello people,
A while back I wanted to plot boxplots with interactions that will have a
dot for the mean of the sample + bars for the SE.
After searching for some code, I found something that did it for one level,
but couldn't find something that will allow for interactions the way the
original boxplot does.
After playing with the original code, I found a way for allowing the boxplot
code to
2011 Jun 07
1
Rv: Rv: limites de un boxplot
Hola, por mi parte doy por zanjado el tema. He llegado a la causa raíz de mi
problema: falta de conocimiento de la forma en la que se debe usar la ayuda de
las funciones de R y gracias a vuestra colaboración, ¡ya se cómo hacerlo :) !
Nuevamente,gracias a todos. Saludos,
Fernando
-- ____________________________________
Hola,
La misma función boxplot indica la existencia de estas
2006 Oct 28
3
Debugging R's code: boxplot.stats
Hi everyone,
I think I have found a minor issue with the R function "boxplot.stats".
But before I make such a rash comment, I'd like to check my facts by
fixing what I think is the problem. However, why I try to do this, R
does not behave as I expect. Can you tell me what I'm doing wrong?
If I use the command:
debug(boxplot.stats)
I am allowed to step through the code as
2005 Jul 04
1
question about boxplot axis
Hi:
I have a question making side by side boxplot.
My response is numeric and I want to make a side by
side boxplot of it accroding to a factor vector. So,
there are several boxplots on the same plot. Each
boxplot is with respect to one level for a factor. The
levels of
the factor are some characters. When I make the plot,
the boxplots are arranged according to the alphabetic
order of the
2017 Sep 28
1
Boxplot, formula interface, and labels.
Just change the separator:
data(Titanic)
Titanic.df <- as.data.frame(Titanic)
boxplot(Freq~Class*Sex, Titanic.df, cex.axis=.6, sep="\n")
See attached .png.
----------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77843-4352
-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On
2008 Aug 01
2
boxplot help
hi
I have list of matrix of lenggth 61 containg the mean values..I want to make
a boxplot for each of the matrix.
I used a for loop but i cant figure out the way to save in the boxplots
> all.the.mean
[[1]]
mean
0.5
o.6
0.8
[[2]]
0.6
0.6
0.9
now i want the boxplot for each of the matrix in a seperate window.my code
for(i in 1:length(all.the.mean)
{
windows()
boxplot(all.the.mean[[i]]
}
this
2017 Sep 28
0
Boxplot, formula interface, and labels.
mybp <- boxplot(count ~ geno * tissue, data = mydata, plot = FALSE)
mybp$names <- gsub("\\.", "\n", mybp$names)
bxp(mybp)
See ?boxplot for details.
Best,
Ista
On Thu, Sep 28, 2017 at 12:40 PM, Ed Siefker <ebs15242 at gmail.com> wrote:
> I have data I'd like to plot using the formula interface to boxplot.
> I call boxplot like so:
>
> with(mydata,
2009 Apr 21
3
ggplot2 - boxplot of variables / columns
Hi,
ggplot/qplot is great - it has really helped me do some nice things.
However, simple boxplot of different columns/variables is a bit
tricky, because of (i think) qplot's generic Y conditional on X input
form. Se below.
# Some data:
a <- rnorm(100)
b <- rnorm(100,1,2)
c <- rnorm(100,2,0.5)
# normal boxplot of a,b,c
boxplot(a,b,c) # Looks good
library(ggplot2) # loads qqplot2
#