Displaying 20 results from an estimated 9000 matches similar to: "erroneous warning in hist (PR#9408)"
2002 Jul 03
1
complex numbers in library function (PR#1737)
Full_Name: Alex Deckmyn
Version: 1.5.1
OS: Linux Mandrake 7.0
Submission from: (NULL) (193.190.63.62)
A short function in a library contains the complex number -2i :
phihat <- function(x)
{
x+ (-2i)
}
If i read the source file with source("phihat") this works fine. If I include it
as
a function in a library and read it with library(test), the function is still
read
2006 Nov 10
3
unwarranted warning from hist.default (PR#9356)
> x = rnorm(100)
> b = seq(min(x) - 1, max(x) + 1, length = 11)
> b
[1] -3.4038769 -2.7451072 -2.0863375 -1.4275678 -0.7687980 -0.1100283
[7] 0.5487414 1.2075111 1.8662808 2.5250506 3.1838203
>
> invisible(hist(x, breaks = b, include.lowest = TRUE, plot = FALSE))
Warning message:
argument 'include.lowest' is not made use of in: hist.default(x,
breaks = b,
2008 Oct 02
2
Multiple hist(ograms) - One plot
Hello,
I am trying to plot multiple histograms with the same scales, etc into one
plot. The commands below produce a 3 page PDF with each histogram occupying
the upper right quadrant. And use slightly different scales on the X and Y
axes.
> s21 <- dat[dat$sc_recov=="21",]
> s21.ED <- subset(s21, select=(bbED))
> s31 <- all[all$sc_recov=="31",]
> s31.ED
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
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
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
2003 Mar 08
2
hist() basic question
Hi,
This is a very basic question, but I would like to undestand hist(). I
thought that the hist( , freq=FALSE) should provide the relative
frequencies (probabilities), and so they should sum 1, however:
set.seed(2)
ah <- hist(rnorm(100), freq=F)
sum(ah$intensities)
[1] 2
set.seed(2)
bh <- hist(rlnorm(100), freq=F)
sum(bh$intensities)
[1] 0.4999996
I'm getting similar figures with
2013 Jan 14
1
Wrong bin count number with hist() ?
Hi there,
# Consider the following example:
A = 19
B = 20
A< B
A==B
hist(c(1:15,B,50),breaks=c(0,15,A,50),plot=F)$count
hist(c(1:15,A,50),breaks=c(0,15,B,50),plot=F)$count
# I was expecting the same results with the following values of A and B:
A = 19.6019203953960
B = 19.6019204365543
A< B
A==B
hist(c(1:15,B,50),breaks=c(0,15,A,50),plot=F)$count# wrong
2005 Dec 11
1
(PR#8376 inconsistency between plot(hist(...)) and hist(...)
On Sun, 11 Dec 2005 clausen at econ.upenn.edu wrote:
> Full_Name: Andrew Clausen
> Version: 2.1.0
> OS: Debian GNU/Linux
> Submission from: (NULL) (71.242.192.73)
>
>
> Hi,
>
> When I type
>
> hist(x, freq=F)
>
> I get a density function, as I expect. However, if I type
>
> plot(hist(x, freq=F))
>
> then I get the same output as if I had
2010 Mar 13
2
Is this a bug (or a feature) in hist(x)$density ??
Hi all,
A friend send me a question on why does this:
x<-rpois(100,1)
sum( hist(x)$density )
Gives out "2"
I tried this:
sum( hist(x, freq =T)$density )
It didn't help.
Then he came back with the following insight:
# with breaks
b<-c(0,0.9,1:8)
sum(hist(x,breaks=b)$density) # Much more then 2
# but if we add weights according to the interval length
2009 Jun 04
1
hist returning density larger than 1
The following code is giving me problems. I want to export densities
of a distribution to a csv file. At the bottom of the code I use the
hist function to generate the densities. But hist is returning values
greater than 1. I don't understand, why. Any help you can supply is
greatly appreciated.
# Set word path
dir<-"~/Research/MR Distribution Analysis/"
setwd(dir)
2004 Jun 02
2
a fault in the "hist" - function (PR#6931)
Full_Name: Stephan Schlueter
Version: 1.9.0
OS:
Submission from: (NULL) (217.184.109.24)
During my studies, I found a fault in the hist()-function:
If you have a vector x with values around zero and also bigger than 10,000,000 ,
there will be a shift of -max(x)/10,000,000 in the hist-datas.
See my example:
x<-runif(10000)
hist(x,breaks=c(seq(-3,3,0.1)),prob=TRUE)
#everything ok, but
2004 May 06
1
plot(hist.default(1:10,plot=F)) error.
Hi!
How to find out which plot function is used when i call
plot(hist.default(1:10,plot=F)) and all works fine ?
The reason why I would like to know it is that after loading some self written R functions
> plot(hist.default(1:10,plot=F))
Error in xy.coords(x, y, xlabel, ylabel, log) :
x and y lengths differ
> traceback()
5: stop("x and y lengths differ")
4: xy.coords(x, y,
2004 Mar 29
2
cut and factor
Eric,
thanks for quick reply. at first look I thought it is what I need,
but, unfortunately, it doesn't applied to original data - it
creates new data with loosing original indexes ! I want to keep indexes
of original data, but replace original data with $mids of corresponding
$breaks.
So, if I have z = 1:10, t=hist(z,plot=F)
> z
[1] 1 2 3 4 5 6 7 8 9 10
> t$breaks
[1] 0 2
2023 Aug 06
1
hist(..., log="y")
hist() is designed so that the total area sums to 1. You should build you desired behavior using a barchart.
?
David
Sent from my iPhone
> On Aug 5, 2023, at 11:50 PM, Ott Toomet <otoomet at gmail.com> wrote:
>
> ?Sorry if this topic has been discussed earlier.
>
> Currently, hist(..., log="y") fails with
>
>> hist(rexp(1000, 1), log="y")
2023 Aug 06
2
hist(..., log="y")
Sorry if this topic has been discussed earlier.
Currently, hist(..., log="y") fails with
> hist(rexp(1000, 1), log="y")
Warning messages:
1: In plot.window(xlim, ylim, "", ...) :
nonfinite axis=2 limits [GScale(-inf,2.59218,..); log=TRUE] -- corrected
now
2: In title(main = main, sub = sub, xlab = xlab, ylab = ylab, ...) :
"log" is not a graphical
2001 Oct 04
1
get.hist.quote does not work (PR#1116)
Full_Name: Arto Luoma
Version: 1.3.1
OS: Windows 98
Submission from: (NULL) (153.1.53.119)
Hi!
The function get.hist.quote in the package tseries (Version 0.7-6) does not work
in
my computer.
I found that it uses the function strptime which did not "understand" English
month
names in my Finnish locale (see bug report 811). I changed the regional settings
to
be English (UK) and
1999 Feb 18
1
[Q] use of expression() in plot() vs. hist()
In plot() I can get greek symbols into text items without trouble.
However, some of the same commands don't work as I would expect with
hist(). See the example below.
> plot(1:10, 2:11, xlab=expression(paste("scaled", rho)))
---- works as expected, ie. prints the greek rho
> hist(c(0,0,0,0,4,5,6,6,6,8), xlab=expression(paste("scaled", rho)))
Error: Object
2013 Apr 23
2
Strange graphical pattern when using hist() function
Running the following lines I got a strange plot from hist function:
x<-0:30
hist(x,breaks=31)
As you can see, the 0 value appears two times in the plot.
The Y axis only presents 1 as the highest value when:
hist(x,breaks=62)
Nevertheless, it seems to have two bars between 0 and 1.
Could someone please explain to me why it is happening?
Many thanks in advance!