Displaying 20 results from an estimated 4000 matches similar to: "how to get a numeric vector?"
2020 Oct 04
0
how to get a numeric vector?
Always hard to tell if THIS is a homework project. As with most things in R,
if you can not find at least a dozen ways to do it, it is not worth doing.
The question (way below) was how to take two vectors of length two and make
a longer results based on using the ":" operator to generate a range between
the first element of each array and then between the second elements and
return the
2018 Feb 10
2
How to label a polygon window (spatstat package)
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 label that circle inside . Can some one please help me ??
Thanks.?
Regards.............
Tanvir Ahamed
Stockholm, Sweden???? |??mashranga at yahoo.com
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 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]]
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 ?
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
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
2017 Dec 15
6
something weird has happened....!!!!!!!!!!
dear Members,
Today something weird has happened on my R console. I have attached two screenshots of the same vector in my R console but they differ.
Also one of my function returns negative values, even after double checking the code, which should return only positive values..
Whats wrong..? Reinstall R?
Thanks for help....
AKSHAY M KULKARNI
-------------- next part --------------
A
2011 Apr 13
5
Clearing Console; of weeks of codes!
Dear All:
I do see I have weeks of codes in my console when I check with my arrow up
keys. I have been clearing them with Control L but it seems to clear it
clear the screen temporally. I do see the previous codes again when I open R
the next day, after quitting the session!
Q:
How do I clear this?
Thanks;
YA
--
View this message in context:
2012 May 31
1
Repost: Expressions returned by GlobalEnv functions and package functions
Hello,
(Sorry for the repost, i am resending in plain text)
I have a function 'ewrap' (see below for definition).
It takes 3 expressions and returns another expression e.g.
map <- ewrap({
len <- length(r$addon)
rhcollect(len,1)
})
becomes:
expression({
NULL
result <- mapply(function(.index, k, r) {
{
len <- length(r$addon)
2006 Oct 11
6
Asterisk + E1 with MFC/R2 in Argentina?
Hello,
Has somebody installed this configuration: Asterisk + E1 with MFC/R2
(Telef?nica Argentina) in Argentina before? I need to know if it?s
possible with MFC/R2 argentine variation.
Thanks in advance.
R.R. Libera
2019 Mar 20
2
New extents structure proposal
I think the extents map is just too complicated and is unnecessarily
so. How about instead we define the plugin interface to be:
int can_extents (void *handle); // as before
int extents (void *handle, uint32_t count, uint64_t offset, uint32_t flags,
struct nbdkit_extents_list *list);
and have the extents_list be a simple list. The first extent you add
must start at offset.
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 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
2006 Oct 06
13
Need some help with latest win32-mmap
Hi all,
I''ve got the latest win32-mmap code checked into CVS. Unfortunately, it
seems that I''m not able to open an existing mapping and retrieve set
data. Below is a simple example that seems like it ought to work but
doesn''t. Any ideas?
# map1.rb
require ''win32/mmap''
include Win32
mmap = MMap.new(:name => ''alpha'', :size
2009 Jan 21
1
X matrix deemed to be singular;
Hello,
i'm tring to use a cox's model for a survival analysis. I have a dataset,
this is a part:
VOD SESSO fonte_sct donor RT_CGY STATOBMT TEMPO morto
1 0 F mid related 1200
CP 65 1
2 0 M mid 1200
2RC 5281 0
3 0 M mid unrelated 1200