similar to: pls help: lattice graph with both negative and positive value, x and y cross at 0 and negative value bars are plotted just oppositive direction in contrast to positive

Displaying 20 results from an estimated 10000 matches similar to: "pls help: lattice graph with both negative and positive value, x and y cross at 0 and negative value bars are plotted just oppositive direction in contrast to positive"

2009 Dec 16
2
Flexclust barchart issue when mcol=NULL (PR#14150)
Full_Name: Chris Hane Version: 2.10.1 OS: Windows Submission from: (NULL) (198.203.181.181) When using barchart in the flexcust package, setting mcol=NULL to avoid the lollipops causes an error. Each panel shows the text message "Error using packet n replacement has length zero." where n is the panel number. > data(iris) > cl <- cclust(iris[,-5], k=3) > barplot(cl,
2006 Apr 14
1
Adding values to top of bars in barchart
Given the following data frame ("freq.sp"), > str(freq.sp) `data.frame': 42 obs. of 4 variables: $ behav : Factor w/ 6 levels "approach","bowride",..: 1 1 1 1 1 1 1 2 2 2 ... $ species: Factor w/ 7 levels "COAST_SPOT","EAST_SPINR",..: 1 2 3 4 5 6 7 1 2 3 ... $ n : int 193 194 563 357 570 369 74 194 208 633 ... $ pct :
2010 Feb 20
3
Error Bars in lattice- barcharts
Hello, I am attempting to write a script that adds error bars to a barchart. I basing my attempt heavily on the following thread: http://tolstoy.newcastle.edu.au/R/e2/help/06/10/2791.html I can't seem to get around the problem that was discussed in the thread. The following example should illustrate my problem. Sorry about the messy example but I am 1) trying to make it as close as possible
2002 Dec 10
1
lattice barchart with "negative" bars
Dear all, I'm trying to use the lattice barchart function to obtain a bar plot of a variable for different values of two factors. The thing I'm trying to do is something like this: > barchart(MyVar ~ season | place, data=mydataset) My problem is that the column MyVar has some negative values and I would like them to be represented as bars stacking down from zero instead of what
2010 Sep 03
6
how can I plot bar plots with all the bars (negative and positive) in the same direction????
Dear r-help mailing list, this seems stupid, but I actually don't find the solution: if I have a vector of numbers x of length n, ranging, say, from -3 to 4, if I do barplot (x) all the values below 0 go downwards, and all the positive values go upward. How can I make them all begin from the minimum pointing upwards? Thanks! Gabriele Zoppoli, MD Ph.D. Fellow, Experimental and Clinical
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
Dear Ron and Bert, First (and without considering why one would want to do this, e.g., adding a start of 1 to the data), the following works for me: ------ snip ------ > library(MASS) > BoxCoxLambda <- function(z){ + b <- boxcox(z + 1 ~ 1, + lambda = seq(-5, 5, length.out = 101), + plotit = FALSE) + b$x[which.max(b$y)] + } > mrow <- 500
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
Thanks John. ?boxcox says: ************************* Arguments object a formula or fitted model object. Currently only lm and aov objects are handled. ************************* I read that as saying that boxcox(lm(z+1 ~ 1),...) should run without error. But it didn't. And perhaps here's why: BoxCoxLambda <- function(z){ b <- MASS:::boxcox.lm(lm(z+1 ~ 1), lambda = seq(-5, 5,
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
No, I'm afraid I'm wrong. Something went wrong with my R session and gave me incorrect answers. After restarting, I continued to get the same error as you did with my supposed "fix." So just ignore what I said and sorry for the noise. -- Bert On Sat, Jul 8, 2023 at 8:28?AM Bert Gunter <bgunter.4567 at gmail.com> wrote: > Try this for your function: > >
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
Hi Bert, On 2023-07-08 3:42 p.m., Bert Gunter wrote: > Caution: This email may have originated from outside the organization. Please exercise additional caution with any links and attachments. > > > Thanks John. > > ?boxcox says: > > ************************* > Arguments > > object > > a formula or fitted model object. Currently only lm and aov objects
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
Hi, Firstly, apologies as I have posted this on community.rstudio.com too. I want to optimise a Box-Cox transformation on columns of a matrix (ie, a unique lambda for each column). So I wrote a function that includes the call to MASS::boxcox in order that it can be applied to each column easily. Except that I'm getting an error when calling the function. If I just extract a column of the
2010 Nov 30
2
Error bars in lattice barchart with groups
Dear R-users, i want to plot gene regulation data in a lattice barchart. To illustrate the problem i encounter, the following code uses the "barley"dataset: library(lattice) barley[["SD"]] <- 5 PLOT <- barchart(data=barley, yield~variety|site, groups=year,origin=0, as.table=TRUE, scales=list(x=list(relation="same", rot=30), y=list(alternating=3,tck=-1)),
2023 Jul 08
1
Getting an error calling MASS::boxcox in a function
Try this for your function: BoxCoxLambda <- function(z){ y <- z b <- boxcox(y + 1 ~ 1,lambda = seq(-5, 5, length.out = 61), plotit = FALSE) b$x[which.max(b$y)] # best lambda } ***I think*** (corrections and clarification strongly welcomed!) that `~` (the formula function) is looking for 'z' in the GlobalEnv, the caller of apply(), and not finding it. It finds
2012 Sep 28
1
Heatmap Colors
Hello R-Users! I'm using a heatmap to visualize a matrix of values between -1 and 3. How can I set the colors so that white is zero, below zero is blue of increasing intensity towards -1 and above zero is red of increasing intensity towards red? I tried like this (using the marray and gplots packages from bioconductor): mcol <- maPalette(low="blue", mid="white",
2010 Apr 20
1
the bar width of barchart plot in lattice package
Dear R users, I am trying to use the following code to make a barchar plot. The bars in the plot turn out to be a little narrow. Is there any way to modify the width of the bars? Thank you! library(lattice) scores = gl(2, 5, label=c('Sensitivity', 'PPV'), length = 100) sequences = gl(5, 1, label=c('Lemna minor', 'Dugesia japonica A', 'Gymnosporangium
2010 Jul 05
4
Data Labels in a barchart (Lattice or otherwise)
Hi, Can anyone please help me with how I could add labels with the value for each bar in a barchart? (similar to how data labels can be added in Excel) I have done a lot of searching but havent been lucky. Thanks, Raoul -- View this message in context: http://r.789695.n4.nabble.com/Data-Labels-in-a-barchart-Lattice-or-otherwise-tp2278027p2278027.html Sent from the R help mailing list archive at
2013 Mar 06
1
red SNA
Estimados Le consulto porque estoy intentando presentar unos datos de alguna forma un poco distinta, salir un poco de la costumbre. Primero describo los datos: Suponiendo una secuencia: golpe al auto -> torura de vidrio -> rotura de aciento otro auto golpe al auto -> -> rotura de aciento , a este por alguna causa no se le rompio el vidio o esa informaciĆ³n es desconocida. Esta
2009 Dec 08
3
re-ordering x-lables using barchart()
Hi R Users, I'm trying to re-order the "site names" ("Waseca", "Morris", ...). I'm using following code: libarry(lattice) barchart(yield ~ variety | site, data = barley, groups = year, layout = c(6,1), aspect=.7, ylab = "Barley Yield (bushels/acre)", scales = list(x = list(abbreviate = TRUE, rot=45,
2011 Apr 07
1
dotplot as a background for multiple barchart plots (with Lattice)
Hi R users, I'm kind stuck in my R experience... I want to have a multiple barchart with n windows, but with the same background for each window, and I want that background to be a recorded dotplot. First, is it possible ? If so, I guess I have to call a record plot in the panel function but how ? As there is no panel.plot and I can't use the recorded plot as an argument for the
2009 Mar 29
1
Two variables on one lattice barchart
Hi, I created the barchart below using the lattice package, however I can't seem to find a way to add another variable as a line (see the desired square/lines that I drew for the last 10 years of the plot). Can anyone help me with this? Your help is much appreciated! Code: Schart<-barchart(Catch~Year,data=SNA, scales=list(col = "black", tck = c(1, 0),x=list(rot=45)))
2010 Jan 22
4
Rotating the axis labels in the basic graphic device ?
Hello dear R help group, I learned recently that one can change the rotation of labels in the axis, when using a lattice plot, for example: library(lattice) barchart(yield ~ variety , data = barley, groups = year, ylab = "Barley Yield (bushels/acre)", scales = list(rot = 45)) My question is: Is there an application of "rot" in something like