Displaying 11 results from an estimated 11 matches for "plotb".
Did you mean:
plot
2007 Oct 07
1
Arguments to "personalised" plot()
...Folks,
I'm curious for an explanation of the following -- it's a
matter of trying to understand how R parses it.
I've written sundry little "helper" variants of functions,
in particular plot(), to save repetitively typing the same
options over and over again.
For example:
plotb <- function(x,...){plot(x,pch="+",col="blue",...)}
This does exactly what you'd expect it to do when fed with
a vector of values to plot, e.g.
plotb(cos(0.01*2*pi*(0:100)))
namely a plot of the values of cos(..) with x-coordinates
marked 0, 20, 40, 60, 80, 100, as bl...
2012 Apr 13
2
Can't read a binary file
...ng:
nlayx = nx*ny*4
do iz=1,nz,4
read(binary file) var(1:nlayx)
enddo
nrest=mod(nx*ny*nz,nlayx)
read(binary file) var(1:nrest)"
The first value in the file should be 0.05, and all of the data values are real. Here is what I get (with similar answers using double):
> v<-readBin("plotb.251", numeric(), size=4, n=1)
> v
[1] 1.614296e-39
> v<-readBin("plotb.251", numeric(), size=4, n=1, endian="swap")
> v
[1] 1.359775e-38
Platform is Intel Linux. How can I read the file described above?
Thanks,
Scott Waichler, PhD
Hydrology Group, Energy &am...
2010 Aug 27
2
Nestad ANOVA with random Factors
...54 420 6.775895 0.0000
areaarea10 -1.2073539 0.5242788 0 -2.302885 NaN
areaarea2 -0.3062031 0.5242788 0 -0.584046 NaN
areaarea4 -0.6109334 0.5242788 0 -1.165283 NaN
areaarea6 -0.9808034 0.5242788 0 -1.870767 NaN
areaarea8 -1.3437982 0.5242788 0 -2.563136 NaN
plotb -0.0899366 0.1680473 20 -0.535187 0.5984
plotc 0.0257024 0.1680473 20 0.152947 0.8800
plotd 0.0420734 0.1680473 20 0.250366 0.8049
plote -0.2375628 0.1680473 20 -1.413666 0.1728
Correlation:
(Intr) arer10 arear2 arear4 arear6 arear8 plotb plotc plo...
2012 Aug 07
1
how to write out a tree file with bootstrap from phangorn package
Dear R-helpers and Klaus,
I would like to know how to write out a tree file with bootstrap from
phangorn package. That tree file could be in newick format or others.
I am new for phylogenetic operation in R. Could you please give me any
directions on that? Thanks in advance.
Best wishes,
Jian-Feng,
########
# as a example
# I accomplished 1000 bootstrap simulation on a fit object (a maximum
2008 Sep 08
1
Beginner graphics device questions.
...s not contain %d then every plot will essentially overwrite the previous plot. So I think I can see how to get 'plot1.bmp', 'plot2.bmp', etc. What if I want a finer control over the name of the graphics file? What if I want to specify a name? Something like 'plotA.bmp', 'plotB.bmp', etc. ? Would I essentially have to call 'png' (or 'bmp' etc.) with a file name and then call dev.off?
Thank you.
Kevin
2010 Jul 25
1
Manage several graphical devices in interactive mode
Dear R-users,
Does anybody know a good way to create and use several graphical devices at
the same time in interactive mode? Ideally, I'd like to open 2 to 3 devices
and assign names to them. This way, I could make any
addition/modification/update to a particular device using its name.
I did not see anything like a name argument in ?X11. Is there an
alternative?
Thanks in advance for your
2012 Mar 13
1
3D Black-Scholes Graph Help!
...lackscholes <- function(s, k, r=.1, t=5, sigma=.9,call=TRUE) {
#calculate call/put option
d1 <- (log(s/k)+(r+sigma^2/2)*t)/(sigma*sqrt(t))
d2 <- d1 - sigma * sqrt(t)
ifelse(call==TRUE,s*pnorm(d1) - k*exp(-r*t)*pnorm(d2),k*exp(-r*t)
* pnorm(-d2) - s*pnorm(-d1))
}
plotbs <- function(price){
#create
s<-seq(0,price,len=price/2)
k<-s
t<-0:5
sigma<-seq(0,0.9,by=.1)
#expand information
OptionPrice<-matrix(nrow=length(s),ncol=length(k))
for(i in 1:length(s)) OptionPrice[i,]<-mapply(blackscholes,s[i],k)...
2005 May 31
2
Problem going back to a viewport with gridBase
I am setting up base plots -- one in viewport A and and one in B. This part
works fine. But if I go back to A after having done B and add
horizontal lines it seems
to not use the correct coordinates. How do I tell it to resume using A's
coordinates? I am already using par(fig = gridFIG()) but it seems that that's
not enough to reestablish them. What happens is that when I go back to
2005 May 31
2
Problem going back to a viewport with gridBase
I am setting up base plots -- one in viewport A and and one in B. This part
works fine. But if I go back to A after having done B and add
horizontal lines it seems
to not use the correct coordinates. How do I tell it to resume using A's
coordinates? I am already using par(fig = gridFIG()) but it seems that that's
not enough to reestablish them. What happens is that when I go back to
2010 Jun 30
1
Why the variation when creating .pdf file output for my plots?
...alled and in the Path such that C:\gswin32c.exe runs said
program.
All shared insights appreciated!
Karl
Method 1:
In the R graphics device window, form the menu File>Save As>PDF
-yields a .pdf file of 700Kb (in this plot example)
Method 2:
> dev2bitmap(file="expression.density.plotb.pdf", type = "pdfwrite",
> method = "pdf")
> dev.off()
-yields a .pdf file of 300kb (same plot example) indistinguiashble (on
the screen atleast) from method 1.
Method 3:
> pdf(file="my_plot.pdf", paper="a4")
> dev.off()
-yields a .pd...
2004 Oct 26
1
Newbie question about the use of lm and anova
...ls:
Min 1Q Median 3Q Max
-16.423623 -4.778514 0.006824 4.555770 17.196949
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 99.1750 1.6349 60.661 <2e-16 ***
ParentMutant 1.5394 1.5821 0.973 0.333
PlotB -0.2747 1.6942 -0.162 0.872
PlotC -0.3042 1.6603 -0.183 0.855
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
Residual standard error: 6.795 on 92 degrees of freedom
Multiple R-Squared: 0.01084, Adjusted R-squared:...