similar to: sub('^','var',1:3) produces unexpected results

Displaying 20 results from an estimated 1000 matches similar to: "sub('^','var',1:3) produces unexpected results"

2005 Mar 23
2
sub('^', .....) bugs (PR#7742)
>>>>> "David" == David Forrest <drf5n@maplepark.com> >>>>> on Tue, 22 Mar 2005 15:02:20 -0600 (CST) writes: David> According to help(sub), the ^ should match the David> zero-length string at the beginning of a string: yes, indeed. David> sub('^','var',1:3) # "1" "2" "3"
2004 Aug 27
1
Plotting irregular grid as image or persp
Hi, I have an array of 2d node locations and an array triangles, and would like to plot something like a image or persp. An example of doing it with rgl is: library(ncdf) library(rgl) # wget http://www.maplepark.com/~drf5n/extras/teapot.nc teapot<-open.ncdf("teapot.nc") z<-get.var.ncdf(teapot,"tris") l<-get.var.ncdf(teapot,"locations")
2007 May 04
1
Partitioning a kde2d into equal probability areas
Hi, I'd like to partition a 2d probability density function into regions of equal probability. It is straightforward in the 1d case, like qnorm(seq(0,1,length=5)) but for 2d I'd need more constraints. Any suggestions for how to approach this? Is seems like a spatial sampling problem but I'm not sure where to look. Thanks for your time, Dave -- Dr. David Forrest drf at
2006 Feb 21
1
color quantization / binning a variable into levels
Hi all, I'd like to quantize a variable to map it into a limited set of integers for use with a colormap. "image" and filled.contour" do this mapping inside somewhere, but I'd like to choose the colors for plotting a set of polygons. Is there a pre-existing function that does something like this well? i.e., is capable of using 'breaks'?
2004 Aug 25
0
Q: how to submit documentation patches?
I don't want to gripe here, but I would like to know the best method for submitting suggestions and patches to the documentation. It looks like for many help items, we need to track from the html file which help.search("*")/help("*") presents, back to the authoritiative documentation file from which they are generated. It seems the installation process discards much of
2005 Jun 14
0
Plotting quiver vector tensor arrows 2d field data
Hi All, I'd like to plot something like http://www.nawcwpns.navy.mil/~weather/mugu/mesodata/analysis.html Looking through the galleries at http://addictedtor.free.fr/graphiques/allgraph.php http://r-spatial.sourceforge.net/gallery/ http://fawn.unibw-hamburg.de/cgi-bin/Rwiki.pl?GraphGallery demo(graphics) I did not find a function to plot a 2d field on a matrix. I did find mention of a
2007 Jan 11
1
zero margin / marginless plots
Hi, I'd like to produce a marginless or zero margin plot so that the pixel coordinates represent the mathematics. xy<-data.frame(x=c(0,1,1,0,0),y=c(0,1,0,0,1)) png('junk.png',width=300,height=300) par(mar=c(0,0,0,0)) plot(xy$x,xy$y,xlim=c(0,1),ylim=c(,1)) dev.off() The resultant file has about a 10 pixel margin around these lines, and I'm not sure what parameter or function
2007 Jan 08
1
Does strptime(...,tz="GMT") do anything?
Hi All In trying to correlate some tide gauge data I need to deal with varying timezones. From the documentation on strptime, it seemed that the tz variable might have some effect on the conversion, but I'm not seeing an effect. > strptime("20061201 1:02 PST",format="%Y%m%d %H:%M",tz="PST")+0 [1] "2006-12-01 01:02:00 EST" >
2005 Jun 09
1
Plot/manage spatial boundary data
I have some disconnected boundary data from a finite element ocean model and I'd like to make a plot. Maptools looks promising, but since my data is not in a shapefile or a map, I'm unclear on what the best way to approach the problem. >geom[1:10,] lon lat depth 1 -75.42481 35.58192 16.172 2 -75.40726 35.58567 18.045 3 -75.41351 35.60312 17.333 4 -75.38888 35.58959
2004 Sep 17
3
Removing constants from a data frame
Suppose I have x<-data.frame(v1=1:4, v2=c(2,4,NA,7), v3=rep(1,4), v4=LETTERS[1:4],v5=rep('Z',4)) or a much larger frame, and I wish to test for and remove the constant numeric columns. I made: is.constant<-function(x){identical(min(x),max(x))} and apply(x,2,is.constant) # Works for numerics x[,-which(apply(x,2,is.constant))] I'd really like to be able to
2003 Jul 11
3
postscript/eps label clipping
The following code produces an eps file with the tops of each of the ylabs clipped off. par(mfrow=c(2,2)) plot(runif(10), ylab="Function(Lengthy Expression)",xlab="Prediction") plot(runif(10), ylab=expression(Delta * Beta^2),xlab="Prediction") plot(runif(10), ylab="Function(Lengthy Expression)",xlab="Prediction")
2003 Jun 24
1
Reading graphics files
Is there a tool for reading a graphics file into an object? I might not be looking with the correct vocabulary, but I'm finding lots of references to producing graphics from R, but not any for inputting graphics into R. I'd like to use a jpeg image and have the data available in R for analysis. I could convert the image to another format, PPM perhaps, and parse that in, GRASS seems like
2005 Jun 06
9
R Graph Gallery : categorization of the graphs
Hello all, It seems that the next improvement to the R Graph Gallery is categorization of the graphics, that way each graph will be easier to find. That step should be done *carefully* if we want to avoid the opposite side-effect : graph not reachable through the categories. That's why the wisdom of the R community is required. Graphics will be classified in : - categories -
2005 Aug 24
0
summary: Call SAS from R
Thanks for all the insightful responses that help me solve my problem. The original question is: how to call SAS from R The solution is as below: If my sas code, test.sas, is in directory c:\ncme06\sas codes, then the following codes works > system('"c:\\program files\\sas institute\\sas\\v8\\sas.exe" "c:\\ncme06\\sas codes\\test"') Things to notice: 1. need a
2004 Dec 08
2
what about a mascot ?
My friend Veslot proposed me the Raven ! http://www.teteamodeler.com/allopass/images/corbeau.jpg As a matter of fact the intelligence of this bird is comparable to one of a monkey, although its brain is close to a reptile brain. R is quite the same : small, compact, but so clever. This is a canadian website explaining (in french) the R-aven intelligence
2007 Mar 12
3
reading BMP into R
Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070312/112cd7f9/attachment.pl
2007 Mar 27
1
Using nnet
I have a problem when using nnet to predict the negative values. For example : X = matrix(c(1,1,0,0,1,0,1,0),4,2) X Y = matrix(c(0,1,1,0)) - 0.5 # XOR - 0.5 Y nn = nnet(X,Y,size=3) val = predict(nn,X) val # this is expected to be close to Y, but it's not ! The 'val' is always positive. I tried to change the options, but the result isn't much better. Could someone give me an
2005 Apr 01
2
(no answer)
I wish to perform brain surgery this afternoon at 4pm and don't know where to start. My background is the history of great statistician sports legends but I am willing to learn. I know there are courses and numerous books on brain surgery but I don't have the time for those. Please direct me to the appropriate HowTos, and be on standby for solving any problem I may encounter while
2007 Apr 24
5
Random Number Generator of Park and Miller
Hi, I failed to search for R package providing random number generator of "Park and Miller". Anyone know any R package supporting this kind of function? Thanks, Grace -- View this message in context: http://www.nabble.com/Random-Number-Generator-of-Park-and-Miller-tf3636501.html#a10154554 Sent from the R help mailing list archive at Nabble.com.
2004 Dec 09
3
US 2004 Elections map
even for people who didn't like the outcome of the US elections this year, it must have been a joy to see all the nice (and not so nice) graphs that were shown. As an exercise, I recreated the map shown on the NY-Times website [ http://www.nytimes.com/packages/khtml/2004/11/03/politics/ 20041103_px_ELECT_GRAPHIC.html ] If you're interested,