Displaying 20 results from an estimated 10000 matches similar to: "n=1 default for random number generators"
2008 Dec 23
1
Borders for rectangles in lattice plot key
Hopefully an easy question. When drawing a rectangles in a lattice plot
key, how do you omit the black borders?
Here is an example adapted from one on the xyplot help page:
bar.cols <- c("red", "blue")
key.list <- list(
space="top",
rectangles=list(col=bar.cols),
text=list(c("foo", "bar"))
)
barchart(
yield ~ variety | site,
2006 Oct 31
5
Odd behaviour of removing 'nothing' from an array or data frame
I've just found some behaviour which strikes me as odd, but I'm not sure
whether it's a bug or a feature. If you don't mind, I'd like to explain
via a couple of examples.
Let x = 1:10.
Then intuitively, to me at least, the command x[-integer(0)] should leave
x untouched. However the actual output under R2.4.0 is integer(0).
A slightly more involved example demonstrates
2009 Jan 09
1
Saving plots as byte streams
Is it possible to save plots as byte streams? For example, if I want the
bytes for a PNG plot, I could use
#Write the plot to a PNG file
png("test.png")
plot(1:10)
dev.off()
#Read the bytes back in from the file
plotbytes <- readBin("test.png", "raw", n=2000)
Ideally, I'd like to avoid having to bother writing to the file in the
first place, and simply
2007 Dec 19
1
Different labels by panel in barchart
Dear all,
I'm analysing a survey, and creating a barchart of the different responses
for each question. The questions are grouped according to a number of
categories, so I'm using lattice to create a plot with each question in a
category on it. The problem is that the response set for different
questions within the same category varies. I want to be able to draw only
the relevant
2009 Jan 12
2
R2WinBUGS stopping execution
Apologies if this isn't acceptable for the general help list.
I'm running OpenBUGS model via the R2WinBUGS package interface, under
Windows. Is it possible to terminate running models, short of using the
Windows Task Manager to forcibly exit the program?
Regards,
Richie.
Mathematical Sciences Unit
HSL
------------------------------------------------------------------------
2008 May 06
1
Spacing between lattice panels
I'm trying to set up a lattice plot with two y-axes for each panel. (Yes,
I know that multiple y-axes are generally a bad idea; the graph is for
someone else and they want it that way.) I've used a custom
yscale.component in xyplot to achieve this:
myyscale.component <- function(...)
{
ans <- yscale.components.default(...)
ans$right <- ans$left
foo <-
2008 Apr 28
5
Combine Values into a Vector or List
Hi all,
I have the following
x1<-paste("A", 1:6, sep = "")
x2<- round(rgamma(6,2,1))
x3<-paste("B", 1:6, sep = "")
x4<- round(rgamma(6,2,1))
data1 <- data.frame(x1,x2,x3,x4)
I would like to get
data2 <- c(A1=4, A2=1, A3=0,...)
Is there any standard for such a case?
Thank you very much in advance,
Diego
2008 Oct 17
1
Using key.opts in Ecdf/labcurve (Hmisc package)
I'm presumably missing something very obvious, but how does one use the
key.opts argument in labcurve (via Ecdf)?
In this example, I want the key to be big and have a blue background, but
it isn't and doesn't.
ch <- rnorm(1000, 200, 40)
sex <- factor(sample(c('female','male'), 1000, TRUE))
Ecdf(~ch, group=sex, label.curves=list(keys=c("f",
2007 Dec 06
2
Any package for deconvolution?
I want to run deconvolution of a time series by an impulse or point-spread function through Wiener filter, regularized filter, Lucy-Richardson method, or any other approaches. I searched the CRAN website and the mailing list archive, but could not find any package for such a deconvolution analysis. Does anybody know an existing R function for deconvolution?
TIA,
Gang
2008 Sep 18
3
Oja median
Hi,
Can we get the code for calculating Oja median for multivariate data
Thanks and Regards
Rahul Agarwal
Analyst
Equities Quantitative Research
UBS_ISC, Hyderabad
On Net: 19 533 6363
[[alternative HTML version deleted]]
2008 Jan 14
3
%s in filename when opening device causes crash (PR#10571)
Full_Name: Richard Cotton
Version: 2.6.1
OS: Windows XP (32bit)
Submission from: (NULL) (193.119.236.82)
Using %s in a filename when opening a device causes R to crash, e.g.,
pdf("foo%s.pdf")
win.metafile("foo%s.wmf")
postscript("foo%s.ps")
2008 Aug 26
2
String search: Return "closest" match
Hi,
I have to match names where names can be recorded with errors or additions.
Now I am searching for a string search function which returns always the "closest" match. E.g. searching for "Washington" it should return only Washington but not Washington, D.C. But it also could be that the list contains only "Hamburg" but the record I am searching for is
2008 Sep 04
2
Projecting Survival Curve into the Future
Hello,
I have a survivor curve that shows account cancellations during the past 3.5 months. Fortunately for our business, but unfortunately for my analysis, the survivor curve doesn't yet pass through 50%. Is there a safe way to extend the survivor curve and estimate at what time we'll hit 50%?
We started a new program 3.5 months ago, and I believe that this set of accounts behaves
2008 Jan 17
4
aaMI
hi
i am new to R language. I want to use aaMI package which calculates the
amino acid mutual interaction for a given protein sequence. I had installed
the package but when i run the program it gives me the error could not find
function "aaMI". can anyone tell me what might be the problem..
--
View this message in context: http://www.nabble.com/aaMI-tp14915744p14915744.html
Sent from
2008 Sep 26
2
adjusting textsize and spacing in mosaic (vcd package)
I'm trying to find a way to change the font size in a mosaic plot (the
grid version, not the base graphics one).
Here's an example to demonstrate:
#Basic plot
library(vcd)
mosaic(HairEyeColor, shade = TRUE)
#Bad first guess: this stops the default cell colouring, and doesn't
change the font size
mosaic(HairEyeColor, shade = TRUE, gp=gpar(fontsize=16))
#This successfully changes
2008 Sep 05
1
controlling lattice plot ticks with relation="free"
How do you persuade lattice to draw tick marks on both the left and right
side of the y-axis, when relation="free" in the scales component?
#Ticks appear on both sides
histogram(~height|voice.part, data=singer)
##Ticks only on left
histogram(~height|voice.part, data=singer,
scales=list(y=list(relation="free")))
Providing tck as a vector of length 2 doesn't seem to
2017 May 30
2
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
>>>>> Serguei Sokol <sokol at insa-toulouse.fr>
>>>>> on Mon, 29 May 2017 15:28:12 +0200 writes:
> Sorry, I have seen it too late that we had different tab
> width in the original file and my editor. Here is the
> patch with all white spaces instead of mixing tabs and
> white spaces.
thank you - it still gives quite a few
2008 Mar 05
4
Excel export into R
Hello,
I have this in excel
Control
543_BU
123_AT
432_CU
I want to be able to import to R so that it will read like this
c<-c("543_BU","123_AT","432_CU")
output:
[1] "543_BU" "123_AT" "432_CU"
This is just a short version. I have about 200000 rows and i need a simpler
way instead of typing each one.
thanks
--
View this message
2009 May 07
2
Show name of dataset in graph
Hi,
I?ve written a script to run several multivariate statistical analysis
automatically.
As one result a biplot and screeplot is produced.
Now I?d like to display the name of the inputdatset as part of the title of
these graphics and I do not want to enter it each time I run the script.
How can I extract the name of a dataset?
An (shortened) extraction from the script:
>Test1 <-
2008 Feb 18
2
Number of digits of a value for problem 7.31 RFAQ
Hello dear R users!
I did not find a function which gives information about the number of
digits of a value shown by R.
Do you know one?
I need it to solve the problem (see RFAQ 7.31)that 0.2==0.2+0.1-0.1 FALSE
The solution suggested in RFAQ is to use isTRUE(all.equal(0.2,0.2+0.1-0.1))
But if I want to compare inequality:
0.2<=0.2 +0.1-0.1 TRUE
but 0.2<=0.2 +0.1-0.1 FALSE
bad!
but in