the function strsplit().
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained
On Fri, Nov 19, 2010 at 10:34:26AM -0800, wangwallace wrote:
this is a simple question, but I wasn't able to figure it out myself.
here is the data frame:
M P Q
1 2 3
4 5 6
7 8 9
M, P, Q each represent a variable
I want to draw 2 random sample from each row separately to create
On Fri, Nov 19, 2010 at 07:22:57PM -0800, wangwallace wrote:
actually, what I meant is to draw two random numbers from each row
separately to create a new data frame. for example, an example output could
be:
1 3
4 5
9 8
This may be done, for example
X - matrix(1:9, ncol = 3, byrow =
On Sun, Nov 21, 2010 at 10:56:14AM -0500, David Winsemius wrote:
On Nov 21, 2010, at 10:43 AM, madr wrote:
Is there any way of suppressing that error, like in other programming
languages you can specifically invoke an error or simply exit,
If you are in a function, then return()
like
(A), ncol=3)
for (i in seq(nrow(A))) {
C[i, 1] - A[i, ind[i, 1]]
C[i, 2:3] - A[i, 3 + ind[i, 2:3]]
}
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http
independently on the actual console size. The help page ?options says
Some R consoles automatically change the value when they are resized.
In order to get the actual console size under Linux, one can use
Sys.getenv(COLUMNS). I do not know, whether this applies also to MasOS.
Petr Savicky
in some situations, may be found
in the first section of
http://rwiki.sciviews.org/doku.php?id=misc:r_accuracy
and in
http://rwiki.sciviews.org/doku.php?id=misc:r_accuracy:decimal_numbers
Petr Savicky.
__
R-help@r-project.org mailing list
https
a comprehensible model.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self
attributes are treated in function
CoreModel(y ~ ., lrn, model=bayes) in package CORElearn. I assume
that the binomial distribution is used also in other implementations
of naive Bayes for binary data.
Petr Savicky.
__
R-help@r-project.org mailing list
https
3
9 0.2 2 1 1
100.8 2 4 6
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting
details, in particular in the initialization algorithm.
In order to obtain the same stream of numbers, it will be
needed either to copy the initialization algorithm from R
to the C# implementation or vice versa. I can provide more
detail off-list, if you are interested.
Petr Savicky
On Sat, Aug 06, 2011 at 09:37:22PM +0200, Petr Savicky wrote:
On Fri, Aug 05, 2011 at 11:47:49PM +0530, Ron Michael wrote:
Hi all, I have happened to work on MS .NET for sometime now, and I found
that this language offers RNG what is called as Donald E. Knuth's
subtractive random number
explain it in more detail? I would expect
ave(u, a[, 2], FUN=sum)
[1] 3 1 1 3 3 2 2
However, this is different from your expected output. Do you count
only consecutive equal elements?
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing
(1,1,1,1,1,2,2,2,2,3,3,3,4,4))
final - rep(FALSE, times=nrow(pop))
for (k in 1:3) {
is.k - pop$Area == k
accept - is.k (cumsum(is.k) = ceiling(sum(is.k)/2))
final - final | accept
}
pop[final, , drop=FALSE] # drop= not needed, if there are more columns
Hope this helps.
Petr Savicky
this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
methods
may found different ones.
Can you send more detail about the minimized function?
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting
.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
g,
which can then be used to extract only some of them.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
] This is a test However, it is only a test
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained
this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
)
var3 - seq(0, 1, length=11)
for (varnam in c(var1, var2, var3)) {
x - get(varnam)
print(mean(x))
}
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
noquote(formatC(a*0.2, digits=2, format=f))
[1] 0.80
The two-digit form 0.80 is used also if a vector is printed
and some other component requires 2 digits. For example
c(a*0.2, 0.01)
[1] 0.80 0.01
Hope this helps.
Petr Savicky.
__
R-help@r
not using gnuplot
for a long time, but i think a space delimited file can be used.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
determinant is an integer, it has to be zero
and the difference from zero is due to rounding error.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
will be exactly all ones vector.
Otherwise, there may be differences within machine rounding error.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
row.names(tmp1) - NULL
tmp1
V1 V2 V3 V4
1 44 10 abc 1
2 44 10 def 1
3 44 12 abc 1
4 44 12 abc 1
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
) and (2) together is about 27 times larger than (1) alone.
(The ratio converges to 27, if A is limited to small neighborhood of the
center).
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
, a)))
It can be more efficient to find approximations of the roots
using a few iterations of the above approach and then switch
to the Newton method, which can be vectorized easily.
Hope this helps for a start.
Petr Savicky.
__
R-help@r-project.org mailing list
)
rowSums(db[, itemset]) == length(itemset)
[1] TRUE TRUE FALSE FALSE TRUE
# the number of transactions containing c(A, B)
sum(rowSums(db[, itemset]) == length(itemset))
[1] 3
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing
.
The first column of B seems to contain consecutive integers 1:nrow(B).
If this is true, then try following
B - cbind(1:6, c(0.1, 0.3, 0.14, 0.2, 0.82, 0.21))
A - rbind(1, 1, 1, 2, 3, 3, 4, 6)
cbind(B[A[, 1], 2])
Hope this helps.
Petr Savicky.
__
R
)
avec[indices] - 1
amat - rbind(avec)
or
amat - matrix(0, nrow=1, ncol=14)
amat[1, indices] - 1
amat
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[,14]
avec001011000 1 0 0 0 0
Hope this helps.
Petr
of s - s + x[i] in double precision.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained
7444 2244 5149 787 1717 5251 4122 3878 1811
These are indices to the levels of the factor.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
the following
which(is.na(as.numeric(as.character(returns[, 1]
This will show the indices of the rows, which cannot be converted
to numeric type.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
works ,
A possible approach is to put the script into an extension package. This
does not prevent the user to modify the script, but makes it almost
impossible to change it inadvertently.
Petr Savicky.
__
R-help@r-project.org mailing list
https
. The package mvtnorm
http://cran.at.r-project.org/web/packages/mvtnorm/index.html
computes the square root of a matrix internally. See the help
of the function ?rmvnorm.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https
In this case, mean(sample(100, 100, replace=TRUE)) and
mean(unique(sample(100, 100, replace=TRUE))) have the same
expected value 50.5. However, eliminating repeated values may,
in general, change the expected value of the sample mean.
Hope this helps.
Petr Savicky
On Thu, Apr 14, 2011 at 12:40:53AM -0700, helin_susam wrote:
Hi Petr,
Your idea looks like logically. So, can we say this with your idea; the
expected number of computation in unique(sample(...)) is fewer than
sample(...). Because, the expected length is 63.39677 in unique case, while
the
a reproducible example, you have a better chance
to get a useful answer.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide
) - 1] +
Fibonacci[length(Fibonacci)])
}
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible
choose(n + k - 1, k - 1) among n^(k - 1)
rows and not among n^k.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
be done by comparing
integers instead of character values, which is faster.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
starting points.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
of the distribution (f(Y), Y) and (X, Y), where X has the
required marginal distribution of X, but is generated independently
from Y. The mixture parameter may be determined as a solution of an
equation with one variable.
Hope this helps.
Petr Savicky.
__
R-help
+0066 LATIN SMALL LETTER Ff
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal
: xx yy
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained
NA
Levels: xx yy
If the replacement should be done in the whole matrix, then
a[a==NA]-NA
may be used.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
,
the first row becomes the main diagonal. The initial
part of each of the remaining rows becomes a diagonal
starting at the first component of the original row.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
)$root
[1] 5
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained
)
for approximate equality of all entries.
See also ?all.equal, which uses the relative error, not absolute
difference.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
), ]
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained
?var.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained
- function(x, ind) paste(x[ind], collapse= )
vapply(strsplit(x, ), reassemble, character, c(1, 4))
[1] this string this numeric
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
- readLines(file)
strsplit(x[length(x)], +)[[1]][3]
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide
On Wed, May 04, 2011 at 08:52:07AM -0700, William Dunlap wrote:
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Petr Savicky
Sent: Wednesday, May 04, 2011 12:51 AM
To: r-help@r-project.org
Subject: Re: [R] Simple loop
=2004:2006)
valid - master[! (master[, 1] %in% train[ ,1]), , drop=FALSE]
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting
vector may be obtained using c() from a matrix. The
output vector may be reformatted using matrix(). However, for
a matrix solution, a more precise description of the question
is needed.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
. This
corresponds to the understanding that odd elements should repeat 7
times and even elements 6 times. However, it is not clear, what
the dimension of the output matrix should be.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https
explicit tests like
abs(x) 1e-20.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained
) applies func to the
rows of gs. These rows have length 2665, which is equal
to the number of columns of data. So, i would expect
to use z to select columns, not rows of data. Can you
comment on this?
Petr Savicky.
__
R-help@r-project.org mailing list
)))
pos[, order(ind)]
X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19
a A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 A19
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https
cov_pairwise1(), cov_pairwise2(),
cov_complete1(), or cov_complete2(). Probably, other members
of the list may correct me, if this is not correct.
Basic formulas for the covariance are at Wikipedia
http://en.wikipedia.org/wiki/Covariance
Hope this helps.
Petr Savicky
with a/b/c only
Hi.
Besides the other solutions in this thread, the following
also works.
append(tmp0, list(d=NULL))
$a
[1] 1
$b
NULL
$c
[1] 3
$d
NULL
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch
, since it is not preceded by 0.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal
into the memory.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible
consists of rnorm(1)
and rnorm(m) together.
If you have a specific Sigma, describe it and we can discuss,
whether an appropriate A can be found.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
) - (G + 1)/2 }, c(0,
1e10))$root
y - exp(rnorm(n, sd=sigma))
2. Check the gini coefficient of the sample using (B).
2*sum(seq(length=n)*sort(y))/(n*sum(y)) - (n+1)/n
[1] 0.305003
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
, but :
Hi.
This neednot be true for strings of different length.
For example
ab
abc
become by concatenation with z
abcz
abz
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
and packages but no hits. Any ideas?
Hi.
Try this
all(x = y) # [1] TRUE
all(z = y) # [1] TRUE
all(x = z) # [1] FALSE
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
the
collation order: ...
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal
On Mon, Feb 20, 2012 at 04:56:21PM +0100, Petr Savicky wrote:
On Mon, Feb 20, 2012 at 05:55:30AM -0800, statquant2 wrote:
I did, but this does not give the answer to my question...
Anybody knows how to tweack the behaviour of sort or how to do ?
Hi.
Try this
Sys.setlocale
permissions.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
- rowProds2(a))
identical(out1, out2)
[1] TRUE
rbind(t1, t2)
user.self sys.self elapsed user.child sys.child
t1 0.5500.003 0.553 0 0
t2 0.0490.013 0.062 0 0
Petr Savicky.
__
R-help@r
55
[2,]369
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal
.
Try to set options(error=utils::recover) before the run. When
the error occurs, you can see the values of the variables
inside the function, where the error occured.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch
) # [1] 2.220446e-16 2.220446e-16 2.220446e-16 ...
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented
0
[4,] 0 1 1
[5,] 0 1 1
[6,] 1 1 1
[7,] 1 1 1
[8,] 1 1 1
[9,] 1 1 0
[10,] 1 1 0
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http
if the
number of rows is large and the number of columns is not,
then a solution, which uses a loop over columns, may be
better.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
in seq.int(from=2, length=ncol(A)-1)) {
curr - ifelse (A[, i-1] == outcome, 0, 1 + curr)
B[, i] - curr
}
# verify
all(num.columns.back.since.last.occurence(A, 1) == B)
[1] TRUE
Hope this helps.
Petr Savicky.
__
R-help@r-project.org
the number of file
names in file_s is at least 10.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal
On Fri, Feb 24, 2012 at 09:06:28PM +0100, Berend Hasselman wrote:
[...]
I've done some speed tests.
t1 - function(m, outcome) {
nrows - dim(m)[1]
ncols - dim(m)[2]
res - matrix(rep.int(0, nrows*ncols), nrow=nrows)
for(row in 1:nrows) {
for(col in
On Fri, Feb 24, 2012 at 09:06:28PM +0100, Berend Hasselman wrote:
[...]
Summary of results
Nrow - 100
Ncol - 1000
A - matrix((runif(Ncol*Nrow)0.2)+0, nrow=Nrow)
print(rbind(z1,z2,z3,z4,z5,z6))
user.self sys.self elapsed user.child sys.child
z1 0.5430.005 0.551 0
(seq_len(n1), n2*n3
,dim2 = rep( rep(seq_len(n2), e=n1), n3)
, dim3 = rep(seq_len(n3), e = n1*n2)
)
Hi.
Try this
df - data.frame(dat=c(foo), which(foo == foo, arr.ind=TRUE))
This may be less efficient, but easier to remember.
Hope this helps.
Petr Savicky
...
On the contrary to a previous suggestion with foo==foo, this
works also in presence of NA.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
frame consist of character vectors or from factors?
This may be seen by testing class(MyTable[[1]]).
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
as follows.
x - c(as.matrix(MyTable))
out - unclass(table(factor(x, levels=myvector)))
Here, out is a vector of the same length as myvector
and out[i] is the frequency of myvector[i] in MyTable.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org
change working directory
Execution halted
Try print(newdir) before setwd(newdir).
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting
On Sun, Feb 26, 2012 at 11:39:01AM -0800, mari681 wrote:
SORRY!
The data in MyTable are tagsets of photos, like this:
V1 V2 V3 V4 V5 V6V7 V8
230green nailpolish barrym 0 00 00
231 ny green
paste(df[[1]], df[[2]], df[[3]], sep=\r)
and then setdiff() can be better.
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
5 5 5 3 5 2 5 6 4
[[2]]$yy
[1] 4 4 5 4 3 5 2 5 5 3 # 1 is missing
[[3]]
[[3]]$zz
[1] 5 2 5 1 5 1 2 5 5 5
[[3]]$yy
[1] 4 2 5 1 5 1 1 4 5 4 # 3 is missing
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
in base
So the results would be:
base list
2.2 -- 2
3 -- 3
5.2 -- 5
Hi.
Try the following.
unlist(lapply(base, FUN = function(x) max(list[list = x])))
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing
, 2.2, 3, 5.2, 8)
unlist(lapply(base, FUN=function(x) max(list[list = x], -Inf)))
[1] -Inf2357
Hope this helps.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
On Tue, Feb 28, 2012 at 08:50:45AM -0800, helin_susam wrote:
Dear Petr Pikal and Petr Savicky thank you for your replies..
If the y vector contains different elements my algorithm gives this result;
y - c(1,2,3,4,5,6,7,8,9,10)
x - c(1,0,0,1,1,0,0,1,1,0)
n - length(x)
t - matrix
On Tue, Feb 28, 2012 at 08:50:45AM -0800, helin_susam wrote:
Dear Petr Pikal and Petr Savicky thank you for your replies..
If the y vector contains different elements my algorithm gives this result;
y - c(1,2,3,4,5,6,7,8,9,10)
x - c(1,0,0,1,1,0,0,1,1,0)
n - length(x)
t - matrix
On Tue, Feb 28, 2012 at 11:42:32AM -0800, helin_susam wrote:
Dear Petr Savicky,
Actually, this is based on jackknife after bootstrap algorithm. In summary,
I have a data set, and I want to compute some values by using this
algorithm.
Firstly, using bootstrap, I create some bootstrap re
not be, what you want. In this case, provide a numerical
example.
Petr Savicky.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide
is a numeric vector)
data.cca - cancor(X,Y)
Xcen=0*X
for(i in 1:dim(X)[1]){
Xcen[i,]=data.cca$xcenter
}
Xc = X - Xcen
Hi.
Is the following, what you are looking for?
Xc - sweep(X, 2, data.cca$xcenter)
Hope this helps.
Petr Savicky
will be proportional to choose(n, k), so it will be large
even for moderate n, k. It is hard to provide a significant
speed up, since some variants of knapsack problem, which
is NP-complete, may be reduced to your question. Consequently,
it is, in general, NP-complete.
Hope this helps.
Petr Savicky
1 - 100 of 439 matches
Mail list logo