Displaying 20 results from an estimated 200 matches similar to: "rgeos - gBuffer, width by z-value"
2012 Dec 15
3
kruskalmc, significant differences while median values are the same
Dear list!
I work with multiple Kruskal-Wallis test (kruskalmc, package pgirmess), which evaluates differences in medians among groups (5 groups). A result of a test is significant differences among some groups, while median values are the same for 4 groups (using tapply). Why?
p.s.: number of samples in groups vary from 50 to 4900.
Thanks to all, OV
.
2011 Oct 25
0
Installing rgeos on Mac OS X 10.4 (was Re: "package 'stringr' does not have a name space"
I figured it out, at least enough to get rgeos's gSimplify 
function to work, which was my original goal; the stringr 
problem was with 0.2, however I got stringr 0.5 to install 
by changing the minimum version in DESCRIPTION from R2.11 to 
R 2.10. ...
Thanks for the help!
#############
# This is how I got rgeos to install in R GUI on my Intel 
Mac OS X 10.4:
#############
# stringr
2012 Jun 26
5
chisq.test
Dear list!
I would like to calculate "chisq.test" on simple data set with 70 observations, but the output is ''Warning message:''
Warning message:
In chisq.test(tabele) : Chi-squared approximation may be incorrect
Here is an example: 
        tabele <- matrix(c(11, 3, 3, 18, 3, 6, 5, 21), ncol = 4, byrow = TRUE)
        dimnames(tabela) <- list(
       
2012 Nov 17
3
transform input argument (matrix) of function
Dear list!
 
I would like to write a function to transform matrix, which is input argument of a written function. It is easy with new matrix (see below), but my idea is to transform input argument (matrix) of function without any additional matrixes. Here is an example:
fun1 <- function(xy) {
xy <- cbind(xy[,1], xy[,2], xy[,1] + xy[,2])
return(xy)
}
 
df1 <- matrix(c(1,2,3,1,2,3), ncol =
2012 Nov 07
1
row index for max values of row groups
Dear list members!
I am looking for ''nice solution'' for (maybe) simple problem. I need a code (small program) to calculate row index for max value (example below: df1$values) by groups (example below: df1$groups).
df1 <- data.frame(
groups = c(1,1,1,1,1,2,2,2,3,3,3,3),
values = c(1,1,1,2,1,1,2,3,2,1,4,3)
)
df1
expected results
> 4 8 11 # row index of max values by group 
2012 Nov 20
2
correct function formation in R
Dear list!
?
I have question of?'correct function formation'. Which function (fun1 or fun2; see below) is written more correctly? Using ''structure'' as output or creating empty ''data.frame'' and then transform it as output? (fun1 and fun1 is just for illustration).
?
Thanks a lot, OV
?
code:
input <- data.frame(x1 = rnorm(20), x2 = rnorm(20), x3 =
2011 Oct 22
1
setMethod "[" - extract by names within Slot
Hi R-helper!
I have problem with setMethods for "[". Here is example :
setClass("myClass", representation(ID.r = "numeric", ID.c = "character", DAT = "matrix"))
to.myClass <- function(ID.r, ID.c, DAT) {
    out <- new("myClass", ID.r = ID.r, ID.c = ID.c, DAT = DAT)
    return(out)
      }
      
setMethod("[",
2011 Oct 01
1
class definition
Hi everybody!
I have a matrix of class "myClass", for example:
myMat <- matrix(rnorm(30), nrow = 6)
attr(myMat, "class") <- "myClass"
class(myMat)
When I extract part of ''myMat'', the corresponding class ''myClass'' unfortunately disappear: 
myMat.p <- myMat[,1:2]
class(myMat.p)
Please for any advice / suggestions, how
2012 Feb 28
1
colour by z value, persp in raster package
Hi all!
 
My question is how to colour pixels by z value in persp plot in raster package. Here is an example:
 
 
x <- seq(-1.95, 1.95, length = 30)
y <- seq(-1.95, 1.95, length = 35)
z <- outer(x, y, function(a,b) a*b^2)
r1 <- raster(nrows=35, ncols=30, xmn=0, xmx=30, ymn = 0, ymx = 35)
r1[] <- c(z)
persp(r1)
 
There already exist some function to produce persp plot for anothe
2012 Apr 15
1
match values from data.frame and vector
Dear R helpers!
I have a vector 'x1' and data.frame 'df1'. Do you have any suggestion how to get vector x2, which will be a result of matching values from vector 'x1' and values from 'df1'? Please, see the example:
x1 <- c(rep(1,3), rep(NA,2), rep(2,4))
df1 <- data.frame(c1 = c(1,2), c2 = c(5,6))
I would like to get vector x2:
> x2
[1]  5  5  5 NA NA  6 
2012 Oct 30
1
mapply instead for loop
Hi all!
 
My question in about using mapply instead for loop. Below is a example with for loop: Is it posible to give same results with mapply function?
 
Thanks for help!
 
OV
 
x <- 1:10
y <- 1:10
xyz <- data.frame(expand.grid(x,y)[1], expand.grid(x,y)[2], z = rnorm(100))
names(xyz) <- c("x", "y", "z")
head(xyz)
size <- 2
output <- NULL
 
### for
2020 Oct 20
1
sp:gIntersection warning message about projection
Hi,
I am using in my workflow gIntersection from sp package. Part of my
relevant sessionInfo is:
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
other attached packages:
[1] CircStats_0.2-6 boot_1.3-25     MASS_7.3-53     stringr_1.4.0
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:
2011 Jul 14
1
calculating distance inland from coastline
Hi All, 
Does anybody know of any existing functions that will calculate distance
inland from a coastline?
It's possible to test if a lon,lat location is land or sea using
map.where(), but I need to add a buffer to this of say 2km, to allow for
points that are just on the coast, and below the resolution of the
worldHires database.
I'm working with a marine mammal satellite telemetry
2011 Jun 17
1
rgeos- installation help
Hello Everybody.
i am installing rgeo in R-2.13 on debian lenny. i am getting following
error. Can anybody help me why i m not able to compile rgeos.
rgeos_misc.c: In function ‘rgeos_hausdorffdistance’:
rgeos_misc.c:55: error: ‘GEOSHausdorffDistance_r’ undeclared (first use in
this function)
rgeos_misc.c:55: error: (Each undeclared identifier is reported only once
rgeos_misc.c:55: error: for
2011 Dec 20
2
rgeos on Linux requires GEOS 3.2.3, not 3.3.1
Some notes on installing rgeos in R 2.14.0 on a Linux Mint 11 (x86_64-pc-linux-gnu) machine
1. rgeos 0.1-15 will not run with GEOS 3.2.0-1, which is the version currently available on Synaptic package manager
2. I installed GEOS 3.3.1 (the latest version) from http://trac.osgeo.org/geos/, but rgeos will not run with this either
3. I then install GEOS 3.2.3, and now rgeos works fine!
It seems
2023 Apr 10
1
Retirement/archiving of rgdal, rgeos and maptools October 2023
The third report on the R-spatial evolution project has been published.
https://r-spatial.org/r/2023/04/10/evolution3.html
It links back to earlier blogs and presentations, and focuses on work that 
maintainers of R packages and workflows using rgdal, rgeos and maptools 
need to put in train now before the packages are archived on CRAN.
The first changes will occur in June 2023, and the
2023 Apr 10
1
Retirement/archiving of rgdal, rgeos and maptools October 2023
The third report on the R-spatial evolution project has been published.
https://r-spatial.org/r/2023/04/10/evolution3.html
It links back to earlier blogs and presentations, and focuses on work that 
maintainers of R packages and workflows using rgdal, rgeos and maptools 
need to put in train now before the packages are archived on CRAN.
The first changes will occur in June 2023, and the
2023 Oct 03
0
maptools, rgdal, rgeos and rgrass7 retiring Monday, October 16
The legacy R spatial infrastructure packages maptools, rgdal and rgeos will be archived by CRAN on Monday, October 16, 2023; rgrass7 has  already been replaced by rgrass and will be archived with the retiring packages. 
The choice of date matches the previously announced archiving during October 2023, and the specific date matches the release schedule of Bioconductor 3.18 (some Bioconductor
2023 Oct 03
0
maptools, rgdal, rgeos and rgrass7 retiring Monday, October 16
The legacy R spatial infrastructure packages maptools, rgdal and rgeos will be archived by CRAN on Monday, October 16, 2023; rgrass7 has  already been replaced by rgrass and will be archived with the retiring packages. 
The choice of date matches the previously announced archiving during October 2023, and the specific date matches the release schedule of Bioconductor 3.18 (some Bioconductor