Displaying 20 results from an estimated 8000 matches similar to: "placing labels in polygon center ?"
2009 Feb 05
1
Does the "labpt" object in the Polygons-class represent the centroid of the polygon
Hello,
I need to calculate the centroids of some spatial polygons that I have
placed into a Polygons-class object. Is the labeling point in the
Polygons-class the centroid of the polygon?
Thank you for your help.
2012 Feb 06
1
ggplot2 geom_polygon fill
Hi everyone,
i've been trying to make a special plot with ggplot2, but I can't get it to
fill the polygon I'd like to see filled so very very much.
I want to display the difference or change in the distribution of the
modified Rankin Scale between two groups. mRS is a scale for disability or
daily activities competence.
It looks like this.
2008 Aug 19
4
spatial probit/logit for prediction
Hello all,
I am wondering if there is a way to do a spatial error probit/logit model in R? I can't seem to find it in any of the packages. I can do it in MATLAB with Gibbs sampling, but would like to confirm the results. Ideally I would like to use this model to predict probability of parcel conversion in a future time period. This seems especially difficult in a binary outcome model
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
2011 Jul 09
1
SpatialPolygonsDataFrame holes problem
I have obtained shapefiles for Indian states from here:
http://www.maptell.com/index.php?option=com_remository&Itemid=159&func=fileinfo&filecatid=115&parent=category
Problem: I want to extract centroid coordinates for each State, but there is some coding problem with the shapefiles that prevents this.
#Code:
#After extracting the shapefiles from the india_state.zip file, then:
2009 Apr 12
3
p-values from bootstrap - what am I not understanding?
Dear stats experts:
Me and my little brain must be missing something regarding bootstrapping. I
understand how to get a 95%CI and how to hypothesis test using bootstrapping
(e.g., reject or not the null). However, I'd also like to get a p-value from
it, and to me this seems simple, but it seems no-one does what I would like
to do to get a p-value, which suggests I'm not understanding
2002 Oct 02
6
help to make a map on R
Hi all,
I need a little help for construct an state's map on R.
The first problem is to get the data.
I have a datafile of longitude and latitude in the follow format:
trajectory latitude longtude
T -22.045618 -51.287056
T -22.067078 -51.265888
T -22.067039 -51.207249
T -22.059690 -48.089695
T -22.075529 -48.074608
T -22.072460 -48.044472
T -22.062767 -48.298473
T -22.077349
2002 Mar 28
3
Vectorizing closest match
If anyone has a very fast vectorized method for doing the following I would appreciate some help. I want to avoid outer() to limit memory problems for very large n.
Let
x = real vector of length n
y = real vector of length n
w = real vector of length m, m typically less than n/2 but can be > n
z = real vector of length m
For w[i], i=1,,,m, find the value of x that is closest to w[i]. In
2013 Mar 12
2
funtion equivalent of jitter to move figures on device
hello all,
I'm overlaying numerous scatter plots onto a map (done in PBSmodelling). In this case I'm placing each plot by setting par(fig) to the centroid of map polygons. The location/mapping part is not so important. There are cases of small overlaps for some plots (ie figures) so I'm keen to write or find a function that moves my small scatter plots so they don't overlap. A
2011 Dec 10
3
Overlaying density plot on forest plot
Dear R User,
Please, I am new to R. I want to overlay density plot for predictive interval pooled result in meta-analysis. http://addictedtor.free.fr/graphiques/graphcode.php?graph=114
Regards
Frank Peter
2006 May 02
2
Concave Hull?
I am modeling a trend surface using trmat and want to trim the resulting matrix to the area enclosed by my real data (i.e., remove all the extrapolated areas). I was using chull and in.chull to calculate the convex hull and change all the other values created by trmat to NA. However, my real data has portions that are slightly concave so chull would give me slivers that are extrapolations from
2010 Sep 23
2
dnorm
Dear R-users
Idea:
Plot a dnorm line using specific mean/sd to complete a histogram (skewed). xs:range of y-values, ys: dnorm function
Problem:
I expected to multiply the ys function with the sample size (n=250-300). I was wondering about a factor between 12'000 and 30'000 to match the size of the dnorm line with the specific histogram.
Thanks
Sibylle
hist(Biotree[Ld,]$Height2008,
2007 Oct 08
2
Fill a polygon with a pattern
What is the simplest (namely: minimum number of libraries or conflicts)
way to fill a polygon with a pattern?
For example, suppose I have (in a graphic file, like a jpeg) the
drawing of an "X". Then I fill a polygon (like a triangle) with
this pattern, and get something like:
X
XXX
XXXXX
XXXXXXX
(where the border "X"s could be truncated).
I searched the rimage
2009 Sep 03
2
How to do rotation for polygon?
Hi everyone,
I have coding for repeating pentagon as below:
plot(0:11,type="n")
for (i in 1:10 )polygon(rep(c(4,5,7,8,6)), i*c(.5,.3,.3,.5,.7), bor=2)
which are increasing vertically.
Now, I want to know how to rotate the pentagon, so that I will get pattern
like flower.
Basicly, repeating pentagon in circle.
Thanks alot for helping me to solve this problem.
--
Hemavathi
2008 Jan 19
1
show overstruck in plot legend
Hi,
I have a plot with type="o", or overstruck. Now I am trying to add the
legend, but I couldn't figure out how to show the overstruck type in the
legend. It seems that the legend only allows one to set lty. Does anyone
know how to show overstruck in the legend?
Thanks!
--
Tom
[[alternative HTML version deleted]]
2011 Nov 04
3
barplot as histogram
Hello:
I'm dealing with an issue currently that I'm not sure the best way to
approach. I've got a very large (10G+) dataset that I'm trying to create
a histogram for. I don't seem to be able to use hist directly as I can
not create an R vector of size greater than 2.2G. I considered
condensing the data previous to loading it into R and just plotting
the frequencies as a
2005 Oct 16
2
Animated lissajous
Here's some code to make lissajous dance. I've attached a small sample
GIF.
Cheers,
Rob Steele
robsteele at yahoo dot com
plot.lissajous = function(omega.x, omega.y, delta = 0, num.thetas = 200)
{
thetas = seq(0, 2 * pi, length = num.thetas)
xs = sin(omega.x * thetas + delta)
ys = cos(omega.y * thetas)
plot(xs, ys, type = 'l', lwd = 3, ann = FALSE, axes = FALSE)
}
2002 Jun 20
16
problem with predict()
Hi,
It is most probably just my R-ignorance, but I have following problem with
using predict(). I train the model using 164 cases and then I try to use
it on the data set with 35 cases, but I am getting 164 predictions ?
R-code below illustrates in more detail what I am doing.
Truly yours,
R
train = read.csv("train.csv", header = TRUE, row.names = "mol",
2006 Mar 16
2
DIfference between weights options in lm GLm and gls.
Dear R-List users,
Can anyone explain exactly the difference between Weights options in lm glm
and gls?
I try the following codes, but the results are different.
> lm1
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) x
0.1183 7.3075
> lm2
Call:
lm(formula = y ~ x, weights = W)
Coefficients:
(Intercept) x
0.04193 7.30660
> lm3
Call:
2011 Oct 24
1
using predict.lm() within a function
I've written a simple function to draw a regression line in a plot and
annotate the line showing the slope
with a label. It works, as I'm using it, when the horizontal variable
is 'x', but gives incorrect results otherwise.
What's wrong?
# simple function to show the slope of a line
show.beta <- function(model, x="x", x1, x2, label, col="black", ...)