Hi Pierre-Jean,
Sensitivity (Se) and specificity (Sp) are calculated for cutoffs stored in
the "performance" x.values of your prediction for Se and Sp:
For example, let's generate the performance for Se and Sp:
sens <- performance(pred,"sens")
spec <- performance(pred,"spec")
Now, you can have a
Can this be an answer ?
which(v %in% names(table(v)[table(v)>1]))
[1] 2 5
Nael
On Wed, Oct 8, 2008 at 8:36 PM, liujb <[EMAIL PROTECTED]> wrote:
>
> Dear R users,
>
> I have this vector that consists numeric numbers. Is there a command that
> detects the repeated numbers in a vector and returns
Hi John,
Wouldn't you get the same with just mapply(sub, patt, repl, X) ?
Nael
On Tue, Oct 7, 2008 at 9:58 PM, Thaden, John J <[EMAIL PROTECTED]> wrote:
> R pattern-matching and replacement functions are
> vectorized: they can operate on vectors of targets.
> However, they can only use one pat
Try do.call("rbind", nameofyourlist)
Nael
On Sat, Sep 27, 2008 at 8:51 AM, Matthew Pettis <[EMAIL PROTECTED]>wrote:
> Hi,
>
> I have a list output from the 'lapply' function where the value of
> each element of a list is a data frame (each data frame in the list
> has the same column types). How
The answers that were previously given allow you to easily extract results
from your returned list, but if I understand well, this list is created only
because you cannot return several arguments whereas you need to keep the
values of a, b, c, etc. Am I right?
Another solution would be to directly
You were very close to an answer :
as.vector(unlist(df[1,]))
Nael
On Wed, Aug 27, 2008 at 7:53 AM, Ronnen Levinson <[EMAIL PROTECTED]> wrote:
>
> Hi.
> How do I convert a one-dimensional array of characters to a character
> vector? In the example below I am trying to get the result c("a",
Not very elegant but seems to work:
pats.df <- as.data.frame(t(sapply (1:length(pats), function (i)
do.call(cbind,pats[[i]]
colnames(pats.df) <- names(pats[[1]])
# then
pats2 <- lapply (1:nrow(pats.df), function (i) as.list(t(pats.df)[,i]))
Nael
On Wed, Jul 23, 2008 at 3:23 PM, Michael Frie
Hi Michal,
This paper by John Fox may help you to precise what you are looking for and
to perform your analyses
http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-bootstrapping.pdf
Nael
On Tue, Jul 22, 2008 at 3:51 PM, Michal Figurski <
[EMAIL PROTECTED]> wrote:
> Dear all,
>
> I don't
Hi Murali,
Just an idea, probably not the best :
x<-1:4
y<-1:6
z<-matrix(1:(length(x)*length(y)),nrow=length(x))
I <- matrix(1,nrow=length(x),ncol=length(y))
I[row(I)==col(I)] <- 0
sum (outer (x, y, '*') * I)
sum (outer (x, y, '*') * z * I)
Hope this helps,
Nael
On Wed, Jul 2, 2008 at 6:3
And if you have "thousands of names" like this:
names(L) <- paste ("names", 1:length(L), sep="")
Nael
On Sun, May 25, 2008 at 10:38 PM, Erin Hodgess <[EMAIL PROTECTED]>
wrote:
> try this:
>
> > names(L) <- c("name1","name2","name3")
> > L
> $name1
> [1] "Fred"
>
> $name2
> [1] "Mary"
>
> $name3
explicit.
Nael
On Fri, May 23, 2008 at 3:54 PM, N. Lapidus <[EMAIL PROTECTED]> wrote:
> Hi Mohamed
>
> Try:
> lapply (NameOfYourList, function (dat, NumCol) dat[,NumCol], c(12,13))
>
> But there must be a shorter way to write this.
>
> Nael
>
>
> On Fri,
Hi Mohamed
Try:
lapply (NameOfYourList, function (dat, NumCol) dat[,NumCol], c(12,13))
But there must be a shorter way to write this.
Nael
On Fri, May 23, 2008 at 3:37 PM, mohamed nur anisah <
[EMAIL PROTECTED]> wrote:
> Dear all,
>
> i have 2 lists of data with each of the list contain 14 c
Oops.. the last line should have been :
for (NumMonth in 1:12) assign(NameDummy[NumMonth], GenDummyVar (NumMonth))
On Fri, Apr 25, 2008 at 10:18 AM, N. Lapidus <[EMAIL PROTECTED]> wrote:
> > GenDummyVar <- function (NumMonth) rep(c(rep(0, NumMonth-1), 1, rep(0,
> 12-NumMonth)),
> GenDummyVar <- function (NumMonth) rep(c(rep(0, NumMonth-1), 1, rep(0,
12-NumMonth)), 17)
> NameDummy <- c("DJan", "DFeb", "DMar", "DApr", "DMay", "DJun", "DJul",
"DAug", "DSep", "DOct", "DNov", "DDec")
> for (NumMonth in 1:12) assign(NameDummy, GenDummyVar (NumMonth))
> DJan
[1] 0 0 0 0 0 0 0
Hi Zhihua,
M <- data.frame (x=c(10, 13, 8, 11), y=c('A', 'B', 'A', 'A'))
which (M$x >= 10 & M$y == 'A')
# [1] 1 4
Hope it helps,
Nael
2008/3/7 N. Lapidus <[EMAIL PROTECTED]>:
> Hi Zhihua,
>
> M <- data.frame (x=c(10
Try c(q1,q2)
Nael
On Jan 25, 2008 4:45 PM, <[EMAIL PROTECTED]> wrote:
> How can I join two lists? I have q1 and q2 and I want to merge them. I
> have tried to use the comand merge, but not work. Any solutions? Thanks!
>
> > q1
> $Input1
> 7.84615384615385
> 0.5
>
> $Input2
> 8.92307
Hi Robin,
Before someone gives a better solution, you can try this :
x1<-array(1:10,c(2,5))
x2<-array(1:9,c(3,3))
ArrayAdd<-function(array1,array2){
x<-array(0,c(max(nrow(array1),nrow(array2)),max(ncol(array1),ncol(array2
x[1:nrow(array1),1:ncol(array1)]<-x[1:nrow(array1),1:ncol(array1
Hi Armin,
Do you know the rocr package ? This is very easy to draw ROC curves and to
calculate AUC with it.
http://rocr.bioinf.mpi-sb.mpg.de/
Hope this will help.
Nael
On Dec 17, 2007 2:58 AM, Stephen Weigand <[EMAIL PROTECTED]> wrote:
> RSiteSearch("AUC")
>
> would lead you to
>
> http://finzi.
18 matches
Mail list logo