search for: tmats

Displaying 20 results from an estimated 25 matches for "tmats".

Did you mean: thats
2006 Jul 06
3
Comparing two matrices [Broadcast]
It might be a bit faster to do matrix indexing: R> tbm <- as.matrix(tb) # turn it into a character matrix R> tmat[cbind(match(tbm[,2], rownames(tmat)), match(tbm[,1], colnames(tmat)))] <- 1 > tmat Apple Orange Mango Grape Star A 1 1 1 0 0 O 1 1 0 0 0 M 0 0 1 0 0 G 0 0 0 0 0 S 1 1 1 0
2006 Jul 06
3
Comparing two matrices
hi: I have matrix with dimensions(200 X 20,000). I have another file, a tab-delim file where first column variables are row names and second column variables are column names. For instance: > tmat Apple Orange Mango Grape Star A 0 0 0 0 0 O 0 0 0 0 0 M 0 0 0 0 0 G 0 0 0 0 0 S 0 0 0 0 0
2005 Apr 15
4
function corresponding to map of perl
Is there a function in R that corresponds to the function ``map'' of perl? It could be called like: vector.a <- map( vector.b, FUN, args.for.FUN ) It should execute for each element ele.b of vector.b: FUN( vector.b, args.for.FUN) It should return a vector (or data.frame) of the results of the calls of FUN. It nearly works using: apply( data.frame( vector.b ), 1, FUN,
2010 Dec 02
1
Arrange elements on a matrix according to rowSums + short 'apply' Q
Greetings, My goal is to create a Markov transition matrix (probability of moving from one state to another) with the 'highest traffic' portion of the matrix occupying the top-left section. Consider the following sample: inputData <- c( c(5, 3, 1, 6, 7), c(9, 7, 3, 10, 11), c(1, 2, 3, 4, 5), c(2, 4, 6, 8, 10), c(9, 5, 2, 1, 1) ) MAT <- matrix(inputData,
2002 Mar 18
2
persp(): add second plane (second, long question)
Thank you for your replies so far. Sorry for bothering you again, but I'm still not able to get what I need as I don't understand all parts of the replies (just using R for easy things....). Is there a code for plane3d() like some of you sent me for points3d()? I was not able to get that out of the scatterplot3d package... What I can do is to get the x,y and z-range for the xlim,ylim and
2006 Mar 25
2
pairwise combinatons of variables
Dear WizaRds, although this might be a trivial question to the community, I was unable to find anything solving my problem in the help files on CRAN. Please help. Suppose I have 4 variables and want to use all possible combinations: 1,2 1,3 1,4 2,3 2,4 3,4 for a further kmeans partitioning. I tried permutations() of package e1071, but this is not what I need. Thank you for your help and
2002 Aug 01
4
What does persp() return?
I want to plot some 3D points on top of the grid produced by persp(). On 2/22/01, Paul Murrell <paul at stat.auckland.ac.nz> wrote in R-help: > In S-Plus, persp() returns a value that can be used to transform 3D > locations to 2D, but this sort of thing is not (yet) available in R. But persp() does return something (in R-1.5.1): a 4x4 matrix which in the C code is called the
2006 Mar 23
0
kmeans Clustering
Dear WizaRds, My goal is to program the VS-KM algorithm by Brusco and Cradit 01 and I have come to a complete stop in my efforts. Maybe anybody is willing to follow my thoughts and offer some help. In a first step, I want to use a single variable for the partitioning process. As the center-matrix I use the objects that belong to the cluster I found with the hierarchial Ward algorithm. Then,
2002 Oct 21
2
3-D scatter plot laid over Surface plot
Hello, I have created a Fitness surface (persp()), with data that was created by a tp spline procedure. Now I would like to superimpose a set (XYZ) of existing points (from two different treatments) onto this surface. I didn't come across any function or command that is able to do this in R. Could somebody please help me in finding a solution to this problem Thank you Peter --
2002 Mar 14
1
persp(): add second plane
Dear R-users, is it possible to add a second plane to the persp()-plot? I couldn't find any hint on that in the news archive... I'm using R.1.4.1 for Windows. Thanks in advance, Nina -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2002 Mar 14
1
persp(): add second plane
Dear R-users, is it possible to add a second plane to the persp()-plot? I couldn't find any hint on that in the news archive... I'm using R.1.4.1 for Windows. Thanks in advance, Nina -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2011 Sep 17
0
Warning in 'probtrans'-function ('mstate'-package)
Dear all, in order to estimate transition-specific probabilities in a multi-state model i applied the 'probtrans()' function from the 'mstate'-package. Now, i am at loss with the following message (see attached example): Warning message: In probtrans(msf.0, predt = 0) : Negative diagonal elements of (I+dA); the estimate may not be meaningful. I am not very familiar with matrix
2000 Aug 29
4
short way
i want to replace certain values of a matrix. i know how to replace them when the values are in a vector. i tried the same way for a matrix and got this answer: la[la==0]<-1 Error in [<-.data.frame(*tmp*, la == 0, value = 1) : matrix subscripts not allowed in replacement i found a way to do this with "for()", but i think this is the worst way to do it. So is there a
2010 Oct 07
1
model.frame deficiency
The model.frame function has trouble with a certain type of really long formula. Here is a test: tname <- paste('var', 1:50, sep='') tmat <- matrix(rnorm(500), ncol=50, dimnames=list(NULL, tname)) tdata <- data.frame(tmat) temp1 <- paste( paste(tname, tname, sep='='), collapse=', ') temp2 <- paste("~1 + cbind(", temp1, ")")
2007 Jul 03
1
loop causes syntax error in print()
...on of the table. ...[multiple loops and calculations ending with.....]... + print(paste(mutType,"sim",sim,"hmm",hmm)) + # print(acctab[,10:15]) + + nummod <- nummod +1 + } #end hmmMats loop + } #end tmats loop + } #end mut type loop [1] "dup sim Imod hmm Jmod" > print(acctab[,10:15]) hitrate falsepos multrate avghit avgmiss avgfalsepos 1 0.0000000 1 NaN NaN 2 NA 2 1.0000000 0 0.00000000 5.333333 NaN NA...
2002 Nov 19
5
plotting intersecting planes
Hi all In two days, I am giving a small, informal workshop in our Department about using R. Initially, it was just for statistician, but surprisingly (to me anyhow) many mathematicians are also coming who have a MATLAB background. They are coming at the Workshop from a teaching perspective. They are considering using R to avoid licensing issues with MATLAB. One thing they were hoping me to
2001 Jul 17
2
cmdscale in package mva (PR#1027)
Full_Name: Laurent Gautier Version: 1.3.0-patched OS: IRIX 6.5 Submission from: (NULL) (130.225.67.199) Hello, The function La.eigen, called by cmdscale in the package mva behaves an unexplicable way (for me). The following lines show what happened. I tried the very same on linux, and it worked fine. >a <- matrix(c(1,2,3,2),3,3) >a [,1] [,2] [,3] [1,] 1 2 3 [2,]
2017 Jun 04
0
New var
Since the number of choices is small (6), how about this? Starting with Jeff's initial DFM: DFM <- structure(list(obs = 1:6, start = structure(c(16467, 14710, 13152, 13787, 15126, 12696), class = "Date"), end = structure(c(17167, 14975, 13636, 13879, 15340, 12753), class = "Date"), D = c(700, 265, 484, 92, 214, 57), bin = structure(c(6L, 3L, 5L, 1L, 3L, 1L), .Label
2002 Jan 10
1
Size of type double in object type dist (PR#1255)
The following problem occurs in R 1.4.0 and 1.3.1 for Windows95, but not in R 1.2.0 for Windows95. The problem does not occur in R 1.4.0 for Linux PC, Linux Alpha and HP-UX. Sometimes, the type of 'Size' of an object of type 'dist' changes from integer into double. Running cmdscale on such a 'dist' object gives invalid results. I don't know what should be considered
2017 Jun 04
2
New var
Thank you Jeff and All, Within a given time period (say 700 days, from the start day), I am expecting measurements taken at each time interval;. In this case "0" means measurement taken, "1" not taken (stopped or opted out and " -1" don't consider that time period for that individual. This will be compared with the actual measurements taken (Observed-