?pairs
On Thu, Jun 27, 2013 at 2:48 AM, Meesters, Aesku.Kipp Institute <
meest...@aesku-kipp.com> wrote:
> Hi,
>
> I would like to display inter-parameter scatter plots like those with the
> corrgram package (see upper triangle here:
> http://www.statmethods.net/advgraphs/images/corrgram2.png ),
On Mon, Jun 3, 2013 at 11:37 AM, Simon Zehnder
... [Some not minimal, self contained, reproducible code]...
> Data simulation and thecreation of startpar works fine, but the parameters
> in res$par are always the start parameters. If I run the same commands
> directly on the shell I get in res$
On Wed, May 29, 2013 at 7:57 AM, Stefan Lüdtke wrote:
>
> x=runif(100, 1, 2)
> y=runif(100, 2, 4)
> z=runif(100, 1, 4)
>
> data_xyz=as.data.frame(cbind(x, y, z, a=rep(c(1:10), 10), b=rep(c(1:2),
> each=50)))
>
> custom.panel = function(x, y, z, subscripts, ...)
> {
> highlight=(data_xyz$a == 1)
>
On Tue, May 14, 2013 at 10:05 AM, Michelle Morters
wrote:
> Hi -
>
> I would like the plot ordered by intercept.
>
One way will be to tweak the ?intervals.lmList object
require(nlme)
fm1 <- intervals(lmList(distance ~ age | Subject, Orthodont))
fm2 <- fm1[order(fm1[,2,1]),,]
class(fm2) <- class(
Also combining the code for figures 6.5, 13.8 and 13.9 in the following link
http://lmdvr.r-forge.r-project.org/figures/figures.html
gets you there.
On Fri, Apr 19, 2013 at 8:38 AM, Barry Rowlingson <
b.rowling...@lancaster.ac.uk> wrote:
> On Fri, Apr 19, 2013 at 3:13 PM, Lorenzo Isella
> wrot
Hmmm... is this a (unknown or even a) bug ? Not sure this is what OP was
getting at and I haven't gone through the lattice docs to see if this is
mentioned, but, with unequal sizes the extended formula is not producing
what one (or at least I) might expect:
require(latticeExtra)
set.seed(4321) ;
On Fri, Feb 8, 2013 at 10:14 AM, David Winsemius wrote:
>
> On Feb 8, 2013, at 8:55 AM, ilai wrote:
>
> > Like this ?
> > xyplot(4:5~4:5, groups=4:5, lex = 5 ,
> > par.settings = simpleTheme(cex=10, pch=21, lwd=5),
> > auto.key=TRUE)
> >
>
> And i
Like this ?
xyplot(4:5~4:5, groups=4:5, lex = 5 ,
par.settings = simpleTheme(cex=10, pch=21, lwd=5),
auto.key=TRUE)
On Fri, Feb 8, 2013 at 6:46 AM, Karl Ove Hufthammer wrote:
> Dear list members,
>
> I can't figure out how get 'xyplot' or 'dotplot' in the 'lattice' package
> to respect the 'lw
1) We don't have your previous email and I doubt anyone here committed your
code to memory
2) No offense but this post is still an eye sore. Actually I am guessing
even worse than the first because there is no working example. The idea is
to provide *minimal* code that reproduces the problem - with
On Thu, Jan 31, 2013 at 2:13 PM, Wim Kreinen wrote:
> Hello,
>
> I have a question about modelling via glm.
I think you are way off track. Either the data, glm, or both, are not what
you think they are.
> I have a dataset
skn300.tab <- structure(list(n = 1:97, freq = c(0L, 0L, 0L, 0L, 1L, 7
On Sat, Jan 26, 2013 at 10:26 AM, Tito de Morais Luis <
luis.tito-de-mor...@ird.fr> wrote:
> Hi listers,
>
> I want to make lattice plots xyplots with the indication of legends
> inside each panel with only the points and the lines actually ploted
> inside each given panel according to the group(i
plot(1)
legend('topleft',legend=expression(A,italic(A),bolditalic(A),Delta*italic(D)))
On Wed, Jan 23, 2013 at 9:45 AM, raz wrote:
> Hello,
>
> I'm trying to add a symbol (Delta) to plot legend with text using
> "expression(paste())" but this disables the text.font that allows to use
> bold or i
On Sun, Jan 20, 2013 at 1:59 AM, ronny wrote:
> Hi,
>
> I am using levelplot, and would like remove from each panel (condition) its
> unused x levels.
>
Uneven scales on categorical axes lead to distortion and a miss
representation (as in your example - the area for levels 4,6 in vs1 will be
big
On Wed, Jan 16, 2013 at 12:46 PM, ilai wrote:
Oops... That's
require(latticeExtra)
> c(parallelplot(~ df_n, horizontal.axis = FALSE, scales=list(x = list(log =
> TRUE))) ,
> parallelplot(~ df_n, horizontal.axis = FALSE))
>
or you'll get the full printout of the two o
On Wed, Jan 16, 2013 at 12:05 PM, Patrick Connolly <
p_conno...@slingshot.co.nz> wrote:
> On Mon, 07-Jan-2013 at 10:21PM +1100, Roland Seubert wrote:
>
> |> Hello all,
> |>
> |> I would like to make a parallel coordinate plot with lattice. The
> |> plot should have vertical log scale axes, and sho
str(x) ; str(y) reveals
#zoo series ...
# ..$ : chr [1:3] "a" "c" "b" ## HERE
# Index: Date[1:100], format: "2010-01-01" "2010-01-02" "2010-01-03"
"2010-01-04" ...
#'data.frame':99 obs. of 3 variables:
# $ ID : Factor w/ 3 levels "a","b","c": ## HERE
# ..
On Mon, Jan 7, 2013 at 11:52 AM, David Winsemius wrote:
>
> If you are going that route you may want to look at the gridBase package.
>
> Yes for mixing base and grid graphics but IMHO overkill here. Replacing
the last mtext line with
grid::grid.text('dependent B', 0.985 , 0.5 , rot = 270)
shoul
You could try
require(grid)
trellis.focus()
names(iris)[round(unlist(grid.locator()))]
trellis.unfocus()
cheers
On Tue, Dec 11, 2012 at 11:59 AM, Eric Stone wrote:
> Hi,
> I'd like to be able to generate a splom plot in R and then use my mouse to
> click on one of the sub-panels (panel.pairs,
On Wed, Nov 28, 2012 at 11:37 AM, alexB wrote:
The error was generated by jags not R or R2Jags (wrong list). Regardless,
your problem is the prior loop is only 1:6
>
>
> for (i in 1:6) { b[i] ~ dnorm(0.0, 0.01)
> # b[i] ~ dunif(-20, +20)
>
So the error is literally b[
On Mon, Nov 26, 2012 at 5:33 AM, Florian Weiler wrote:
> Dear all,
>
> I am using the book "Generalized Linera Models and Extension" by Hardin and
> Hilbe (second edition, 2007) at the moment. The authors suggest that
> instead of OLS models, "the log link is generally used for response data
> th
Specifying n >1 chains is not enough. You need some parallel backend. You
can use snow/snowfall or doMC (these are R libraries) for example. Maybe
others, google is your friend. Word of caution about doMC (maybe also
snowfall, never tested it), you might need to specify RNG (seed, sampler)
for each
On Mon, Nov 19, 2012 at 5:42 AM, AnjaM wrote:
> Using the mtcars dataset, how to define the grouping variable to be valid
> only for the upper or lower panel?
>
> The following doesn't work:
>
> # Code start
>
>
Almost :
splom(~data.frame(mpg, disp, hp, drat, wt, qsec),
> data=mtcars, psca
Errr... You could reshape to a long format data.frame but an arguably
easier way:
dimnames(array.3d) <- list(lat= 1:7 , long = 1:11 , lev = 1:5) # not needed
just for clarity
levelplot(array.3d)
On Sat, Nov 17, 2012 at 9:36 PM, Tom Roche wrote:
>
> summary: how to convert a 3D array (as obtaine
On Fri, Nov 16, 2012 at 2:42 PM, Khan, Sohail wrote:
> Thanks. But aggregate will work on rows or columns. I need to calculate
> mean for subsets of rows in a matrix
> I.E.
>
> Indx x1 x2 x3 x4 x5 x6 x7 x8 x9
> 1 25 30 15 8 12
dotplot(variety ~ yield | year+ site, barley,
strip = function(...,which.given,factor.levels) {
if(which.given==2){
strip.default(which.given,factor.levels=substr(levels(barley$site), 1,
1),style=4,...)
}
else{
strip.default(which.given=which.given,factor.levels=factor.levels,s
On Thu, Nov 8, 2012 at 12:14 PM, Rui Barradas wrote:
> Hello,
>
> If I understand it right, you can use the arrows() function with an angle
> of 90 to get ci bars.
> Using your data example, but with made up standard errors,
>
>
> a=c(10,15)
> b=c(20,24)
> c=c(21,23)
>
> hei=cbind(a,b,c)
>
> # St
On Fri, Oct 19, 2012 at 6:28 PM, Ali Tofigh wrote:
> On Wed, Oct 17, 2012 at 4:08 PM, ilai wrote:
> > On Wed, Oct 17, 2012 at 11:10 AM, Ali Tofigh
> wrote:
>
> ## this works as intended with a mix of plot.new() and grid.newpage
> pdf("test3.pdf")
> p
On Wed, Oct 17, 2012 at 11:10 AM, Ali Tofigh wrote:
> my problem is that I usually have no choice but to mix grid and base
> graphics.
What does that have to do with the answer you got ? did you even try it ?
here it is (again) but this time mixing base+grid:
require(gridBase)
pdf("test.pdf")
On Wed, Oct 10, 2012 at 4:56 AM, Pierrick Bruneau wrote:
> With the following code :
>
> dat1 <- matrix(nrow=4, ncol=2)
> dat1[1,] <- c(-2, 1)
> dat1[2,] <- c(-1.7, 0.9)
> dat1[3,] <- c(0.1, 0.6)
> dat1[4,] <- c(0.5, 0.5)
> theplot <- xyplot(V2 ~ V1, as.data.frame(dat1), pch=c(4,1,5,4))
> plot(the
On Wed, Oct 10, 2012 at 4:56 AM, Pierrick Bruneau wrote:
> With the following code :
>
> dat1 <- matrix(nrow=4, ncol=2)
> dat1[1,] <- c(-2, 1)
> dat1[2,] <- c(-1.7, 0.9)
> dat1[3,] <- c(0.1, 0.6)
> dat1[4,] <- c(0.5, 0.5)
> theplot <- xyplot(V2 ~ V1, as.data.frame(dat1), pch=c(4,1,5,4))
> plot(the
On Tue, Oct 9, 2012 at 1:26 PM, Ali Tofigh wrote:
> Hi,
>
> when using the grid package, I've come across this weird behaviour
>
> pdf("test.pdf"); plot.new(); grid.rect(gp = gpar(fill="blue"));
> plot.new(); grid.rect(gp = gpar(fill="blue")); dev.off()
>
> The first page is filled completely wi
actually a matrix put in as a single variable in the data.frame". Personal
preference maybe but that never made sense to me in the data frame
construct (even if it is just a list).
Cheers
> > str(by.list)
>
> might help here.
>
> -- Bert
>
> On Tue, Oct 9, 2012 at 11:1
On Tue, Oct 9, 2012 at 11:42 AM, Rui Barradas wrote:
> Hello,
>
> Try
>
> do.call(data.frame, by.list)
>
>
I don't think data.frame inside do.call works in this context. May need it
on the outside to do the job (Only OK here since there is no mixture of
numeric and character/factors in this summa
How about
require(coda)
data(line)
str(line)
cline <- as.mcmc(do.call(rbind,line))
str(cline)
# Thus
HPDinterval(cline) # (or any FUN.mcmc)
sum(cline[,'alpha'] >= median(cline[,'alpha']))/nrow(cline)
Cheers
On Thu, Oct 4, 2012 at 12:22 PM, NORRIS Paul wrote:
> Dear all,
>
> I'm not 100% sure
On Sat, Sep 29, 2012 at 7:32 AM, ilai wrote:
> On Fri, Sep 28, 2012 at 11:03 PM, Elaine Kuo wrote:
>
>> Hello
>>
>> Thanks again.
>>
>> I got the attached graph
>> Unsure why the color is still inconsistent.
>> Please kindly share with your R
gt; "Insectivore_t", "Insectivore_w", "Insectivore_a",
> "Molluscivore", "Crustacean feeder", "Omnivore")
>
> Please kindly help how to make the levels vertical instead of horizontal.
>
> Elaine
>
&g
On Fri, Sep 28, 2012 at 6:57 AM, Richard M. Heiberger wrote:
> Elaine,
>
> For panel.bwplot you see that the central dot and the outlier dots are
> controlled by
> the same pch argument.
??? I don't think so...
bwplot(rgamma(20,.1,1)~gl(2,10), pch=rep(17,2),
panel = lattice::panel.bwplot)
I th
On Wed, Sep 26, 2012 at 3:11 PM, RCar wrote:
> All,
> Relatively new R user so this is probably an easy question to answer.
> I am able to generate a cluster for my dataset using hclust() then ploting
> the data with plot().
> This results in an image with a dendrogram with my sample names along t
You want array not list, as in
levelplot(array(rnorm(400,rep(1:4,each=100)),c(10,10,4)))
abind::abind is useful sometimes for binding preexisting matrices to
arrays.
Cheers
On Sun, Aug 26, 2012 at 5:57 AM, Jens Peter Andersen / Region Nordjylland <
je...@rn.dk> wrote:
> Dear R-users,
>
> My g
?model.matrix
On Fri, Jul 27, 2012 at 11:32 AM, xuan zhao wrote:
> Hi All,
> I want to turn a categorical array (array with factors) into a matrix with
> dummy variables. like array=c(a,a,b,b,b) should be turned into:
> a b
> 1 0
> 1 0
> 0 1
> 0 1
> 0 1
> Do you know any way of doing this?
> Tha
Maybe I'm missing something too but from your example seems like you are
looking for
xyplot(rnorm(12) ~ 1:12 , type="l",
scales=list(x=list(at=seq(2,12,2),labels=c(1, ' ', 3 , ' ' , 5 , ' ' ))),
par.settings=list(axis.components=list(bottom=list(tck=c(0,1)
See "scales" in ?xyplot and str(trel
,2,4),breaks=seq(0,1,.1),plot=F)$counts,
hist(rbeta(30,6,8),breaks=seq(0,1,.1),plot=F)$counts),
beside=T)
see str(hist(yourdata)) or ?hist
Cheers
Ilai
> John Kane
> Kingston ON Canada
>
>
> > -Original Message-
> > From: mb...@sun.ac.za
> > Sent: Tu
On Sat, Jun 16, 2012 at 2:11 AM, Stephen Eglen wrote:
> R does a great job with the fine details regarding plots. e.g in the
> following:
>
> library(lattice)
> y <- -4:4/10
> xyplot(y~1, las=1)
>
>
No. las is a parameter in base graphics ?par. It was simply ignored here:
xyplot(y~1,scales=list(
Untested because I don't have (use) winbugs and you didn't provide dat*.
But consider
a <- 4 ; f <- 6
list('a','f')
list(a,f)
list(a=a,f=f)
My guess is you wanted sp.data to be a named list, not a list of names...
HTH
On Wed, Jun 6, 2012 at 4:12 AM, Saana Isojunno <
saana.isoju...@googlemail.co
You say median for each panel but tapply gets medians for each variety
(chartjunk IMHO). Regardless, *this case* has nothing to do with
panel.abline. Add print(median.values) to your panel function would have
hinted as to the missing piece.
# medians for each panel:
dotplot(variety ~ yield | site,
matrices,
but again I don't really understand what you're after. Sorry.
Ilai
On Fri, Jun 1, 2012 at 12:53 AM, Akkara, Antony (GE Energy, Non-GE) <
antony.akk...@ge.com> wrote:
> Hi iLai,
>
> ** **
>
> What you showed below, almost same like I am al
If you haven't done so you *must* read an Introduction to R. The only
reason this is a problem is Myarray is a character string, not a function
or expression to be evaluated. I think this will get you what you want
though:
# In the future use the output of ?dput to provide data to this list
(MyMa
?plot.trellis.
In general something like
mlp<- levelplot(...
mhist<- histogram(...
plot(mlp,split=c(1,2,1,2),more=T)
plot(mhist,split=c(1,1,1,2),more=F)
You will need to do some work on the padding and layout widths to get the
distances right (I assume the key is to be the "x-axis" of the histogr
I'm confused (I bet David is too). First and last models are "the
same", what do SE's have to do with anything ?
naive <- glm(extra ~ group, data=sleep)
imputWrong <- glm(extra ~ group, data=sleep10)
imput <- glm(extra ~ group, data=sleep10,weights=rep(0.1,nrow(sleep10)))
lapply(list(naive,imputWr
Can't put my finger on it but something about your idea rubs me the
wrong way. Maybe it's that the tree depends on the hierarchical
clustering algorithm and the choice on how to trim it should be based
on something more defensible than "avoid singletons". In this example
Hawaii is really different
On Tue, May 15, 2012 at 4:19 PM, Rich Shepard wrote:
> On Tue, 15 May 2012, David L Carlson wrote:
>
> David,
>
> I have 130 plots to produce (30 chemicals un-transformed and three
> transformations). The R console insists that I retype each of the 6 lines
> (adding a prepanel.qqmathline line) ea
On Tue, May 8, 2012 at 9:32 AM, maxbre wrote:
> and then with the superposition of relative average values to the boxplots,
> i.e. something like:
>
> panel.points(…, mean.values, ..., pch = 17)
Almost. You need to give panel.points the new x, and make sure the
right mean.values go to the right
Thank you for your example. I only skimmed it, but since both
solutions use nlevels and box.ratio it is no surprise we end up at the
same place (although I do think your g-median is nicer than my 3/4).
Thing is, I wouldn't call either of these "simple"... would be nice if
one could just query the
Hi,
I think the issue is not "respecting the groups" but finding the
x-location of the center of bars in panel.barchart(groups,...). Don't
know about the memisc package, but doesn't look like it provides an
easy solution. This is how I do it:
http://www.mail-archive.com/r-help@r-project.org/msg1622
On Wed, Apr 25, 2012 at 6:14 AM, Patrick Hausmann
wrote:
> Hello,
>
> I am trying to get a new vector 'x1' based on the not NA-values in column
> 'a' and 'b'. I found a way but I am sure this is not the best solution. So
> any ideas on how to "optimize" this would be great!
If by optimize you mea
le to you.
Best
>
> Steve
>
> On Apr 24, 2012 7:45 PM, "ilai" wrote:
>>
>> On Tue, Apr 24, 2012 at 2:09 PM, wrote:
>>
>> > library(latticeExtra)
>> >> doubleYScale(hist("mydata", breaks=20, prob=T, xlim=c(-100, 2000),
On Tue, Apr 24, 2012 at 2:09 PM, wrote:
> library(latticeExtra)
>> doubleYScale(hist("mydata", breaks=20, prob=T, xlim=c(-100, 2000),
> plot.spdf(x), use.style=FALSE)
>
> This does not work as doubleYScale expects histogram and densityplot, and
> I'd like to use the plot.spdf routine in its pl
You need to do a little more work to add the components you want "back
in". I think you want something like:
xyplot( Sepal.Length ~ Petal.Length, auto.key=T, data=iris,
par.settings = list(axis.line = list(col = 0)),scales=list(col=1,tck=c(1,0)),
panel=function(...){
lims <- current.panel.lim
On Fri, Apr 20, 2012 at 8:15 PM, David Winsemius wrote:
>
> Another puzzle. In the original posting there was this segment:
> ---
>
> but gives an error message without par.settings if i want to add
> panel.Locfit(x,y,nn= 0.9,lwd = c(1,2,3), ...)
>
> Error using packet 1
> fo
Oops - that is "reply all"
On Fri, Apr 20, 2012 at 5:29 PM, David Winsemius wrote:
>
> I'm a bit puzzled by this exchange. I know there is a 'panel.locfit', but
> you two are spelling it differently. Can you explain why you are doing so?
>
Hi David,
Thanks for stepping in. panel.Locfit is the OP'
Duncan,
First off, I admit it is not clear to me what you are trying to
achieve and more importantly, why? by "why" I mean 1) I don't see the
advantage of writing one general panel function for completely
different situations (one/multiple smoothers, grouping levels etc.) 2)
your intended result as
On Thu, Apr 19, 2012 at 2:30 AM, Duncan Mackay wrote:
> Hi
>
> xyplot(y ~x|Farm,xx,
> groups = Padd,
> panel = panel.superpose,
> panel.groups=function(x,y, ...){
> panel.Locfit(x,y,...)
> panel.xyplot(x,y,...)
>
On Thu, Apr 19, 2012 at 2:55 AM, ce41188 wrote:
> Thank you for the reply.
>
> The more I look at this, the more confused I become. I was wondering if you
> could walk me through this a little more in detail, in particular the panel
> method function of doing things. It may be obvious to many, but
On Wed, Apr 18, 2012 at 2:07 PM, Louis Plough wrote:
> If you could lead me to an example with code, that would help me figure out
> how to do it for my function
The states example in ?xyplot uses groups and subscripts in a panel function
>> I read it, but I guess I don't quite understand which
On Wed, Apr 18, 2012 at 8:45 AM, slavrenz wrote:
I would like to display with the xyplot() function
> for several states. I will have a total of 6 plots, I need to plot the
> points of one of the states in a different color than all the rest, such
> that they can be more easily referenced in a p
Michael originally suggested ?outer. I think that was enough in this
case (no need for mv or sapply):
wlpk3 <- outer(k3,wl,'+')
ln.phiDIC <- log(k1)+k2/wlpk3
phiDIC<- t(exp(ln.phiDIC))
colnames(phiDIC)<- stations
str(phiDIC)
Cheers
On Thu, Apr 12, 2012 at 8:58 PM, R. Michael Weylandt
wrote:
>
On Wed, Apr 11, 2012 at 7:16 AM, David Winsemius wrote:
>
> On Apr 11, 2012, at 9:03 AM, David Winsemius wrote:
>
>>
>> On Apr 11, 2012, at 6:28 AM, maxbre wrote:
>>
>>> hi, I just realised I want to go a little further in the control of the
>>> chart
>>> appearance and I would like to have the sa
densityplot(~y|B, groups=A, data=dt,
plot.points="rug",
col=trellis.par.get("superpose.polygon")$col, alpha=.5,
panel=panel.superpose,
panel.groups=my.panel.densityplot)
Worked for me (i.e. semi-transparent superpose.polygon colors). Is
that not wha
On Mon, Apr 9, 2012 at 12:40 PM, Jason Rodriguez
wrote:
> Hello, I have a graphics-related question:
>
> I was wondering if anyone knows of a way to create a bar chart that is
> colored with a three-part gradient that changes at fixed y-values. Each bar
> needs to fade green-to-yellow at Y=.10 a
on any ncol(matrix). Using
apply was suggested at some point by others, my comment was simply
that you failed to meet even that adjustment.
Cheers
> On Fri, Apr 6, 2012 at 6:59 PM, ilai wrote:
>> On Fri, Apr 6, 2012 at 4:02 PM, Dimitri Liakhovitski
>> wrote:
>> This w
On Sun, Apr 8, 2012 at 11:40 AM, Vikram Chhatre
wrote:
> Hello -
>
> I want to generate stacked plots with par(mfrow)) function. However,
> my axis labels aren't showing.
>
Your mar (2) are too narrow. You could increase back to the default or
use the lines option in mtext to write labels closer
On Sun, Apr 8, 2012 at 3:42 AM, Kaveh Vakili wrote:
> Hi all,
>
> I have this problem with lattice that xyplot() won't draw some of my axis
> labels if the type (i.e. the relation argument) of scales is set as free. For
> example, in the plot below, I would want it to also show:
>
> 1. the label
On Sat, Apr 7, 2012 at 8:29 PM, wcheckle wrote:
> Thank you David, the bwplot option does what I need:
> However, I am interested in also learning how to do it in xyplot as well. I
> wasn’t able to follow the last two set of instructions
That was me. Sorry for any confusion. wcheckle, these we
On Sat, Apr 7, 2012 at 11:16 AM, David Winsemius wrote:
> xyplot(mortality ~ type, data=xdat,
> panel=function(x,y){
> panel.xyplot(x,y, jitter.x=TRUE)
> panel.segments(x0=c(.9, 1.9, 2.9),
> x1=c(1.1,2.1,3.1),
>
On Fri, Apr 6, 2012 at 4:02 PM, Dimitri Liakhovitski
wrote:
This works great:
Really ? surprising given it is the EXACT same for-loop as in your
original problem with counter "i" replaced by "k" and reorder to
matrix[!100]<- 0 instead of matrix(0)[i]<- 100
You didn't even attempt to implement Ca
I maybe missing something but this seems like an indexing problem
which doesn't require a loop at all. Something like this maybe?
(input<-matrix(c(5,1,3,7,2,6,4,8),nc=2))
output <- matrix(0,max(input),2)
output[input[,1],1] <- 100
output[input[,2],2] <- 100
output
Cheers
On Fri, Apr 6, 2012 at
You might want to check out package {tikzDevice} and it's
documentation. In essence you turn your R plots to tikz-pgf so they
can be naturally incorporated into a beamer presentation. Colors, bg,
fonts etc. can now be controlled in your main latex doc. I find it
much more convenient, and nicer when
On Thu, Apr 5, 2012 at 1:40 PM, Peter Meilstrup
wrote:
> Consider the data.frame:
>
> df <- data.frame(A = c(1,4,2,6,7,3,6), B= c(3,7,2,7,3,5,4), C =
> c(2,7,5,2,7,4,5), index = c("A","B","A","C","B","B","C"))
>
> I want to select the column specified in 'index' for every row of 'df', to
> get
>
>
On Wed, Apr 4, 2012 at 10:12 AM, Petr Savicky wrote:
> On Wed, Apr 04, 2012 at 01:32:10PM +0200, paladini wrote:
> Var1 <- c("(1,2)", "(7,8)", "(4,7)")
> Var2 <- c("(1,5)", "(3,88)", "(12,4)")
> Var3 <- c("(4,2)", "(6,5)", "(4,4)")
> DF <- data.frame(Var1, Var2, Var3, stringsAsFactors=FALSE)
glers, the same solution can be achieved with
A<- matrix(1:50,nr=10)
par(mar=c(5.1,2.1,4.1,4.1))
image(t(A),axes=F,col='transparent')
axis(1,at=seq(0,1,l=ncol(A)),labels=LETTERS[1:ncol(A)])
require(fields)
image.plot(t(A),add=T,legend.mar=3.1)
Cheers
>
>>
>>
>>
On Tue, Apr 3, 2012 at 6:22 PM, Peter Ehlers wrote:
> On 2012-04-03 15:49, ilai wrote:
>>
>> Try to plot the points first followed by vis.gam(...,type='contour',
>> color='bw', add=T) instead of vis.gam followed by points.
>>
>> HTH
>
>
On Tue, Apr 3, 2012 at 7:25 PM, David Lyon wrote:
> if I had a data file like this:
> 1.42 1.29 -0.13
> 1.46 1.34 -0.12
> 1.45 1.32 -0.13
> 1.36 1.26 -0.10
> 1.33 1.29 -0.04
>
> I want to create a image plot like this:
> data1<-read.table("A")
>
> image.plot(t(data1), axes=FALSE, xlab=NA, ylab=NA)
Try to plot the points first followed by vis.gam(...,type='contour',
color='bw', add=T) instead of vis.gam followed by points.
HTH
On Tue, Apr 3, 2012 at 2:48 PM, Ravi Varadhan wrote:
> Hi,
>
> Please see the attached contour plot (I am sorry about the big file). This
> was created using the
On Sun, Apr 1, 2012 at 9:59 AM, michaelyb wrote:
> Basically I need to read the data from an external source using many R
> commands.
> The problem is that sometimes the source is empty, and I get a list with
> empty values, and I need to substitute them by "NA".
> It is def. not hard, I just don'
On Thu, Mar 29, 2012 at 9:27 AM, ilai wrote:
Oops, sent to fast. A (maybe) clearer solution:
f <- function(x,m){
cmway <- combn(ncol(x),m)
xx <- x[,cmway]
dim(xx) <- c(nrow(x),nrow(cmway),ncol(cmway))
xx
}
f(M,3)
str(sapply(2:4,f,x=M))
And again lapply / apply , or even return
To cbind, you don't need a loop
(M <- matrix(1:50,nc=10))
c2way <- combn(ncol(M),2)
MM <- M[,c2way]
dim(MM) <- c(nrow(M),nrow(c2way),ncol(c2way))
MM
c3way <- combn(ncol(M),3)
MMM <- M[,c3way]
dim(MMM) <- c(nrow(M),nrow(c3way),ncol(c3way))
MMM
etc. etc.
Than you can (untested for icc) loop your
On Thu, Mar 29, 2012 at 3:04 AM, maxbre wrote:
> To answer your question:
> - I did not put relation=’same’ because that is not what I want: i.e **for
> each single panel** (in my case 4) I want to set the same limits for both x
> and y axes (I want the diagonal line exactly bisect each panel);
On Wed, Mar 28, 2012 at 8:03 PM, Benton, Paul
wrote:
>
> On Mar 29, 2012, at 1:41 AM, ilai wrote:
>
>> On Wed, Mar 28, 2012 at 3:53 PM, Benton, Paul
>> wrote:
>>> Hello all R-er,
>>>
>>> ## Then test if rho.A[1,1] come from the distributi
On Wed, Mar 28, 2012 at 3:53 PM, Benton, Paul
wrote:
> Hello all R-er,
>
> I'm trying to run a resampling method on some data. The current method I have
> takes 2+ days or a lot of memory . I was wondering if anyone has a better
> suggestion.
>
> Currently I take a matrix and get the correlation
On Wed, Mar 28, 2012 at 6:49 AM, Petr PIKAL wrote:
> What problem? Nabble is not available to all and here is not much to cook
> from.
Indeed. Also the OP actually provided their own solution, just 5 more
minutes of googling to find ?sub.
bankoffer.3 <- factor(c('999','429000:notaccepted','4
On Wed, Mar 28, 2012 at 4:21 AM, maxbre wrote:
> After a long and winding road (sorry but I'm a novice) I get to a final
> result which is quite close to what I need;
> nevertheless I would like to tweak a little further the xyplot
Without dput(mydata) you are the only one who can do that...
so
It is (at least for me) really unclear what the problem is, or how
it's related to mclapply.
You say
" this works fine, except that what I want to get NA's in the return
positions that were not recalculated. then, I can write
>
> newdata$y <- ifelse ( is.na(olddata$y), mc.byselectrows( olddata,
On Sun, Mar 25, 2012 at 3:50 PM, stivi wrote:
> Hello,
>
> my question is if anyone has any good ideas how to create a Markov Chain
> from ordered data. So, I have some sort of time series, and if value1
> happens as time1 and value2 happens at time2 I record this as an update to
> the probability
On Fri, Mar 23, 2012 at 2:07 PM, Bigelow, Seth W -FS wrote:
> ilai/keren:
>
> Thanks for your response. It's not the 3d bounding box that I wish to
> eliminate, but the box that surrounds the whole figure and is drawn
> automatically (I call this the outer box, in contr
See 'box.3d' in trellis.par.get() :
wireframe(z ~ x*y, data = test,
scales=list(arrows=F),
par.settings = list(box.3d = list(col=NA)))
Note you can have some finer control:
wireframe(z ~ x*y, data = test,
scales=list(arrows=F),
par.settings = list(box.3d = list(col=c(1,2,NA,NA,3,NA,4,5,6)))
)
On Mon, Mar 19, 2012 at 7:56 AM, Jose Bustos Melo wrote:
> Hi everyone,
>
> I'm trying to reduce the font size in the Y exe in this plot:
> dotplot( bank ~ MV2007 + MV2009 , data = d, horiz = T,
par.settings = list( superpose.symbol = list( pch = 21, fill = c(
"lightblue", "lightgreen"), ce
On Wed, Mar 14, 2012 at 9:47 PM, Alex Miller wrote:
> Dear R Users,
>
> I am trying to plot a matrix (a Digital Elevation Model) using wireframe
> [lattice] and color that matrix based on a separate/independent matrix of
> the same resolution
This makes no sense. the values in DEM are the z-coord
You want to assign your call to boxplot as an object that contains the
plot information
set.seed(1)
b <- matrix(rgamma(100,(1:4)/2,.5),nc=4)
(bxp <- boxplot(b))
Now you can use the info in bxp for placement, e.g.:
text(1:length(bxp$names),bxp$stats[3,],round(bxp$stats[3,],2),pos=3)
By the way,
You could try doing it without a loop (.C or other):
(rgnsnp <- merge(region,snps))
(rgnsnp[with(rgnsnp,STOP>=POS & POS >= START),])
Here is my test for merge+search on 100k/200k:
fdf1 <- data.frame(chr=1:10,p=runif(10),d=sample(10))
fdf2 <- data.frame(chr=rep(1:10,2),s=runif(2
On Wed, Mar 14, 2012 at 8:56 AM, Thomas Hoffmann
wrote:
> Hi all,
>
> I still fail to plot an axis title with the following expression:
>
> plot(0,xlab=expression('(SOC [' * kgm^{-2} * '])' * ^{-2}))
>
> the xlab should look like: (SOC [kgm^2])^0.25
>
> with an out bracket and a superscript.
>
1 - 100 of 190 matches
Mail list logo