Displaying 20 results from an estimated 2000 matches similar to: "reorder always returns "ordered""
2010 Nov 11
3
User input after opening graphing device
If I run the following:
> windows()
>
> bringToTop(-1)
>
> interactive()
[1] TRUE
>
> run <- readline(prompt = "Continue (Yes = 1, No = 2):")
Continue (Yes = 1, No = 2):
> dummy <- 1
> run
[1] ""
it does not allow user input though the session is interactive (it jumps right over the readline command).
It would be great
2010 Oct 02
1
Memory allocation in 64 bit R
Hi Everyone,
I am getting the following error message
Error: cannot allocate vector of size 2.6 Gb
In addition: Warning messages:
1: In dim(res$res) = dim(bi) :
Reached total allocation of 8122Mb: see help(memory.size)
2: In dim(res$res) = dim(bi) :
Reached total allocation of 8122Mb: see help(memory.size)
3: In dim(res$res) = dim(bi) :
Reached total allocation of 8122Mb: see
2011 Apr 27
1
ctree and survival problem
Dear all,
I was intrigued by the ctree command and wanted to check it out. I first ran the demo with example(ctree) and did get the survival graphs in the end. Upon doing this with my own data and yielding a "Invalid operation on a survival time" I tried to rerun example(ctree) and now I also get "Invalid operation on a survival time" after the example runs plot(GBSG2ct)...
2010 Oct 12
1
Help with STL function to decompose
Hi everyone.
I'm having some troubles with STL function to decompose some data.
My issue is that I have monthly data from September 2005 up to August 2010
i. e. 60 observations.
I define it in the following way:
*u<-read.csv("C:/CELEBREX.csv",header = TRUE)
u.ts<-ts(u, start=c(2005,9), frequency=12)
*
The issue is that when I try to use
stl(u.ts, 'per')
Then the
2010 Jun 08
2
duplicated() and unique() problems
Hi everybody
I have found something (for me at least) strange with duplicated(). I will
first provide a replicable example of a certain kind of behaviour that I
find odd and then give a sample of unexpected results from my own data. I
hope someone can help me understand this.
Consider the following
# this works as expected
ex=sample(1:20, replace=TRUE)
ex
duplicated(ex)
ex=sort(ex)
ex
2011 Jan 09
1
Rectangle height in lattice xyplot key
Dear All
I have a problem with the height of the boxes in the key in the following.
(The text is over 2 lines to accentuate the problem of no space
between the rectangles.)
Is there an easy way to put a space between the rectangles; size
controls the width but there appears to be nothing for the height?
xyplot(1~1,
key = list(corner = c(0.8,0.8),
2011 Mar 14
1
Math characters in column heading using latex() in Hmisc
Hi Everybody
I want to print a latex table containing math characters in the column
heading
These are the formulae I want to use as column headings. It prints OK from
TeX
$\sum_{i}\sum_{j}C_{P,i,j,y}\times\mathit{FC}_{i}$, $XU_{alt,y}$, $n$,
$\bar{C}_{P,y}$
My plan was to create a character vector with these and later rbind the
values to them. When I create the vector like:
2010 Nov 20
1
Grid newbie: aligning & scaling viewports
Oh Knowledgeable Ones:
I'm working on a project using grid graphics (for the first time). A toy
example is given below, run it simply with >foobar() I am wondering why the
pink dot and concentric circles are not centered on the 3-color axis system.
Further, I feel like the concentric circles don't have the intended radius -
if my math is right, the outmost circle should touch the
2010 Nov 29
3
Replacing several rows of a matrix at once
Hello Folks. This must be a silly question with a (not) obvious (to me)
answer.
Consider this:
tmp <- matrix(1:200, nrow = 20)
vec <- 300:309
tmp[9,] <- vec # replacing one row works fine
p <- c(3, 11, 17)
tmp[p,] <- vec
# replacing multple rows pastes the values down a column and recycles vec.
What I want to do is replace multiple rows simultaneously at once. I
suppose I can
2010 Nov 01
2
write.csv changes the format of the date
Dear Group,
Why does write.csv modify the date format when it write to a file.
I have the following variable Param_Dat:
dput(Param_Dat)
structure(list(Last_Successful_Run = structure(1L, .Label = "30/10/2010",
class = "factor")), .Names = "Last_Successful_Run", class = "data.frame",
row.names = c(NA,
-1L))
When I do:
2010 Aug 27
3
Sorting groups in bwplot chart
Hi all,
I am just curious how to sort the groups in a categorical box plot chart
bwplot
here is the example:
d<-data.frame(sample(rep(month.abb,20), 100), runif(100,1,10));
colnames(d) <- c("Month", "Value");
bwplot(d$Month ~ d$Value);
as you can see Months are not sorted alphabetically. Does anybody know ho to
sort those on the chart level?
Thank you
Jan
2010 Sep 14
4
Problems with "pdf" device using "plot" "glht" function on "multcomp" library.
Hi R users:
I have de following data frame (called "Sx")
Descripcion Nitratos
Cont85g 72.40
Cont85g 100.50
Cont85g 138.30
Cont80g 178.33
Cont80g 79.01
Cont80g 74.16
Cont75g 23.70
Cont75g 15.80
Cont75g 16.20
Patron80g
2011 Feb 22
2
Plotting a functional time series
Hello,
I'm willing to plot a sequence of densities on a 3d graph, something like
-----------------------------------------------------------------
x <- sapply(1:10, function(i)rnorm(1000))
f <- sapply(1:10, function(i)density(x[,i], from=-5,to=5)$y)
grid <- density(x[,1], from=-5,to=5)$x
win.graph()
persp(grid1, 1:10, f,theta=-50, phi=30, d=2)
2011 Mar 14
1
hclust() memory issue
Hi, I have a microarray dataset of dimension 25000x30 and try to clustering
using hclust(). But the clustering on the rows failed due to the size:
> y<-hclust(dist(data),method='average')
Error: cannot allocate vector of size 1.9 Gb
I tried to increase the memory using memory.limit(size=3000), still got the same
error.
I also tried agnes() from cluster package and pvclust() from
2011 Jan 18
2
ggplot2, geom_hline and facet_grid
Hi
I have a long data set on which I want to do Bland-Altman style plots for each rhythm type
Using ggplot2, when I use geom_hline with facet_grid I get an extra set of empty panels.
I can't get it to do it with the "Diamonds" data supplied with the package so here is a (much abbreviated) example:
> lvexs
cvd_basestudy ecd_rhythm fixed_time variable_time
1 CBP05J02
2010 Aug 03
2
Specifying interactions in rms package... error
I am encountering an error I do not know how to debug. The error arises
when I try to add an interaction term involving two continuous
variables (defined using rcs functions) to an existing (and working) model.
The new model reads:
model5 <- lrm( B_fainting ~ gender+ rcs(exactage, 7) +
rcs(DW_nadler_bv, 7) + rcs(drawtimefrom8am, 7)+ DW_firsttime+
DW_race_eth +
2011 Feb 19
1
Building an array from matrix blocks
Hello,
I've googled for a while and couldn't find anything on this topic: say
I have a matrix A and want to build matrices B1, B2,... using blocks
from A (or equivalently an array B with B[,,i] being a block from A),
and that I must sum the B[,,i]'s.
I've come up with this rather non-elegant code:
> n = 6
> p = 3
>
> A <- matrix(1:(n^2), n, n, byrow=TRUE)
>
2011 Mar 01
2
can't open Cairo device
Dear list,
in R under wheezy the following error occurs:
> library(cairoDevice)
> Cairo()
Error in Cairo() : Graphics API version mismatch
It seems to be Debian-specific, as I tried the same under OpenSUSE 11.3
and it worked.
I tried installing cairoDevice via `apt-get install r-cran-cairodevice'
and with `install.packages("cairoDevice")' in R (without any
2010 Jul 01
0
Cholmod warning when fitting a poisson GLMM
Hi,
I am getting a warning message when I am fitting a generalized mixed model (mod_2) and I don't understand why because when I add just an interaction factor the model works perfectly (mod_1).
Does anyone know what it happpens ?
Thanks,
Aïda
> mod_1<-lmer(sur15~soeviv15_4plus+frviv15_4plus+frat_15death+dad_class_new+soeviv15_4plus:dad_class_new +frviv15_4plus:dad_class_new+
2011 May 12
2
Change font size in Windows
My day for dumb questions. How do I increase the type size in the Rgui console in Windows? (R-2.13.0, Windows 7)
It looked to me that I just needed to change the font spec in Rconsole but that does not seem to be working.
The R FAQ for Windows has a reference in Q3.4 to changing fonts, (Q5.2), but I don't see anything relevant there.
Rconsole originally was:
font = TT Courier New
points =