Displaying 20 results from an estimated 20000 matches similar to: "Rename objects based on list"
2007 Aug 15
4
Possible to "import" histograms in R?
Hi,
I have a large amount of data that I would like to create a histogram of and
plot and do things with in R. It is pretty much impossible to read the data
into R, so I have written a program to bin the data and now have a list of
counts in each bin. Is it possible to somehow import this into R and use
hist(), so I can, for instance, plot the probability density? I have looked
at the help page
2006 Aug 25
1
How to get back POSIXct format after calculating with hist() results
Hi,
I have a casting/formatting question on hist.POSIXt:
The histogram plot from POSIXct works perfect (with help of Prof. Ripley
-thanks!).
When processing the hist(plot=FALSE) output and then plotting the
results over the x-axis (bins) coming from hist(), I lose the date/time
labels, getting instead integers displayed.
Trying to cast the $breaks with as.POSIXct gives silly results with
2009 Jun 01
1
Bug in hist() when working with Dates ?
Hi,
It seems that hist() has a buggy behavior when breaking over "days".
The bug can be reproduced in a few steps:
> d=data.frame(date=c("2009-01-01", "2009-01-02", "2009-01-02"))
> d$date=as.Date(d$date)
> d$date
[1] "2009-01-01" "2009-01-02" "2009-01-02"
> h=hist(d$date, "days")
> h$count
[1] 3
2012 Feb 06
2
histogram
With R and the hist function, is there a way to make a histogram in which
the y axis denotes propotion with respect to a separate sample dataset of
the same range instead of frequency?
[[alternative HTML version deleted]]
2008 Sep 01
3
another histogram question
Hi there,
I hope this question is not as stupid as the one before ...
I tried to shorten my histogram (because the distribution is quite skewed and I
simply don't want to see the long tail but still use the histogram plot). How
can I do something like this? (The example does not work but I don't know why...)
data <- rnorm(100) # as example, of course this is not skewed...
h <-
2008 Feb 16
3
how to specify the location of tick mark on x axies
Dear:
I want to plot barplot and let bar be in the middle of each x axis category.
Do you have this experience?
Many Thanks!
Xin
[[alternative HTML version deleted]]
2004 Aug 19
3
probability histogram question
Hello, all;
I get an unexpected result when trying to plot a probability histogram
with R1.9.1 on windows xp:
#with the following code:
> x <- runif(100,0,1)
> hist(x)
> hist(x, freq=F)
> h <- hist(x, freq=F)
> summary(h)
# Length Class Mode
#breaks 11 -none- numeric
#counts 10 -none- numeric
#intensities 10 -none- numeric
#density 10
2009 Jul 26
2
problems hist() and density
Hello,
I have a problem with the hist() function and showing densities. The
densities sum to 50 and not to 1! I use R version 2.9.1 (2009-06-26) and
I load the seqinR library.
My data is the following vector:
[1] 0.1400000 0.2000000 0.2200000 0.2828283 0.1600000 0.1600000
0.3600000
[8] 0.1600000 0.2200000 0.2600000 0.2000000 0.3000000 0.2200000
0.2342342
[15] 0.1800000 0.2200000 0.1600000
2011 Dec 31
1
Histogram omitting/collapsing groups
I have two large datasets (156K and 2.06M records). Each row has the
hour that an event happened, represented by an integer from 0 to 23.
R's histogram is combining some data.
Here's the command I ran to get the histogram:
> histinfo <- hist(crashes$hour, right=FALSE)
Here's histinfo:
> histinfo
$breaks
?[1] ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 10 11 12 13 14 15 16 17 18 19 20 21
2006 Apr 05
1
hist function: freq=FALSE for standardised histograms
Dear All,
I am a undergraduate using R for the first time. It seems like an excellent
program and one that I look forward to using a lot over the next few years,
but I have hit a very basic problem that I can't solve.
I want to produce a standardised histogram, i.e. one where the area under
the graph is equal to 1. I look at the manual for the histogram function and
find this:
freq:
2011 Oct 24
3
Creating a histogram properly
Hello all,
I'm trying to make a histogram of the data contained in my dataframe.
The summary of the data gives me exactly what I want
summary (Data)
V1 V2
first001: 3 last001: 9
first002: 3 last002: 7
first003: 2 last003: 6
(Other) :52 (Other): 27
But how do I capture the names and values in vectors so I can plot them?
2010 Mar 30
4
list index rules evaluation behavior
I have what may be a simple/foolish question, but I've done the due diligence
and looked through pages of posts here as well as several of the PDFs on the
CRAN site, but haven't been able find what I'm after.
I am working with a list of say 3 histogram objects A, B & C, and each
histogram is a list of 7 elements. I would like to access $name, the 6th
element, of histograms A,B and
2008 Jan 11
1
Histogram from frequency table?
Hi, I've had some trouble figuring out how to produce a histogram in R directly given a frequency table or relative frequency table. I've looked through the documentation and mailing list, and have only found information on producing histograms given the original data set. Any help would be appreciated!
An example of what I'd like to do would be to take the following frequency table:
2004 Nov 26
2
hist and truehist
Hello!
Up to now I have been using hist() to display the distributions.
Howevere, I noteiced strange numbers on y (vertical) axis, if I used
probability = T or freq = F option. I thought it is a bug and launched
the R-bug system and found some posts on that matter. Brian Ripley
responded to one, that one should look at truehist() for that. Ok I can
use truehist() if I want to see the ratios
2003 Jan 08
1
Determining the break points by hist() leads to errors (PR#2432)
Hi,
if I dermine the break points using the hist() function and then try
to re-use these in a new histogram, R fails. Here is an example of the
problem:
##First, plot a histogram:
data(islands)
foo <- hist(islands,freq=T)
##Now, try plot it again, with the previously determined break points:
hist(islands,breaks=foo$breaks,freq=T)
##... this lead to the warning message:
Warning message:
2010 Sep 16
2
problem reading Matlab file into R
Hi,
I'm trying to read a .mat file into R (2.11.1) with medium success so far. The file I have is a MATLAB 5.0 MAT-file exported from RiverSurveyor LIVE software (http://www.sontek.com/software.php). I have R.matlab and Rcompression installed and readMat() starts reading the file, as can be seen in verbose mode (hence medium success), but then gives the following error:
Error in dim(matrix)
2019 Oct 01
1
Improvement in hist command documentation
Hi all,
In the histogram created with the `hist` command, the label of the y axis reads "Frequency ?.
Finding that the ylab key is used to change (localize) that word may seem difficult for people
who are beginners either in R or in english.
I suggest very minor modifications of the file hist.Rd at https://svn.r-project.org/R/trunk/src/library/graphics/man/hist.Rd.
1) make the default value
2000 Nov 17
2
hist() and density
There were some questions about hist() a couple of days ago which
triggered this post. My question/suggestion is about the y-axis in hist.
There are reasons to prefer making the y-axis density=relative
frequency/bin width. One reason is that the height of the plot does not
depend on the bin width; another is that if your histogram is in density
then you can easily superimpose a smooth theoretical
1998 Jan 23
2
hist: rel.freqs
In R0.61,
In hist(), should the line
rel.freqs <- counts/(sum(x) * diff(breaks))
computing the relative frequencies or height of the rectangles
in a histogram not be
rel.freqs <- counts/(sum(counts) * diff(breaks))
instead, or do I misunderstand something?
Thanks,
Philippe
--
--------------------------------------------------------
Philippe Lambert Tel:
1999 Feb 22
1
Size of objects in the workspace
Is there an easy way (or any way) to determine the size of all the
objects in an R workspace. I know that "dim" will work on matrices,
"length" will work on lists, but what gives the size of a function?
After I have worked for a few days I often get confused about what is
what in the workspace, so I'm looking for something like "ls -l", to
point me toward