similar to: Improvement in hist command documentation

Displaying 20 results from an estimated 8000 matches similar to: "Improvement in hist command documentation"

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
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
2010 Dec 18
3
use of 'apply' for 'hist'
Hi all, ########################################## dof=c(1,2,4,8,16,32) Q5=matrix(rt(100,dof),100,6,T,dimnames=list(NULL,dof)) par(mfrow=c(2,6)) apply(Q5,2,hist) myf=function(x){ qqnorm(x);qqline(x) } apply(Q5,2,myf) ########################################## These looks ok. However, I would like to achieve more. Apart from using a loop, is there are fast way to 'add' the titles to be
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 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
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 <-
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
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:
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
2020 Jan 18
1
How to get an object name from C?
(earlier I sent it as html by mistake). Hi, How can I get from C an object name used as a function argument? I have sample code in C that gives me access to the name of the function being called: SEXP xname(SEXP x) { const char *fun_name = CHAR(PRINTNAME(CAR(x))); x = CDR(x); const char *arg_name = isNull(TAG(x)) ? "" : CHAR(PRINTNAME(TAG(x)));
2008 Nov 15
1
Rename objects based on list
Hi all, I am trying to find a way to rename R objects with names pulled from a vector of names. For example, I have a data frame, my.data.frame, and a list of names, my.names. My.names is simply the column names of my.data.frame. I want save the histogram with the column name as the name of the object. for (i in 1:ncol(my.data.frame) { tmp<-hist(my.data.frame[,i])
2007 Dec 30
1
Histogram with different colors for different portions
Dear Rusers, I would like to color different sections of a histogram different colors. I have an example that was done by "brute force" given below. Has anyone implemented something like this in general? If not, any suggestions/pointers on how to write a general function to do so would be most appreciated. Alan-
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]]
2005 Oct 18
2
hist of dates
Hi all I wish to draw an histogram... with dates but the following append, i don't know where is the problem, help(hist.Date) works and i don't see any usefull information on what i'm doing wrong... > hist.Date(dt_cycles) Error: couldn't find function "hist.Date" > hist.date(dt_cycles) Error: couldn't find function "hist.date" > cycles [1] 7 1
2006 Dec 04
2
erroneous warning in hist (PR#9408)
Full_Name: Alex Deckmyn Version: 2.4.0 OS: linux Submission from: (NULL) (193.190.63.62) specifying the "right" option in hist results in a warning when plot=F. The option is taken into account correctly, but a warning is issued anyway. When plot=T there is no warning. > hist(c(1,1.5),breaks=0:4)$counts [1] 1 1 0 0 > hist(c(1,1.5),breaks=0:4,right=T)$counts [1] 1 1 0 0 >
2008 May 20
2
hist clarification
Can someone help me with a misunderstanding I'm having with hist? I expected, from the example below, that the number of bins would always be 10 and the length of the counts array the same. According to the help section 'breaks' can be a integer indicating the number of bins. From the example below, the number of bins (length of the counts array) varies. Am I wrong in expecting the
2001 Oct 23
0
problems with postscript device
Hola! I am producing postscript output from R (windows 98), both using firts the windows devicd and then " copy to postscript", or using the postscript device directly. The problem shows up equally both ways. The function producing the plot is given below. The only difference I can see with this function and other I have producing plots, is that this uses split.screen(). I include the
2010 Mar 30
1
hist.default()$density
Dear developers, the current implementation of hist.default() calculates 'density' (and 'intensities') as dens <- counts/(n*h) where h has been calculated before as h <- diff(fuzzybreaks) which results in 'fuzzy' values for the density, see e.g. > tmp <- hist(1:10,breaks=c(-2.5,2.5,7.5,12.5),plot=FALSE) > print(tmp$density,digits=15) [1]
2003 Jan 08
4
weird breaks in hist (PR#2431)
Full_Name: Reinhold Koch Version: 1.6.1 OS: redhat 8.0 Submission from: (NULL) (131.152.84.111) I came across rather weird behavior of the breaks in hist: hist(1:3) gives the expected result, besides an unnecessary gap between 2nd and 3rd column hist(1:4) always merges up the first two columns, also if I resort to hist.default(1:4,breaks=1:4). hist.default(1:4, include.lowest=F) gives an