Displaying 5 results from an estimated 5 matches for "looplessly".
Did you mean:
loopless
2012 Mar 26
2
Error during wrapup: incorrect number of dimensions
when subsetting a matrix results in a single row, it is converted to a
vector, not a matrix.
how do I avoid this?
1. __GOOD__
> edges <- get.edges(g,E(g))
> edges
[,1] [,2]
[1,] 0 2
[2,] 0 3
[3,] 0 4
[4,] 0 5
[5,] 1 1
[6,] 0 4
[7,] 0 6
[8,] 0 7
[9,] 0 8
[10,] 0 9
[11,] 0 5
[12,] 0 10
[13,] 0 11
2010 Aug 03
5
grep with search terms defined by a variable
Hi, I have a good grasp of grep() and gsub() for finding and extracting
character strings. However, I cannot figure out how to use a search term
that is stored in a variable when the search string is more complex.
#Say I have a string, and want to know whether the last name "Jannings" is
in the string. This is done by
names=c("Emil Jannings")
grep("Emil",names)
2011 Aug 08
2
2 questions on matrix manipulation in R
Hi there,
I have two questions on matrix manipulation. For the first one, I
want to calculate the product of each column of a matrix (say A) with
another vector (say b). That is, if A has 5 columns (a1, a2, a3, a4,
a5), I want to obtain a matrix with columns (a1*b, a2*b, aA3*b, a4*b,
a5*b). Can I do it directly, without using "for" loop?
For the second one, I have a matrix A of
2011 Oct 18
1
Function to "lump" factors together?
Sorry about the odd terminology, but I suspect that my intent might be
completely missed had I used "aggregate" or "classify" (each of which
appears to have some rather special meanings in statistical analysis and
modeling).
I have some data about software builds; one of the characteristics of
each is the name of the branch.
A colleague has generated some fairly interesting
2007 Oct 01
3
mean of subset of rows
Dear list,
this must be an easy one:
I have a data.frame of two columns, "ID" with four different levels (A
to D) and numerical "size", and each of the 4 different IDs is
repeated a
different number of times. I would like to get the mean size for each
ID as another data.frame. I have tried the following:
>ID= as.character(unique(data[,1])) # I use unique() because