Displaying 20 results from an estimated 20000 matches similar to: "edit/environment bug??"
2005 Feb 21
4
rnorm??
I am wondering whether there is a bug in rnorm.
When generating rnorm(1000000) and counting
the cases > 4 and the cases < (-4) I get rather
unexpectedly low counts for the latter. The problem goes away
when using qnorm(runif(1000000)).
Fritz Scholz, PhD
Applied Statistics Group
Boeing Phantom Works
fritz.scholz at pss.boeing.com
425-865-3623
Tu/We 206-542-6545 (most likely)
2009 Nov 17
1
Plotting graphs using FOR loop
I have the following codes but can anyone make it shorter i.e making these
FOR loop into one loop ...
thanks...
par(mfrow=c(2,4))
for(i in 16:23){
hist(data[,i],main=paste(colnames(data)[i],sep=""),ylab="Frequency",xlim=c(1,5),xlab="Score",ylim=c(0,100))
}
png("histogram.png")
dev.off()
par(mfrow=c(2,4))
for(i in
2009 Jan 07
2
can the pdf output page break be controlled manually?
I would like to control where to make a page break in my pdf file.
The following code renders three pages of output. But I would like to be
able to control the page breaks.
pdf(file="test.pdf", paper="a4")
par(mfrow=c(2,2))
hist(rnorm(100))
hist(rnorm(100))
hist(rnorm(100))
plot.new()
par(mfrow=c(1,1))
hist(rnorm(100))
hist(rnorm(100))
dev.off()
It
2012 Mar 13
1
size of graphs when using multiple figures by row
Hi all,
I have a basic question concerning graphs in R. I?m using the par()
function and I?m working with multiple figures by row (mfrow) but my the
hight of my figures become compressed. I have 4 rows and 2 columns (because
I want to plot 8 histograms (freq = FALSE ) on it. I know I can adapt my
margins with for example ?oma? and ?mai? but I don?t know how to choose the
size of the figure? I
2009 Nov 24
4
Graphic Device - View/get all graphics
Hi Listers,
I am producing some graphics that the commands are in a FUNCTION...
The problem is that I end up viewing just last graphic and in my FUNCTION
there are 4 graphics with the PAR command function... Like those below...
How do I view/get the other 3 graphics? Any help?
Thanks in advance...
histogram<-par(mfrow=c(1,2))
hist(rw_mean_app,main='Bootstrap Method
2010 Nov 10
1
par mfrow in "function" problem
Hi all,
I defined the following
#############################
myhist=function(x){
hist(x,xlab="",main="")
h=hist(x)
xfit=seq(min(x),max(x),length=100)
yfit=dnorm(xfit,mean(x),sd=sd(x))
yfit=yfit*diff(h$mids[1:2])*length(x)
lines(xfit, yfit, col="blue", lwd=2)
}
#############################
individually, it worked fine
however, if I used
par(mfrow=c(2,2))
2005 Sep 20
2
why this postscript didn't work?
Hi, List,
I used the following codes to generate ps plots but foo.ps contains
nothing. Would someone please point out what is wrong with my codes?
Thanks a million!
postscript('foo.ps')
par(mfrow=c(2,1))
par(mfg=c(1,1))
hist(rnorm(100),col='blue')
par(mfrow=c(2,2))
par(mfg=c(2,1))
hist(rnorm(50),col='blue')
par(mfg=c(2,2))
hist(rnorm(60),col='blue')
dev.off()
2013 May 27
1
Plot histograms in a loop
Hi,
Try either:
set.seed(28)
stats1<- as.data.frame(matrix(rnorm(5*10000),ncol=5))
pdf(paste("test",1,".pdf",sep=""))
par(mfrow=c(2,1))
lst1<- lapply(names(stats1),function(i) {hist(stats1[,i],100,col="lightblue",main=paste0("Histogram of ",i),xlab=i );qqnorm(stats1[,i])})
dev.off()
#or
2010 Feb 11
1
histogam plots
Hi all,
I want to draw a histgram for each row of a matrix and compare them.
However the plot I
got does not have the same y range and x range, which makes it difficult to
make the comparison.
Is there a easy way to fix the x range and y range in a xy plot for several
plots, instead of specifying
them for each plot.
The following is my code for generalizing the matrix and draw the
histogram.
1998 Jan 20
1
R-beta: questions and comments
Let me first tell you that you and your cohorts are
doing a great service to the statistical community
with R. I have been working with Rseptbeta under
Win95 and I am very impressed with its capabilities.
I thought I give you some feedback gained from
my limited playing with R.
Fritz Scholz
fritz.scholz at boeing.com
=============================================================
When
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
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
2004 May 13
2
tapply & hist
I'm learning how to use tapply.
Now I'm having a go at the following code in which dati contains almost 600
lines, Pot - numeric - are the capacities of power plants and SGruppo - text
- the corresponding six technologies ("CCC", "CIC","TGC", "CSC","CPC", "TE").
.....................................................
2010 Aug 23
1
Plotting multiple histograms on same panel
Hey everyone,
So i cant figure this out. when using histogram() from lattice instead
of hist() i get what i want as far as output. But using histogram i can
seem to be able to figure out how to get multiple plots on the same panel.
So
par(mfrow=c(3,2))
for (i in 1:20) hist(rnorm(100),main="",cex.axis=.8)
gets me about what i want but i want to use histogram() cause it gives
2011 May 26
1
Plotting device does not show all graphs
Dear All,
I am creating 4 plots (files) but I could see only 3. Here is a simple code
d=data.frame(age=rnorm(100,40,8),ht=rnorm(100,170,15))
tiff(file=paste("test","%03d",".tif",sep=""))
hist.data.frame(d)
datadensity(d)
par(mfrow=c(1,2),mar=c(3,3,3,3))
boxplot(d$age)
hist(age)
dev.off()
PDF works fine but png and tiff seems to miss the second
2007 Apr 13
3
labels cut partially on hist
Dear List,
I have the following function where I plot on one page a histogram and a boxplot.
I use option labels = TRUE in hist to show labels. However the label on the highest bar in the
histogram is not showing entirely. How can I correct this?
Thanks for any suggestions?
histtst <-
function(n = 100,...){
set.seed(15) # makes rnorm reproducible
par(mfrow = c(2,1))
x <-
2003 Sep 14
1
title for plot contain 4 subplots
Hi,
I'm plotting 4 graphs on one page (2x2 matrix) but I cant seem to get
the title for the whole page right.
I'm doing:
op <- par(mfrow = c(2,2), pty="s")
hist(var$V2, breaks="FD",main="Euclidean Metric", xlab="Sum of 3NN ...
hist(var$V2, breaks="FD",main="Manhattan Metric", xlab="Sum of 3NN ...
hist(var$V2,
2013 Oct 08
3
Latin Hypercube Sample and transformation to uniformly distributed integers or classes
Hi,
I'd like to use Latin Hypercube Sampling (LHC) in the the context of
uncertainty / sensitivity analysis of a complex model with approximately 10
input variables. With the LHC approach I'd like to generate parameter
combinations for my model input variables.
Therefore I came across an simple example here on the mailing list (
2008 Feb 27
2
multiple plots per page using hist and pdf
Hello,
I am puzzled by the behavior of hist() when generating multiple plots
per page on the pdf device. In the following example two pdf files
are generated. The first results in 4 plots on one pdf page as
expected. However, the second, which swaps one of the plot() calls
for hist(), results in a 4 page pdf with one plot per page.
How might I get the histogram with 3 other scatter
2004 Feb 13
4
How to plot a blank plot
Hello everyone,
In plotting several graphics, I'd like to be able to plot a blank plot
as in:
par(mfrow=c(2,1))
plot(BLANK)
hist(rgamma(100000,6463.7,scale=0.015471),xlim=c(0,120),main="Emergence")
I realize screen allows me to do this, but I figure the functionality
must be there. Is there an equivalent to plot(BLANK)?
thanks,
adrian
PS. please reply direct as I'm not