similar to: Making a picture that is wide and small height

Displaying 20 results from an estimated 5000 matches similar to: "Making a picture that is wide and small height"

2008 Jul 20
3
asp and ylim
#See David Williams' book "Weighing the odds", p286 y <- c(1.21, 0.51, 0.14, 1.62, -0.8, 0.72, -1.71, 0.84, 0.02, -0.12) ybar <- mean(y) ylength <- length(y) ybarv <- rep(ybar, ylength) x <- 1:ylength plot(x,y,asp=1,xlab="position",ylab="ybar",type="n",ylim=c(-1,1)) segments(x[1], ybar, x[ylength], ybar) segments(x,ybarv,x,y)
2009 Mar 03
1
behavior of squishplot in TeachingDemos
Hi list, I wonder if anyone has had this experience with squishplot() in the TeachingDemos package. Taking the example from the ?image help page, library(TeachingDemos) x <- 10*(1:nrow(volcano)) y <- 10*(1:ncol(volcano)) layout(matrix(c(1,2,3,4),ncol=2,byrow=TRUE),height=c(2,1)) ## 1st plot op <- squishplot(range(x),range(y),1) image(x, y, volcano, col = terrain.colors(100)) par(op)
2012 Feb 15
7
matching a sequence in a vector?
Hi All, I've been trawling through the documentation and listserv archives on this topic -- but as yet have not found a solution. I'm sure this is pretty simple with R, but I cannot work out how without resorting to ugly nested loops. As far as I can tell, grep, match, and %in% are not the correct tools. Question: given these vectors -- patrn <- c(1,2,3,4) exmpl <-
2008 Jul 20
1
Error in edit(name,file,title,editor)
Can anyone help me with the following attempt to use an external editor from within R > vi(file="p286.R") Error in edit(name, file, title, editor) : unable to open file to read > edit(file="p286.R") Error in edit(name, file, title, editor) : unable to open file to read I have only recently re-started trying to learn R. (I tried before but failed.) I am working
2009 Feb 02
3
Environmental variables
I use a Mac (10.4.11 Mac Os X). In my .tcshrc I define an environmental variable MY. Is it possible to find out its value from inside R? When one loads R for Mac OS X Cocoa GUI written by: Simon Urbanek Stefano M. Iacus are files like .tcshrc read by R? Can I make the value of this environmental variable available to R? Sys.getenv() produces a lot of output, with the values of many
2007 Oct 10
2
Deleting the White Space in an R graph
Hi All, Is there a way we can delete the empty white space around when we generate any graph/map using R? The final output should be onaly a picture with no white spaces all around. Cheers, Pratap --------------------------------- 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. [[alternative HTML version deleted]]
2010 Oct 01
2
strange interaction between rasterImage and Grid graphics
Dear all, This may be specific to Mac, I haven't had a chance to test another platform. Consider this, plot(1,1,t="n") rasterImage(matrix(1),1,1,1,1) library(grid) grid.rect(gp=gpar(fill="grey")) The grid.rect covers the full device window as expected. However, when I resize the window ever so slightly (interactive device) the rectGrob is suddenly clipped to the previous
2006 Apr 25
3
file upload and check width and height of the picture
i have an file upload in my rails app and i''m saving the picture in the filesystem. i need to validate if the uploaded picture have a certain width and height. how can i do this thank you very much -- Posted via http://www.ruby-forum.com/.
2007 Jan 12
2
image() and nonsquare matrices
How do I draw non-square matrices with image() and get the axes right? Try 1: a <- matrix(rnorm(100),20,5) image(1:20,1:5,a,asp=1,xlab="label here") # No good because the axes don't touch the image Try 2: image(1:20,1:5,a,asp=1,axes=F,xlab="label here") axis(side=1,pos=0) # No good because the x axis label is floating far from the x axis. Try 3:
2009 Sep 06
2
OS X PDF bug (PR#13943)
par(mfrow=c(2,2)) y<-1:20 plot(y, pch="+") plot(y, pch="+") plot(y, pch="+") plot(y, pch="+") produces a pdf that is viewable in Preview (copied from the clipboard) but fails to print. pch default or ="." or =3 prints. Unfortunately pch=3 doesn't fix the mfrow=c(5,6) graph that I'm actually trying to print, so the bug lies
2009 Jun 03
2
Problems with plot and Quartz device (PR#13744)
Full_Name: Thomas Richardson Version: R 2.9.0 GUI 1.28 Tiger build 32-bit (5395) OS: 10.4.11 Submission from: (NULL) (216.254.15.72) I have encountered a problem with points in scatterplots disappearing in a quartz window when it is re-sized (to make it larger). I am constructing an 8x12 matrix of scatterplots each containing approx 600 points. In order to get them in the window I remove the
2013 Apr 07
5
Duda con width y height. Resolución de pantalla
Buenas tardes: Por favor, ¿alguien me puede explicar este comportamiento?. Lanzo este código enun equipo con una pantalla de 21'''' y el resultado es correcto, tanto en la ventana gráfica como al guardar en pdf: quartz(title="Ventada de prueba", width=8.27, height=11.69, dpi=85) plot(1:10) Sin embargo, lanzado en un equipo con pantalla de 15'''', la
2006 May 25
3
missed ylim from plot.default
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060525/ef972e9f/attachment.pl
2008 Jul 20
4
drawing segments through points with pch=1
Please excuse me for asking such basic questions: Here is my code > y=c(1.21,0.51,0.14,1.62,-0.8,0.72,-1.71,0.84,0.02,-0.12) > ybar=mean(y) > ll=length(y); > ybarv=rep(ybar,ll) > x=1:ll > plot(x,ybarv,pch=1) > segments(x[1],ybar,x[ll],ybar) What I get is a collection of small circles, with a segment "on top" of the circles, which is almost what I want. But I
1997 Dec 14
1
R-beta: survival4 in R-0.60.1
Hi there, Here is a record of an R session: > library(survival4) Autoloading required package: splines > coxph(Surv(c(1,2,3,4), c(1,1,1,1)) ~ c(1,0,1,0)) Error in .C("coxfit2", iter = as.integer(iter.max), as.integer(n), as.integer(nvar), : C/Fortran function not in load table Why is "coxfit2" not in the load table? How do I fix it? System is Linux. Goran
2008 Oct 15
1
Confused with default device setup
When invoking dev.new() on my Mac OS X 10.4.11, I get an X11 window instead of quartz which I feel more desirable. So I'd like to set the default device to quartz. However I'm confused because of the following: > Sys.getenv("R_DEFAULT_DEVICE") R_DEFAULT_DEVICE "quartz" > getOption("device") [1] "X11" What's going on? Also is
2010 Apr 30
1
How to generate a distance matrix?
Hi, I'm trying to generate a distance matrix between sample pairs (example below). I'm not very familiar with the loop command which I expect I will need for this. The example below demosntrates what I'd like to get out of the data - essentially, to calculate the proportion of positions where two samples differ. Any help much appreciated! Also, any notes on how the functions work
2013 Sep 02
1
Sweave: printing an underscore in the output from an R command
I am working with Sweave and would like to print out into my latex document the result of the R command version$platform So what I first tried in my .Rnw document was \Sexpr{print(version$platform)}. However, the output from this command is the string "x86_64-apple-darwin10.8.0" (without the quotes). This contains an underscore, which is a special character in tex and so I get an error
2012 Aug 01
3
help with a regression problem
Hello, I have a big data frame where consecutive time dates and corresponding observed values for each subject (ID) are on a line. I want to compute the linear slope for each subject. I would like to use apply but I do not know how to express the corresponding function. An example using a loop follows # # create dummy data set There are missing values a <- c(1,2,3,4, 1,1,1,1, 2,2,3,3,
2006 Sep 26
5
putting stuff into bins...
Hi All, I have a vector of data, a vector of bin breakpoints and I want to put my data in the bins and then extract fanciful informations like the mean value of each bin. I know I can write my own function, but I would have thought that R should have somewhere a function that took as arguments something like (data, breaks, what to do with the data in the bins). I surey could not find it