par(xpd=T)
bp<- barplot(matrix(1:50,5,10),names=F)
text(bp,-2,c('these labels','are tooo','looong'),pos=2,srt=45)
Xiaogang Yang wrote:
>
> Hi, everyone:
> I am plotting an graph with bar plot, but the label after every bar is too
> long, I wanna if I can draw the label lean to an angle
> t
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
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 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
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 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
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 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
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
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
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
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
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) ;
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
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(
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 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$
?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 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
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
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 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
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 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
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 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
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 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 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 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
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 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
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 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
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 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
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[
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,
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
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,
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
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(
,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
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
?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
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
par('bg') is not what you are looking for - it will set the bg of the
whole graphic device, not panels. I think you want:
count <- 0
mypanel <- function(x, y, ...){
count <<- count+1
ll<- par('usr')
if(count %in% c(1,4,9,12)) bg<- "#FDFF65"
else bg<- 'transparent'
rect(ll[1],ll[3],ll
What do you make of the following from ?riwish
"
riwish(v, S)
v: Degrees of freedom (scalar).
"
does a m/2 parameterization yield a scalar for, say, 3 dof ?
On Thu, Mar 1, 2012 at 9:55 AM, Shantanu MULLICK wrote:
> Hello Everyone
>
> Both the MCMCpack and the bayesm libraries allow u
On Fri, Mar 2, 2012 at 1:22 AM, peter dalgaard wrote:
>
> Er, yes (scalar does not imply integer)
Dough! awkward... Sorry Shantanu.
I've added
cat('###\n # ',substr(fortunes::fortune(90)$quote,1,146),'\n ### \n')
To .First in my Rhelp directory.
Hope that helps (me).
>
> As a general ma
On Fri, Mar 2, 2012 at 1:17 PM, Frank Harrell wrote:
> Hi Rich and Peter,
>
> What I am trying to do is the right-justify a vector of numbers to the right
> of the y-axis so that the leftmost digit of all of the numbers is one
> character to the right of the axis line. axis() plots tick marks and
On Sat, Mar 3, 2012 at 5:48 PM, Nathan Lemoine wrote:
> It appears that the subscripts are only passing two values, the center of
> each group. There should be six values, one for the center of each bar
> (correct?),
No. That's also why your code doesn't work. x[subscripts] are not the
centroi
(i.e. a bar with a width of 1in a group of three bars has a half width
> of 1/6)
> groupS - (nv+1)/2 gives each bar's relative position to the central bar
>
> Am I interpreting these correctly? One thing I don't get is where 3/4 came
> from.
>
> Anyway, thanks for
Hi
try
glm(Response~ .^2, data=yourdata.frame)
For all predictors (.) and 2-way interactions (^2).
You might also want to see ?drop.terms and ?formula for automating the
construction of all model combinations.
Side note: R is not SAS (fortunately). Interaction is denoted ":", X*Y
is shorthand for
On Tue, Mar 6, 2012 at 8:55 PM, Byerly, Mike M (DFG)
wrote:
>
> estimates <-
c(67.42,30.49,32.95,23.53,10.26,6.03,23.53,0.93,50.72,24.2,25.84,18.54,
7.16,3.6,9.35,0.33,87.28,37.25,40.16,28.59,13.77,8.92,40.74,1.68,48.28,23.09,
24.49,17.7,6.63,3.28,7.79,0.26,91.63,38.74,41.6,29.74,14.49,9.51,44.1
?by ?aggregate
On Tue, Mar 6, 2012 at 4:14 PM, Walter Anderson wrote:
> I needed to compute a complicated cross tabulation to show weighted means
> and standard deviations and the only method I could get that worked uses a
> series of nested for next loops. I know that there must be a better wa
It's hard to help if you keep changing the framework of your problem,
first two matrices - now it's a data.frame and a list of subset row
names in a plotting method from whatever package "suprow" comes from.
Regardless, Michael's original answer already gave you a solution:
plot(table1,type='l',lw
On Sat, Mar 10, 2012 at 9:33 AM, Balaitous wrote:
> Hi,
>
> I have a data.frame df with
> names(df) = c("Var1", "Var2", "Var3", "Var4")
>
> and I plot data with
>
> xyplot(Var1+Var2~Var3|Var4, data=df)
>
> I want to use different panel functions for Var1 and Var2.
> How can I do ?
You didn't spec
Inline
On Sat, Mar 10, 2012 at 1:47 PM, Balaitous wrote:
> Le samedi 10 mars 2012 à 12:25 -0700, ilai a écrit :
>> On Sat, Mar 10, 2012 at 9:33 AM, Balaitous wrote:
>
> Var1 and Var2 are 2 two different observed variables (with different scales)
You might want to consider sca
d2 <- as.matrix(c(2,NA,4))
barplot(d2,beside=T)
barplot(c(d2))
barplot(na.omit(d2))
d2[2,] <- 0
barplot(d2)
# So barplot is not "stopping" at the first NA (first 2 plots). But
what does stacking even mean when you have a missing group in the
middle ? you can't expect barplot to know... if yo
On Tue, Mar 13, 2012 at 3:34 PM, David Winsemius wrote:
>
> When I got around to running it I was hampered by a lack of knowledge about
> what sort of data-object "price" might have been. I tried putting in a
> single number on hte theory that it would saitisfy the seq() call, and also
> got the
Not sure I understand your question (or if there is one) and I am not
familiar with vcd::mosaic. But if you are asking is there a simpler
way ? than yes:
1. work with ?array and ?aperm
2. create the array directly in R from the original data - not excel
3. ?mosaicplot (no package required - it's in
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.
>
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
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,
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
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
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 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
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
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 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
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 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 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 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);
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 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
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'
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 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)
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
>
>
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 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)
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
>
>
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
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
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
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 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 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 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 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 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
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 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
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:
>
Hello list!
I am trying to project the fitted surface to a 3d plot of the data,
similar to figures 13.7 or 6.5 in Deepayan Sarkar's "Lattice,
Multivariate Data Visualization with R", but replace the contour/map
lines with "levelplot". Problem is I can't get the color regions to
line up after the co
cat will wrap Josh's "overkill" approach in one line:
mylist<- list(1:3,3:9)
lapply(mylist , cat , sep=',' , fill=T , append=T , file='foo.csv')
Cheers
On Sun, Feb 5, 2012 at 7:42 PM, Joshua Wiley wrote:
> Hi Michael,
>
> Part of me imagines this is overkill, but this should be one option:
>
>
Doug,
dev.copy2pdf closes the connection after it's "done", so onefile is
meaningless. To look at each plot before copy to a single pdf, you
could open a pdf(...) but revert between it and your graphic device:
graphics.off()
plot(1:7, 1:7)
x11c<- dev.cur() # your current graphics device
pdf(f
1 - 100 of 190 matches
Mail list logo