On Wed, 24 Dec 2014, Bert Gunter wrote:
You are again misinterpreting because you have not read the docs,
although this time I will grant that they are to some extent misleading.
First of all, a matrix _IS_ a vector:
a <- matrix(1:4, 2,2)
a[3] ## vector indexing works because it is a vector
You are again misinterpreting because you have not read the docs,
although this time I will grant that they are to some extent
misleading.
First of all, a matrix _IS_ a vector:
> a <- matrix(1:4, 2,2)
> a[3] ## vector indexing works because it is a vector
[1] 3
In fact, a matrix (or array) is a
On Wed, 24 Dec 2014, Jeff Newmiller wrote:
On December 24, 2014 6:49:47 PM PST, Mike Miller wrote:
On Wed, 24 Dec 2014, Mike Miller wrote:
Also, regarding the sacred text, "x A numeric." is a bit terse. The
same text later refers to length(x), so I suspect that "A numeric" is
short for "
But all numeric types in R are vectors. So although it might be a good idea to
be redundant to aid beginners, the phrase "a numeric" is accurate.
---
Jeff NewmillerThe . . Go Live...
On Wed, 24 Dec 2014, Mike Miller wrote:
Also, regarding the sacred text, "x A numeric." is a bit terse. The
same text later refers to length(x), so I suspect that "A numeric" is
short for "A numeric vector", but that might not mean "a vector of
'numeric' type."
I just realized that numeric
Help with finding R tutors for microarray analysis, next generation
sequencing and constructing gene interaction networks needed
Hi
I am a visually impaired bioinformatics graduate student using microarray
data for my master’s thesis aimed at deciphering the mechanism by which the
yeast wild type
Dear Michael,
Thank you very much for your reply. The more complete information is as
follows:
I want to do a mediation analysis following the below-mentioned syntax
from:
http://www.biomedcentral.com/content/supplementary/1471-2288-14-9-s1.pdf
I did not define categorical variables as logical v
> ave( as.character(1:5), gl(2,2,5), FUN=length )
[1] "3" "3" "2" "2" "3"The output has character type, but it is supposed
to be a collection of vector lengths.
ave() uses its first argument, 'x', to set the length of its output and to
make
an initial guess at the type of its output. The re
Mike,
The output is only limited by available RAM and the maximum permissible length
for vectors. And you can test it fairly easily.
vec <- sample(1:2000,1,replace=TRUE)
Dan
Daniel J. Nordlund, PhD
Research and Data Analysis Division
Services & Enterprise Support Administration
Washington
On Wed, 24 Dec 2014, Nordlund, Dan (DSHS/RDA) wrote:
For your character vector example, this will get you the counts.
table(charvec)[charvec]
Hope this is helpful,
It does help, Dan! I came up with the same idea and expanded on it a bit
to work properly with other kinds of vectors:
as.v
On Wed, 24 Dec 2014, Bert Gunter wrote:
You said:
"The elements of the first vector are irrelevant because they are only
counted, so we should get the same result if it were a character
vector, but we don't: "
You don't get to invent your own rules! ?ave -- always nice to read the
Help docs **
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Mike
> Miller
> Sent: Wednesday, December 24, 2014 11:31 AM
> To: R-Help List
> Subject: [R] ave(x, y, FUN=length) produces character output when x is
> character
>
> R 3.0.1 on Linux 64...
>
> I was wo
You said:
"The elements of the first vector are irrelevant because they are only
counted, so we should get the same result if it were a character
vector, but we don't: "
You don't get to invent your own rules! ?ave -- always nice to read
the Help docs **before posting** -- clearly states that the
R 3.0.1 on Linux 64...
I was working with someone else's code. They were using ave() in a way
that I guess is nonstandard: Isn't FUN always supposed to be a variant of
mean()? The idea was to count for every element of a factor vector how
many times the level of that element occurs in the f
A while ago I wrote for a questioner on this list a function, 'f1', below,
that would give the start and stop times of runs of data that started when
then the data went above a threshold and stopped when it first dropped
below a different (lower) threshold). It used no loops and was pretty
quick.
Dear expert,
I want to get the calucation from heatmap.2. But I do not want to do the plot.
Is there any trick do this, e.g, plot=FALSE in heatmap.2?
hm <- heatmap.2(dat.mat,
col=greenred(75),
dendrogram="none",
scale="row",
?
Dear R users,
I'm currently analysing some data with the gam function from the mgcv package.
I'm looking at the relationship between spatially referenced budburst dates
(recorded as number of days from January 1st) and two continuous variables, and
their interaction, where they are found. I
Hi,
I have an edgelist network data (undirected) with multiple graphs like
this. For each graph (i.e., denoted by doc.id), I want to calculate the
shortest path length (SPL) between the nodes. By using the code attached
below, I can only calculate the SPL for only 1 graph at a time. How can I
handl
yes, exactly!
all these dependencies were missing plus some other were corrupted (but
frankly I do not know why and how)
now everything seems working fine...
thanks a lot
my best season's greetings
m
> I think you need to have curl-config installed. I had a similar
> problem on Ubuntu and fo
> On 23 Dec 2014, at 23:57 , Pooya Lalehzari wrote:
>
> Hello,
> I have a data.frame (below) containing the two fields of "Value" and "Signal"
> and I would need to create the third field of "To_Be_Produced". The condition
> for producing the third field is to carry the 1 in the "Signal" field
20 matches
Mail list logo