Displaying 20 results from an estimated 2000 matches similar to: "how to change the position of xlab in truehist?"
2007 Mar 20
1
truehist bug?
Hi,
Is this a bug in truehist()?
> library(MASS)
> x <- rep(1, 10)
> truehist(x)
Error in pretty(data, nbins) : invalid 'n' value
Thanks,
Gad
> R.version
platform i486-pc-linux-gnu
arch i486
os linux-gnu
system i486, linux-gnu
status
major 2
minor 4.1
year 2006
month 12
day 18
svn
2007 Mar 20
1
truehist bug?
Hi,
Is this a bug in truehist()?
> library(MASS)
> x <- rep(1, 10)
> truehist(x)
Error in pretty(data, nbins) : invalid 'n' value
Thanks,
Gad
> R.version
platform i486-pc-linux-gnu
arch i486
os linux-gnu
system i486, linux-gnu
status
major 2
minor 4.1
year 2006
month 12
day 18
svn
2007 Nov 18
1
many zeroes in rgamma ... what's going on?
Hello fellow R users,
I wanted to view the density on the standard deviation scale of a gamma(0.001, 0.001) prior for the precision. I did this as seen in the code below and found that for some reason rgamma is giving many values equal to zero, which is strange since a gamma distribution is continuous. What is going on here?
Thanks for any help in advance.
Greg
> x1 <- rgamma(10000,
2003 Apr 18
3
superimposing graphs
Dear People,
I have a data set of data x from a probability distribution, and I have a
function, mydensity, of the pdf of that distribution.
I'm asking for help in superimposing the histogram of x and the plot of
mydensity.
In the function below, I call truehist and curve, but these are plotted in
different figures.
I'd like them to be plotted on the same figure, and to use common
2003 May 03
1
can't plot ylab in graph
Dear People,
I am sure I am missing something obvious as usual, but in the following
graph I can't plot ylab.
Ignoring unimportant details, I am plotting one instance of truehist() and
one instance of curve() on the same graph. Truehist() won't let me pass
the ylab argument. It gives me the error
Error in plot.default(xlim, c(0, ymax), type = "n", xlab = xlab, ylab =
2002 Jan 18
1
New R on Mac user fails to run MASS
My R installation (Mac OS9.2.2) is working, but when I try to run the
examples from Venables & Ripley (p. 6):
R : Copyright 2001, The R Development Core Team
Version 1.4.0 (2001-12-19)
...
> library(MASS)
> x<-rnorm(1000)
> y<-rnorm(1000)
> truehist(c(x,y+3),nbins=25) % Plots nicely
> dd<-con2tr(kde2d(x,y)) % Doesn't complain
> contourplot(z ~ x + y,
2006 Sep 29
2
X-axis labels in histograms drawn by the "truehist" function
Hi,
I have a simple problem that I would appreciate getting some tips. I am
using the "truehist" function within an "apply" call to plot multiple
histograms. I can't figure out how to get truehist to use the column names
of the matrix as the labels for the x-axis of the histograms.
Here is a simple example:
X <- matrix(runif(4000),ncol=4)
colnames(X)
2004 Sep 09
1
man page of hist points to truehist, which can't be viewed without loading a library?
rdevel from yesterday, also in 1.9.1 (Debian, -3).
The man page of 'hist' (from the graphics package, obtained by
"?hist") suggests 'truehist' under "see also", but 'truehist' isn't
loaded by default (a sensible "of course"), so that "?truehist" fails.
One can do help.search(), of course, which points what to do, but
leads to my
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
2009 Apr 28
3
truehist and density plots
Hi,
I wanted to plot the histogram of a vector and then, plot the density function of subsets of the vector on the histogram. So I use truehist in MASS package and lines(density) as follows:
length(b) = 1000
truehist(b)
lines(density(b[1:100]))
however the density plot of the first 100 points exceeds the max of y axis (see attached). how is it possible to make a graphics so that the density plot
2007 Sep 24
2
truehist?
Hello,
After a long time, I needed the truehist function, but my system
couldn't found it. I tried to install the package MAAS, but I couldn't
found it! Something happened?
Carlos
--
+-----------------------------------------------------------+
Carlos Henrique Grohmann - Guano
Visiting Researcher at Kingston University London - UK
Geologist M.Sc - Doctorate Student at
2007 May 25
1
how to mimic plot=F for truehist?
Dear Rologists,
In order to combine plots I need to get access to the some "par"s specific
to my plot prior to replot it with modified parameters. I have not found
any option like "plot=F" associated with truehist and would like to know
whether someone can point out how to overcome this problem.
Thanks, Joh
2002 Apr 09
0
couldn't find function "nclass.fd"
Dear list,
I get the following message while computing truehist in R 1.4.1 on
Redhat Linux 7.1:
> truehist(lsk$Pox, nbins = "FD" , prob = TRUE, xlab = "Pox [mmol/kg]")
Error in switch(casefold(nbins), scott = nclass.scott(data),
"freedman-diaconis" = , :
couldn't find function "nclass.fd"
Maybe the "nclass.fd" should be
2008 Jul 14
2
position of a specific character
Hi All,
I'm wondering whether there is a quick way to know the position of a specific charcater in a long character:
for example
frg="((D:41.04,I:41.04):45.05,(((E:2.32,((G:0.67,J:0.67):0.44,H:1.11):1.21)"
and I would like to know that the 1st, 2nd, 26th, 27th, 28th ... character is "(", is there a quick way to do that?
Thanks!
Hua
2011 Mar 19
2
persuade tabulate function to count NAs in a data frame
Hi,
I'd like to ask you a question again. It is basically about data frames, NAs and tabulate function.
I have this data frame. I already used this in one of the previous questions of mine. It intentionally looks this simple, my real 'df' dataframe is much bigger actually and again, I am not willing to annoy anyone with huge databases... So, my database:
id
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
2009 Jul 20
1
tabulate can accept NA values?
tabulate has
.C("R_tabulate", as.integer(bin), as.integer(length(bin)),
as.integer(nbins), ans = integer(nbins), PACKAGE="base")$ans
The implementation of R_tabulate has
if(x[i] != R_NaInt && x[i] > 0 && x[i] <= *nbin)
and so copes with (silently drops) NA. Perhaps the .C could have
NAOK=TRUE? This is useful in apply'ing tabulate to
2006 Feb 06
2
panel.levelplot() for 2D histograms
Dear R-wizards,
I'm trying to plot "binned scatterplots", or 2d histograms, if you wish, for
a number of groups by using the lattice functionality
it works fine for one group at a time, and probably I could find a
work-around, but I prefer to do it the elegant way
here's an example of what I want, what I tried and where it goes wrong:
require(gregmisc)
require(lattice)
#toy
2002 Mar 23
1
Normal behavior or bug?
>selectiris<-sample(1:5, 150, replace=T)
> hist(selectiris, plot=TRUE) #freq=TRUE, breaks=5, etc all do the same thing
>truehist(selectiris)
Is the behavior of "hist" in this sample of code correct. On my system
(Windows 2K, SP2) the first and second bars are pushed together, while the
3rd, 4th, and 5th bars are correctly positioned.
The function "truehist"
2008 Jul 01
2
ignore warning messages?
Hi All,
I'm working with R and want to ignore the warning messages given, is there a way to stop R from giving out warning messages any more?
an example:
tt = "test"
as.numeric(tt)
would give me the following message:
[1] NA
Warning message:
NAs introduced by coercion
I decide to ignore the warning message for now and don't want it to show any more, can someone help?