Displaying 20 results from an estimated 2000 matches similar to: "How to label a polygon window (spatstat package)"
2018 Feb 10
0
How to label a polygon window (spatstat package)
Try
text(0.5, 0.5, label = "?text")
On Sat, 10 Feb 2018, 16:22 Mohammad Tanvir Ahamed via R-help, <
r-help at r-project.org> wrote:
> Hi,
> I want to label a polygon (circle or polygon) inside.
> As for example code
>
> library(spatstat)
> x <- runif(20)
> y <- runif(20)
> X <- ppp(x, y, window=disc(0.7))
> plot(X)
>
> Now I want to
2020 Oct 05
0
data error problem
Hi,?In your data file, the first row does not have an equal number of column like the rest of the row.Check your data file. Specially 1st row.??
Regards.............Tanvir Ahamed Stockholm, Sweden | mashranga at yahoo.com
On Monday, 5 October 2020, 08:11:48 am GMT+2, Mir Md. Abdus Salam <mir.salam at uef.fi> wrote:
Dear all,
I need urgent help. I am a new user of R. I
2017 Sep 04
1
Merge by Range in R
Hi,?
I have two big data set.?
data _1 :?
> dim(data_1)
[1] 15820 5
> head(data_1)
? ?Chromosome ?????Start????????End????????Feature GroupA_3
1: ? ? ? ????????chr1 521369 ?750000 ????chr1-0001 ? ?????0.170
2: ? ? ? ????????chr1 750001 ?800000 ????chr1-0002 ? ????-0.086
3: ? ? ? ????????chr1 800001 ?850000 ????chr1-0003 ? ?????0.006
4: ? ? ? ????????chr1 850001 ?900000 ????chr1-0004 ?
2017 Nov 28
0
Extract all point in a quadrats by spatstat package
Hi,
With the following code i can divides window into quadrats and counts the numbers of points in each quadrat.
library(spatstat)
X <- runifpoint(50)
quadratcount(X)
quadratcount(X, 4, 5)
quadratcount(X, xbreaks=c(0, 0.3, 1), ybreaks=c(0, 0.4, 0.8, 1))
qX <-? quadratcount(X, 4, 5)
plot(X)
plot(qX, add=TRUE)
But I want to mark each? quadrats? and select/ extract only those points by
2020 Oct 04
2
data error problem
Dear all,
I need urgent help. I am a new user of R. I got the following error
anovamine<-read.table("spike cu.txt",header=TRUE)
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
line 1 did not have 9 elements
Can anybody please help me to solve this problem why I am getting such kind of error?
Thanks
[[alternative HTML version deleted]]
2011 Apr 14
1
if (cond) expr1 expr2 ??
hi , this can be done easily if (cond) expr
ex:
> for (i in 1: 4)+ {+ if(i==2) print("a")+ if(i==2) print("b")+ }
output : [1] "a"[1] "b"
but i want this
if (cond) expr1 expr 2
i tried this :
> for (i in 1: 4)+ {+ if(i==2) (print("b") && print("a"))+ }
output : [1] "b"Error in print("b") &&
2013 May 07
1
Problem with biomaRt::getSequence.
Hi,
I can run the code some days ago . But cant run now.
Problem 1: Output is ok
ensembl = useDataset("hsapiens_gene_ensembl",mart=ensembl)
utr5 = getSequence(chromosome=3, start=185514033, end=185535839, type="entrezgene",seqType="5utr", mart=ensembl)
Output :
5utr
2013 Feb 08
1
Conflict command getSequence {biomaRt} and getSequence {seqinr} !!
Hi !
Facing problem with " getSequence" commend .
when only biomaRt package loaded the following example working well
>mart <- useMart("ensembl",dataset="hsapiens_gene_ensembl")
>seq = getSequence(id="BRCA1", type="hgnc_symbol", seqType="peptide", mart = mart)
show(seq)
but when i have loaded the seqinr, i got problem
2011 Apr 18
1
Reorder a data frame according a column randomly reordered.
Hello all ,
I have a data frame like this
X1X2X3
11815
22916
331017
441118
551219
661320
771421
now i want to randomly reorder the variable X2 but the row element should be same
as for example
X1X2X3
12916
251219
331017
471421
561320
61815
741118
how can i do that ??
Hint :
this could be helpful :
if X2 is only a vector like this
X2<-c(8,9,10,11,12,13,14)
so i can easily reorder
2020 Oct 04
3
how to get a numeric vector?
Hi,
a <- c(1, 4)
b <- c(5, 8)
a:b
[1] 1 2 3 4 5
Warning messages:
1: In a:b : numerical expression has 2 elements: only the first used
2: In a:b : numerical expression has 2 elements: only the first used
how to get:
c(1:5, 4:8)
Thanks.
2016 Aug 04
2
[FORGED] Re: polypath winding rule with transparency
Hi
Just to clarify, I think this IS a problem with grid.path() as well as
polypath().
For the example you give, grid.path() diverts to drawing a polygon
(because there is no 'id' specified), and the NAs in 'x' generate two
separate polygons, which get drawn one on top of the other.
The correct analogy to the polypath() example is ...
x2 <- matrix(x[!is.na(x)], ncol=2)
2016 Aug 03
2
polypath winding rule with transparency
Hi, I see different results in png() and pdf() for polypath() on Windows
when using the "winding" rule
## overlapping, both clock-wise
x <- cbind(c(.1, .1, .6, .6, NA, .4, .4, .9, .9),
c(.1, .6, .6, .1, NA, .4, .9, .9, .4))
pfun <- function() {
plot(x)
polypath(x * 0.8 + 0.2, rule = "winding", col = "#BEBEBE80")
polypath(x, rule =
2017 Jun 01
0
[spatstat] Convert shapefile to pixel image
On 02/06/17 01:17, Lluis.Hurtado at uv.es wrote:
> Dear all,
>
> I am currently working with the spatstat package, using windows and pixel images.
>
> First:
>
> My aim is to transform a shapefile (see attached) into a pixel image.
>
> My idea is to start transforming the shapefile into a Spatial Polygon file:
>
> x <-
2017 Apr 24
1
polypath winding rule with transparency
On Thu, 4 Aug 2016 at 17:53 Michael Sumner <mdsumner at gmail.com> wrote:
> On Thu, 4 Aug 2016 at 11:17 Paul Murrell <paul at stat.auckland.ac.nz> wrote:
>
>> Hi
>>
>> Just to clarify, I think this IS a problem with grid.path() as well as
>> polypath().
>>
>>
> Hi, oh dear - sorry about that
>
> I appreciate the deeper explanation, I
2017 Jul 24
0
Compare output of Violin plot from ggplot2 and vioplot . Need Explanation
Hi,?
I have made violin plot with both ggplot2 and vioplot package with same data.?
The results and code are as follows.?
################### ?Loading data?
data.melt <- dget("https://gubox.box.com/shared/static/rirth0eym114afwyjxwe128sjzipzdym.txt")
################### ?Violin plot by library(vioplot)
library(vioplot)
data.use_11<- data.melt$value[data.melt$ident == 0]
2017 Apr 19
2
ask.yes.no() function
As described in
<https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17242>, R base
functions are currently inconsistent in asking interactive "yes/no" type
questions. One solution to this is to have a function to do it, and to
use it consistently.
Rather than just writing such a function and possibly missing some
desirable feature, I'd like to ask if anyone can point
2017 Jun 01
3
[spatstat] Convert shapefile to pixel image
Dear all,
I am currently working with the spatstat package, using windows and pixel images.
First:
My aim is to transform a shapefile (see attached) into a pixel image.
My idea is to start transforming the shapefile into a Spatial Polygon file:
x <- readShapeSpatial("200001441.shp")
y <- as(x, "SpatialPolygons")
z <- as.owin(y)
Given z, I want to identify each
2018 May 24
2
Problem with adding a raster and a brick
Hi,
I seem to be having a problem adding the following two raster objects
together - one is a rasterLayer, the other is a rasterBrick. The extent,
resolution, and origin are the same, so according to my understand it
should work. The objects look like so:
> obs.clim
class : RasterLayer
dimensions : 60, 200, 12000 (nrow, ncol, ncell)
resolution : 0.5, 0.5 (x, y)
extent : -70,
2018 Feb 13
3
Suppress horizontal mean line in beanplot()
Hi,
I would like to use the beanplot() function from the beanplot package.
Unfortunately, I can't find out how to suppress the dashed horizontal
line, that shows the overall mean.
In the help I've found the argument "overallline", but it only allows
for "mean" or "median" .
I have tried overallline = F, overallline="n", and
2012 Apr 01
4
map and shapefile help
Hi,
I want to use map("state") and have the ecoregion shape (please see link)
file projected onto this.
ftp://ftp.epa.gov/wed/ecoregions/cec_na/NA_CEC_Eco_Level3.zip
ftp://ftp.epa.gov/wed/ecoregions/cec_na/NA_CEC_Eco_Level3.zip
Could someone please show me how; I have never messed with this sort of
thing.
Thanks.
--
View this message in context: