similar to: Implicit vs explicit printing and the call stack

Displaying 20 results from an estimated 400 matches similar to: "Implicit vs explicit printing and the call stack"

2009 Apr 27
0
VIF's in R using BIGLM
Dear R-help This is a follow-up to my previous post here: http://groups.google.com/group/r-help-archive/browse_thread/thread/d9b6f87ce06a9fb7/e9be30a4688f239c?lnk=gst&q=dobomode#e9be30a4688f239c I am working on developing an open-source automated system for running batch-regressions on very large datasets. In my previous post, I posed the question of obtaining VIF's from the output of
2011 Mar 29
1
ggplot2: scale_y_log10() with geom_histogram
Dear ggplot2 users, is there an easy/elegant way to suppress zero count bars in histograms with logarithmic y axis ? One (made up) example would be qplot(exp(rnorm(1000))) + geom_histogram(colour = "cornsilk", fill = "darkblue") + scale_x_sqrt() + scale_y_log10() Thanks! Markus [[alternative HTML version deleted]]
2017 Nov 02
3
ggplot inside function doesn't plot
I have a function: myplot <- function (X) { d <- plotCounts(dds2, gene=X, intgroup="condition", returnData=TRUE) png(paste("img/", X, ".png", sep="")) ggplot(d, aes(x=condition, y=count, color=condition)) + geom_point(position=position_jitter(w=0.1,h=0)) + scale_y_log10(breaks=c(25,100,400)) + ggtitle(X) +
2017 Nov 02
3
ggplot inside function doesn't plot
I don't really understand. I mean, I understand the solution is print(ggplot(...)). But why is that required in a function and not at the console? Shouldn't I be able to rely on what I do at the console working in a script? Is this inconsistent behavior by design? On Thu, Nov 2, 2017 at 11:54 AM, David Winsemius <dwinsemius at comcast.net> wrote: > >> On Nov 2, 2017,
2008 Jan 15
1
navigating ggplot viewports
list(...) I can not get at the grid viewports in a ggplot2 plot. I know there is supposed to be a viewport called "panel_1_1" but downViewport() can't find it. Has the viewport been popped? I had a quick look at the functions involved (eg ggplot_plot) but there is no obvious problem there. > library(ggplot2) > qplot(1:10, 1:10) > current.viewport() viewport[ROOT] >
2017 Nov 02
0
ggplot inside function doesn't plot
> On Nov 2, 2017, at 9:27 AM, Ed Siefker <ebs15242 at gmail.com> wrote: > > I have a function: > > myplot <- function (X) { > d <- plotCounts(dds2, gene=X, intgroup="condition", returnData=TRUE) > png(paste("img/", X, ".png", sep="")) > ggplot(d, aes(x=condition, y=count, color=condition)) + >
2017 Nov 29
3
Removing a data subset
Say I have a dataset that looks like Location Year GW_Elv MW01 1999 546.63 MW02 1999 474.21 MW03 1999 471.94 MW04 1999 466.80 MW01 2000 545.90 MW02 2000 546.10 The whole dataset is at http://doylesdartden.com/ExampleData.csv and I use the code below to do the graph but I want to do it without MW01. How can I
2009 Sep 06
5
ggplot2::qplot() -- arbitary transformations of coordinate system?
Hi, Does anyone know how to do a coord_trans() in which the y-axis is tranformed into (for example) -1000/y? Thanks, _____________________________ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400 Charlottesville, VA 22904-4400 Parcels: Room 102 Gilmer Hall McCormick Road Charlottesville, VA 22903 Office: B011
2012 Mar 26
4
reading header in txt file and making histogram
Dear all I am a BEGINNER and have R on my Mac. I saved my excel file as .txt file, I have just one column with first row as the column name. My file when read by R looks like this. After reading the table I try to make a histogram by hist(dbh), it says object dbh not found. What am I doing wrong? thanks dbh 1 11.53 2 16.05 3 7.36 4 16.05 5 8.66 6 12.74 7 22.93 8 7.55 9
2008 Feb 17
1
ggplot2: bug in geom_ribbon + log scale!?
Hi everyone, Hadley, it seems there's a bug in geom_ribbon() when using it in a log-scaled plot: d<-data.frame(x=c(1:20),y1=rnorm(20)+3,y2=rnorm(20)+5) p<-ggplot() p<-p+geom_ribbon(data=d,aes(x=d[["x"]],min=d[["y1"]],max=d[["y2"]])) p<-p+geom_line(data=d,aes(x=d[["x"]],y=d[["y1"]]),colour="blue")
2011 Nov 16
1
boxplot strange behavior
Hello, I generate box plots from my data like this: qplot(x=xxx,y=column,data=data,geom="boxplot") + xlab("xxx") + ylab(ylabel) + theme_bw() + scale_y_log10() + geom_jitter(alpha=I(1/10)) The problem is that I see lot of points above the maximum at the same level as some outliers. It looks very weird as I expected the outliers to be "few" and specially not see any
2017 Nov 29
0
Removing a data subset
Reading in the data from the file x <- read.csv( "ExampleData.csv", header = TRUE, stringsAsFactors = FALSE ) Subsetting as you want x <- x[ x$Location != "MW01", ] This selects all rows where the value in column 'Location' is not equal to "MW01". The comma after that ensures that all columns are copied into the amended data.frame. Rgds,
2017 Sep 26
2
Adding non-data line to legend ggplot2 Maximum Contaminant Level
Hello everyone, I have a plot showing chloride concentrations for various point over time. I also have a dotted line that show the Secondary Maximum Contaminant Level (my screening limit) on the graphs at 250 mg/L. But I can not figure out how to include the dotted line / Secondary Maximum Contaminant Level in the legend. Any thoughts? My code is as following and is linked to my data on the
2009 Jul 20
3
Histograms on a log scale
Dear All, I would like to be able to plot histograms/densities on a semi-log or log-log scale. I found several suggestions online http://tolstoy.newcastle.edu.au/R/help/05/09/12044.html https://stat.ethz.ch/pipermail/r-help/2002-June/022295.html http://www.harding.edu/fmccown/R/#histograms Now, consider the code snippet taken from http://www.harding.edu/fmccown/R/#histograms # Get a random
2013 Apr 18
1
Arranging two different types of ggplot2 plots with axes lined up
Hi all, I want to arrange two ggplot2 plots on the same page with their x-axes lined up - even though one is a boxplot and the other is a line plot. Is there a simple way to do this? I know I could do this using facetting if they were both the same type of plot (for example, if they were both boxplots), but I haven't been able to figure it out for two different types of plots. Below is my
2003 Jul 22
1
Conditional Statements for Graphing
Dear List I have math test scores for male and female students where gender is a dummy code (female =1). I also have a variety of other demographic variables. However to begin, I want to create a very simple stripchart where female math scores are a blue circle and male scores are a red triangle. I am having difficulty using conditional statements to accomplish this. Thank you. ------
2008 Feb 15
1
ggplot2 used in a function - variable scope/environment
Hi everybody! I'm trying to use ggplot2 to return a plot from a function (so I can add something or alter it then). Unfortunately, if I add a mapping to a layer in the function, the variable *name* is stored in the layer, rather than the variable's *value* - so that after the function returns the ggplot2-object, it doesn't plot because the variable don't exist in the
2007 Jun 14
1
back-transform predictors for x-axis in plot -- mgcv package
My question is related to plot( ) in the mgcv package. Before modelling the data, a few predictors were transformed to normalize them. Therefore, the x-axes in the plots show transformed predictor values. How do I back-transform the predictors so that the plots are easier to interpret? Thanks in advance, Suzan -- Suzan Pool Oregon State University Cooperative Institute for Marine
2008 Feb 17
2
filled.contour with log axis
Dear all, I would like to generate a filled.contour plot with log x and y axis, however using: filled.contour(as.line,log="xy") results in a warning message. Does anybody knos what to do? Thanks Thomas
2018 May 10
4
the first name of the first column
Dear all; I need to run heatmap. Because my first column in my data is alphanumeric, I can not run as.matrix(scale(my_data)). So I need to make my data readable as in data(mtcars). In *mtcars *data the first column is alphanumeric and has no name. Thanks, Greg [[alternative HTML version deleted]]