similar to: back-transform predictors for x-axis in plot -- mgcv package

Displaying 20 results from an estimated 900 matches similar to: "back-transform predictors for x-axis in plot -- mgcv package"

2011 Sep 30
2
ggplot2 - extracting values of smooth
Suppose that I'm working on Hadley's diamond dataset and I want to review the relationship between price, colour and carat. I might run the following: library(ggplot2) #plot scatter and add some hex binning q<-qplot(carat,price,data=diamonds, geom=c("hex"), main="Variability of Diamond Prices by Carat and Colour") #facet to get one scatter for
2011 May 26
1
Question about ggplot2
Hi all, Is there any way for me to to string in the argument of qplot or ggplot? for example qplot(x='carat',y='price',data=diamonds,geom=c('point','smooth')) instead of qplot(x=carat,y=price,data=diamonds,geom=c('point','smooth')) Thanks!! Regards, TszKin Julian [[alternative HTML version deleted]]
2009 May 27
2
problem with cbind
Hi All, I have a file with two columns, the first column has the names of the patients and the second column has the age. I am looking into creating an output file that looks like 1-10 10-20 etc Eric Chris Bob mat Andrew Suzan Where each column has the name of the patients in a given age category that is displayed in the header. For example in the output, the first
2009 Jul 28
1
some QCA questions
Dear Adrian Dusa, others, I've recently started to learn R in order to use the QCA package because i think it might offer what other QCA packages don't: possibilities for quite a few conditions and large n. However, can someone tell me approx. how much RAM i need to run QCA on set of +/- 400.000 cases and +/- 15 conditions? (or differently: how much time will it take with RAM of a
2001 Oct 22
1
round() doesn't (PR#1139)
R> round(100000/3, -2) - 33300 [1] -7.275958e-12 I would have hoped for 0. The problem seems to be specifically for negative "digits". This is in 1.3.1 on Solaris 2.6 (full description at bottom). [Apologies for making everyone read this 3 times; my bug.report() burped.] Peter Dalgaard <p.dalgaard@biostat.ku.dk> says the problem is in fround.c, which reads in part:
2012 Oct 02
5
smoothScatter plot
Hi, I want to make a plot similar to sm1 (attached). The code I tried is: dcols <- densCols(x,y) smoothScatter(x,y, col = dcols, pch=20,xlab="A",ylab="B") abline(h=0, col="red") But it turned out to be s1 (attached) with big dots. I was wondering if anything wrong with my code. Thanks,Zhengyu -------------- next part -------------- A non-text
2016 Apr 09
1
Run script R
hi all ,? i have an problem in script R . But when I execute the script R I face this error . can you help me please ???error:----------------------------------------- Error in FUN(X[[i]], ...) :?? Theme element 'text' has NULL property: margin, debugIn addition: Warning messages:1: Removed 361 rows containing non-finite values (stat_smooth).?2: Removed 361 rows containing missing values
2009 Mar 02
3
ways to put multiple graphs on single page (using ggplot2)
Hi, Here are three plots: library(ggplot2) data(diamonds) randind <- sample(nrow(diamonds),1000,replace=FALSE) dsmall <- diamonds[randind,] qplot(carat, data=dsmall, geom="histogram",binwidth=1) qplot(carat, data=dsmall, geom="histogram",binwidth=.1) qplot(carat, data=dsmall, geom="histogram",binwidth=.01) What are ways to put these three plots on a single
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
2018 Jul 10
1
problem with display of complex number
Hi, > 1e10+5i [1] 1e+10+0e+00i > Im(1e10+5i) [1] 5 maybe little better... --- R-3.5.1.orig/src/main/complex.c 2018-03-26 07:02:25.000000000 +0900 +++ R-3.5.1/src/main/complex.c 2018-07-10 12:50:42.523874767 +0900 @@ -381,6 +381,7 @@ r->i = fround(pow10 * x->i, digits)/pow10; } else { digits = (double)(dig); + if(digits < 1) digits=1; /* a little better */
2007 Jun 29
0
modify tick labels in 3D GAM plot
Hello, I have a GAM plot in 3D which was generated from the mgcv package (plot.gam) which seems to call the persp( ) function from graphics. This plot is one of three being plotted in the graphics window to copy to a manuscript. The plot's rotation has been set to clearly show the response surface generated in GAM. The resulting plot is small enough that the tick labels overlap tick
2011 Jan 14
2
bug in qplot (library ggplot2)
Hello, this following code give a nice png: /library(ggplot2) i <- 1 png(file=paste('test ',i,'.png',sep='')) qplot(carat, data=diamonds, fill=color,geom='histogram')+scale_y_continuous(i) dev.off() / I would like to get more files, but the following code doesn't make any file: /library(ggplot2) for (i in 1:2) { png(file=paste('test
2009 May 07
1
I updated/reinstalled ggplot2 and the trouble started...
Hi Ian, Per your suggestion, I reinstalled R 2.9.0, then I reinstalled ggplot2 on top. The problem persists. Here's the what happens after the installation: > qplot (carat, price, data = diamonds, alpha = I(1/10)) Warning message: In grid.Call.graphics("L_points", x$x, x$y, x$pch, x$size) : semi-transparency is not supported on this device: reported only once per
2010 Apr 02
1
Plots don't update with xlab, etc. What am I doing wrong.
Hi, I've been struggling with this problem the last few days and finally discovered it's happening at a very fundamental level. Going through Stephen Turner's tutorial on ggplot2, I entered these base graphics commands: > with(diamonds, plot(carat,price)) > with(diamonds, plot(carat,price), xlab="Weight in Carats", ylab="Price in USD",
2011 Jun 01
1
Plotting from functions
I can plot to png's fine when i run this directly from the top-level script/console: png('diamonds.png');qplot(carat,price,data=diamonds);dev.off() But for some reason it's not working when that's in a function: (function(){png('diamonds.png');qplot(carat,price,data=diamonds);dev.off()})() I suspect this is because the qplot's return value must be
2009 Jan 03
2
R Stacked Histogram
I've seen this asked, but never fully answered.  Is it possible to plot stacked histograms in R? I have four data sets that I would like to show combined vertically in histogram format.  Is this possible?  Thank you for any feedback you can provide. P.S. I know I can show the four sets side by side, but I want to combine them, but still uniquely identify each.   Thanks again.
2008 May 19
2
Histograms without bars
Hello I'd like to plot a histogram of some data composed of real numbers. The bin width I'm using is ~ 0.01, which results in high values in the y axis, so that the area under each bar corresponds to the probability of the data in that range. Is is possible to plot points whose y coordinate correspond to that probability, instead of plotting the histogram bars? In other words, instead of
2012 Mar 15
2
ggplot2: goem_smooth and suppress messages
Hi When I run my script using ggplot and geom_smooth I get messages that I would like to suppress: p <- ggplot(dataSubset) p <- p + aes(x = as.Date(factor(key),format="%Y%m%d")) + geom_line() p <- p + geom_smooth(span=0.2,se=FALSE,size=0.7) The messages look like this: geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method
2012 Oct 30
4
Error unary operator
Hi R - listers, I am receiving an error. Does anyone know what this means? J ggplot(subset(foo, Rayos != "Rayos.NA"), aes(x=HTL, y=DevelopIndex, colour=TotalEggs)) +geom_point() +geom_jitter() + facet_grid(Aeventexhumed ~ Rayos) + geom_smooth(method="lm", fill=NA) + ylim(c(0, 7)) Error in +geom_smooth(method = "lm", fill = NA) : invalid argument to unary
2023 Aug 12
2
geom_smooth
Colleagues, Here is my reproducible code for a graph using geom_smooth set.seed(55) scatter_data <- tibble(x_var = runif(100, min = 0, max = 25) ?????????????????????? ,y_var = log2(x_var) + rnorm(100)) library(ggplot2) library(cowplot) ggplot(scatter_data,aes(x=x_var,y=y_var))+ ? geom_point()+ ? geom_smooth(se=TRUE,fill="blue",color="black",linetype="dashed")+