similar to: Contour plot overlayed with line plot

Displaying 20 results from an estimated 5000 matches similar to: "Contour plot overlayed with line plot"

2006 Jul 02
1
Optional variables in function?
I'm a bit new to writing R functions and I was wondering what the "best practice" for having optional variables in a function is, and how to test for optional and non-optional variables? e.g. if I have the following function: helpme <- function(a,b,c) { } In this example, I want c to be an optional variable, but a and b to be required. How do I: 1) test to see if the user
2006 Oct 20
1
Questions about date/time and truncating
I'm getting a weird behavior using R 2.5.0 for MacOS X -- I have a csv file with a "properly formatted" date/time field, e.g. After reading in the csv to "hourly_met_data", with a "date" field hourly_met_data$date <- as.POSIXct(hourly_met_data$date) works exactly as it is supposed to (e.g. Min/max of that field are calculated correctly). However, when I
2006 Sep 23
2
Question about merge()
If I want to do a join based on *two* matching fields in two data frames, can merge() handle this? It appears to only handle a single matching column -- do I need to make a "metacolumn" or is there some way to do this? E.g.: Dataframe 1 contains columns A,B,C and Dataframe 2 contains A,B,D I want an output A,B,C,D which places C and D together if A and B match (otherwise, make two
2006 Nov 02
2
poly() question
Besides the primary citation, "Kennedy, W. J. Jr and Gentle, J. E. (1980) Statistical Computing Marcel Dekker." (which is $300 and my library doesn't have it), is there any other documentation on how to take a poly() object and predict "by hand" new data? E.g. What do those coefficients actually mean ("The orthogonal polynomial is summarized by the coefficients, which
2006 Sep 23
3
Data frames questions
Hi there, couple of questions on data frames: 1) Is there a way to build an empty data frame, containing nothing but the data frame variable names? 2) Is there a way to reorder the variables in a data frame, e.g. When I go to write out a data frame using write.table or write.matrix, I want the output in a certain order... 3) How to I "append" to the bottom of a dataframe? Thanks! --j
2008 Oct 29
1
Suppressing internal grid in filled.contour
Rers: I can't seem to locate the command to suppress what appears to be a faint internal grid when running the following command to make a filled contour plot of some data I have (x,y,z being the inputs):
2004 Feb 19
4
1024GB max memory on R for Windows XP?
I have 2GB installed on my windows XP box running R 1.9.0, and after performing a prune.tree(intree,newdata), I get an out of memory error within R, but it says the maximum allowed is 1024gb (1/2 of what I have!) Can R not use more than 1GB on an XP box? I noticed I had ~600mb left over after R conked out, so clearly I had more memory... What about virtual memory? --j -- Jonathan Greenberg
2013 Apr 16
4
Singular design matrix in rq
Quantreggers: I'm trying to run rq() on a dataset I posted at: https://docs.google.com/file/d/0B8Kij67bij_ASUpfcmJ4LTFEUUk/edit?usp=sharing (it's a 1500kb csv file named "singular.csv") and am getting the following error: mydata <- read.csv("singular.csv") fit_spl <- rq(raw_data[,1] ~ bs(raw_data[,i],df=15),tau=1) > Error in rq.fit.br(x, y, tau = tau, ...) :
2012 May 02
6
Quickest way to make a large "empty" file on disk?
R-helpers: What would be the absolute fastest way to make a large "empty" file (e.g. filled with all zeroes) on disk, given a byte size and a given number number of empty values. I know I can use writeBin, but the "object" in this case may be far too large to store in main memory. I'm asking because I'm going to use this file in conjunction with mmap to do parallel
2013 Jul 12
2
"Proper" way to use a "hidden" function in an R-package?
R-developers: I'm working on updating my R package "spatial.tools", and one thing I was wondering was the proper way to have hidden functions -- should I simply not export them to the namespace and use the ::: operator to call them (which is what I currently do)? --j -- Jonathan A. Greenberg, PhD Assistant Professor Global Environmental Analysis and Remote Sensing (GEARS)
2013 Sep 27
2
Error: C stack usage is too close to the limit when using list.files()
R-helpers: I'm running a file search on my entire drive (Mac OS X) using: files_found <- list.files(dir="/",pattern=somepattern,recursive=TRUE,full.names=TRUE) where somepattern is a search pattern (which I have confirmed via a unix "find / -name somepattern" only returns ~ 3 results). I keep getting an error: Error: C stack usage is too close to the limit when
2006 Oct 21
1
ReadLines question
I'm getting the following error: > headerinfo=readLines(met_station_file,n=8) > headerinfo [1] "Plot Title: tahoe met validation ,,,,,,," [2]Error: invalid multibyte string met_station_file's first 8 lines are as follows: Plot Title: tahoe met validation ,,,,,,, #,"Time, GMT-07:00","Temp, ?F",Coupler Attached,Host Connected,Coupler
2005 Apr 20
1
overlaying a contour line in a levelplot
Hello there, I am creating a series of images using levelplot but I also want to overlay a contour for a particular value as reference. Here is the levelplot command for the image: print(levelplot(d~x+y,data=t,cuts=20,scales=list(draw=F),xlab=NULL,ylab= NULL,col.regions=heat.colors(100)[100:1]),split=c(1,1,1,1),more=T) and then to add the contour plot (I only want a contour at level 5):
2012 Apr 05
4
Best way to search r- functions and mailing list?
R-helpers: It looks like http://finzi.psych.upenn.edu/search.html has stopped spidering the mailing lists -- this used to be my go-to site for searching for R solutions. Are there any good replacements for this? I want to be able to search both functions and mailing lists at the same time. Cheers! --j -- Jonathan A. Greenberg, PhD Assistant Professor Department of Geography University of
2011 Nov 21
3
How do I query "..." in a function call?
This is probably a very noobish question, but if I want to create a function that allows an undetermined number of, say, numeric vectors to be fed to it, I would use: myfunction = function(...) { # Do something } Right? If so, how do I a) count the number of vectors "fed" to the function, and b) how do I treat those vectors as variables, e.g. for the call:
2004 Feb 13
2
Readbin and file position
I have a binary file which is an image with multiple bands, arranged in BSQ format such that R, B and G are all N x M sized matrices (corresponding to Red, Blue and Green colors respectively). The BSQ file arranges the data as [R, B, G], so to access the B matrix, I have to read forward N x M + 1 number of samples. Is there a fast way to define a variable as the B matrix exclusively (e.g. Can I
2013 Jan 22
2
Adding a line to barchart
R-helpers: I need a quick help with the following graph (I'm a lattice newbie): require("lattice") npp=1:5 names(npp)=c("A","B","C","D","E") barchart(npp,origin=0,box.width=1) # What I want to do, is add a single vertical line positioned at x = 2 that lays over the bars (say, using a dotted line). How do I go about doing this?
2004 Jan 31
1
about contour - get contour coordinates - exclude area display
Dear all, I wonder about what could actually be possible with the function "contour": 1/ - the definition of contour lines is most often meaningless when the contours are drawn in areas where no real data points exist. It can however happen that irregular distributions lead to more or less irregular clouds of data points. Interpolations (eg: loess regression, GLM, etc...) are however
2003 Aug 13
1
Contour plot for arbitrary (x,y,z)
Hello. Is there an easy-to-use contour plot function analogous to scatterplot3d that can draw handle a dataset of arbitrary (x,y,z) triplets? That is, say x, y, and z are each measured quanties, and exhibit neither order nor regularity. I looked at the lattice package function "contourplot" but it seems complicated, and it's not clear from the documentation whether it can
2003 Mar 19
2
Center of Closed Contour
I am searching for a utility in R which will determine the mean location of a closed contour and eventually record the location in an ASCII file. By means of the contour utility in R, I am able to produce an image of a contour, but I am seeking a procedure which will produce the coordinates of the center of mass of the contour. From my actual set of data, the contour utility will produce several