Displaying 20 results from an estimated 7000 matches similar to: "overlay points on plot"
2004 Feb 17
4
importing ascii grids (for gstat)
Hello,
Is there anyone who could give me an example of how to import an ascii grid (i.e. ArcGIS exported raster) into R. I want to use it with gstat but don't know the appropriate import routine.
Thanks very much for your help.
Regards,
femke
Femke Reitsma
Graduate Student (ABD)
Geography Department
2181 LeFrak Hall
University of Maryland
College Park, MD 20742
Phone: 301-405-4121
2004 Feb 18
2
using names() as a variable in a formula
Greetings List,
I'm having some trouble with the use of the names function in a formula. Below is an example of something that works (i.e first line), and the second line is the same formula which doesn't. I want to be able to reference the column of the dataC table so I can run the variogram iteratively with a loop.
> v<-variogram(A1~1,loc=~x+y, dataC)
>
2004 Feb 26
6
adding header info to write.table
Hello,
Could someone please tell if there is a way to append header info to the top of an exported dataframe (exported with write.table). I want to append the following, which are the defininitions for an asciigrid:
ncols 532
nrows 999
xllcorner 510465
yllcorner 4766375
cellsize 30
NODATA_value -9999
Thanks very much,
femke
[[alternative HTML version deleted]]
2004 Feb 08
5
iterating over files in a directory with R
Hello,
I'm an R newbie and was wondering whether there are R commands for iterating over files in a directory. Basically what I want to do is to iterate over many files and apply some R functions to each file seperately.
e.g. for (each file in a directory) do { some R calculation with the info in that file }
Could someone please give me a pointer to how (or if) this might be done with R
2006 Aug 15
4
nls
Is there anyway to change any y[i] value (i=2,...6) to make following NLS workable?
x <- c(0,5,10,15,20,25,30)
y <- c(1.00000,0.82000,0.68000,0.64000,0.66667,0.68667,0.64000)
lm(1/y ~~ x)
nls(1/y ~~ a+b*x^c, start=list(a=1.16122,b=0.01565,c=1), trace=TRUE)
#0.0920573 : 1.16122 0.01565 1.00000
#Error in numericDeriv(form[[3]], names(ind), env) :
# Missing value or
2005 Jun 14
2
Dateticks
Hello. I am having the worst time converting x-axis date ticks to real
dates. I have tried several suggestions in online help tips and books to
no avail.
For example, the x-axis has 0, 50, 100, etc, and I want it to have
"6/17/03", "8/6/03" etc. See attached (sample).
Can anybody help me with this.
Here's my code:
ts.plot(date.attackmode.table[,1],
2006 Feb 09
2
nice log-log plots
Dear All,
I am trying to produce log-log plots in R and I was wondering if any of you have a 'template' for generating these with 'nice' labels and log-log grids?
I know I can set up axes individually and use the intervals I want, however, I will be producing a large number of these plots and would not like to do this manually for each of them + I am very new to R and at the
2005 Mar 03
4
plot question
I have the following simple situation:
tt <- data.frame(c(0.5, 1, 0.5))
names(tt) <- "a"
plot(tt$a, type = 'o')
gives the following plot ('I' and '.' represent the axis):
I
I
I X
I
I
I X X
I...........
1 2 3
what do I have to change to get the following:
I
I
I X
I
I
I X X
I.....................
1 2 3
2015 Sep 04
2
Añadir escala a un mapa
Hola a tod en s,
Este es el código principal que utilizo para diseñar mi zona de estudio (cuenca):
png("mapa_zona_estudio.png", units="in", width=9, height=8.5, res=300)
# Vamos a pintar los distintos instrumentos de medida sobre el mapa (junto con éste) y añadimos leyenda
ggmap(mapa, extend='device', legend="left", base_layer=ggplot(datos, aes(x=lon,
2005 May 25
3
Rounding fractional numbers to nearest fraction
Hi all,
I've got a matrix of fractional data that is all positive and greater than
zero that I would like to "loosely" classify, for lack of a better word. It
looks something like this :
1.07 1.11 1.27 1.59 0.97 0.76
2.23 0.98 0.71 0.88 1.19 1.02
What I'm looking for is a way to round these numbers to the nearest 0.25,
i.e. the above matrix would be
2004 Sep 24
3
Error with repeat lines() in function
I have a function that does some plotting. I then add lines to the
plot. If executed one line at a time, there is not a problem. If I
execute the function, though, I get:
Error in ans[[1]] : subscript out of bounds
This always occurs after the second lines command, and doesn't happen
with all of my data points (some do not have errors). Any ideas?
Thanks,
Sean
2004 Oct 07
3
Read.Table Reading a Text file
Dear R users and Helpers
I am beginner with using R and interested in carrying out certain task for my statistical research.
I am reading data for a text file, which could contain data in following pattern
x y
8 10
11 14
16 16
18 15
6 20
4 4
20 18
As per the example I have two columns and 7 rows of data in each.
However is real life data situation I may not know how many columns are present
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 Sep 19
3
How do I ensure that the polygon in spatstat::owin(poly=<polygon>) does not have “negative area”
I am a new user of the R spatstat package and am having problems creating a
polygonal observation window with owin(). Code follows:
library("maps")
library ("sp")`
library("spatstat")
mass.map <- map("state", "massachusetts:main", fill=T) # This returns
a data frame includding x and y components that form a polygon of
massachusetts mainland`
2016 Apr 20
2
overlay two facet_grid
Hi all,
Does anyone know how to overlay two facet_grids? I have two facet grids as following:
ggplot(data=df,aes(x=TE,y=TR,color="orange"))+geom_point()+facet_grid(FS+TRJ~OR+INV,labeller=label_both)+xlim(0,200)+ylim(0,10000)
ggplot(data=df,aes(x=TE,y=TR))+geom_point(aes(color=TST))+facet_grid(FS+TRJ~OR+INV,labeller=label_both)+xlim(0,200)+ylim(0,10000)
Thanks for any help!
Elahe
2003 Jun 19
1
Problem reading a PDF output
I generated a PDF output file of 10 plots. When I try to view it with
Adobe reader (R4 & R5), it will lockup the reader (it is consuming 100% of
the CPU) after presenting the 4th plot. I can generate the plots just fine
in Windows and as a postscript file reading it with GSview.
Is there anyway to tell what might be wrong with the PDF output? The file
is 890KB in size if anyone would like
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, ...) :
2014 Aug 28
3
PXE booting WinPE with UEFI architecture
Anyone have luck with pxechn32 and bootmgfw.efi?
I'm getting the "Unable to retrieve first package" issue as reported by others.
Really, any advice for UEFI booting into a winpe environment off of pxelinux 6.03 would be beneficial.
Jason Jones
Sr. Associate, Network Services | End User Computing
3947 N Oak St Ext | Valdosta, GA 31605
O +15137844955
E jason.s.jones at
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)
2002 Feb 22
1
Summary: read.table on Mac OS X, CARBON vs. DARWIN
Thanks a lot, James!!
The problem is fixed. On the version 1.4.0 Mac/darwin (the latest
available version for this system) the function read.table (which is
called from read.delim etc., too) has the bug you explained.
Inserting the row
nlines <- nlines+1
after
lines <- c(lines, line)
removes this bug.
M.
On Friday, February 22, 2002, at 02:33 PM, james.holtman at convergys.com