[R] String to Matrix

2011-02-02 Thread Romildo Martins
Hello, How to convert x into y? x [1] 15, 23, 2, 21, 11, 5 y [,1] [,2] [1,] 15 23 [2,] 232 [3,]221 [4,] 21 11 [5,] 115 Thanks a lot! Romildo [[alternative HTML version deleted]] __ R-help@r-project.org

[R] String to array

2010-12-09 Thread Romildo Martins
Hello, how convert x in xarray (numbers)? x [1] 0 - 13 y [1] 11 - 23 z [1] 220 - 9 xarray [1] 0 13 yarray [1] 11 23 zarray [1] 220 9 Thanks, RMB __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Filter a Matrix

2010-11-30 Thread Romildo Martins
Hello, How to filter the matrix (m) based on the array (a)? m [,1] [,2] [,3] [1,]514 [2,]262 [3,]347 [4,]126 [5,]153 [6,]762 a [1] 2 6 output [,1] [,2] [,3] [1,]262 [2,]126 [3,]7

[R] Matrix Operations

2010-11-27 Thread Romildo Martins
Hello, Given the matrices LSPs and services, need to generate the matrix (mtraffic) as follows: 1. Browse all lines of LSPs 2. Collect the value of bw (matrix services) in accordance with id2 3. Sum bw in mtraffic (line = source) (column = destiny) Thanks! Romildo Martins

[R] CPU Scheding package

2010-11-26 Thread Romildo Martins
Hi everybody, I would like to know if there is any CPU scheduling package in R. Anybody knows? Thanks, Romildo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Conditional Operation in Matrix

2010-11-24 Thread Romildo Martins
Hello, I would like to perform the operation a - b, only for the non-zero values. Thanks a lot! RMB a 0 0 0 0 4 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 b

[R] Finding positions in array

2010-03-30 Thread Romildo Martins
Hello, I need a function to check what positions of the array are greater than y and return to positions in another array z. x-array(E(gaux)$weight) x [1] 3 8 10 6 If y = 7 z [1] 2 3 Thanks a lot! Romild [[alternative HTML version deleted]]

[R] Replace Values in Matrix

2009-11-27 Thread Romildo Martins
Hello, how to replace the NA by number zero? matrizt [,1] [,2] [,3][,4] [1,] 1.000NA NA NA [2,] 0.6717685 0.1453253 NA NA [3,] 0.3971276 0.1493241 0.14532526 NA [4,] 0.1493241

[R] Intersection an Sum between list and matrix

2009-10-22 Thread Romildo Martins
Hello, I need to do an intersection between the list elements (partitionslist) and the columns and rows of a matrix (mm), so that the result will be the sums of the rows and columns. Thanks a lot, Romildo Martins Example 1.The Intersection and sum betweeen partitionslist[[1]][[2]] and mm

Re: [R] Intersection an Sum between list and matrix

2009-10-22 Thread Romildo Martins
Sorry... example 2 was error! 2009/10/22 Romildo Martins romildo.mart...@gmail.com Hello, I need to do an intersection between the list elements (partitionslist) and the columns and rows of a matrix (mm), so that the result will be the sums of the rows and columns. Thanks a lot

[R] values in graph points

2009-06-23 Thread Romildo Martins
Hello, How to add x values in graph points? Thanks a lot, Romildo x - c(22.44, 20.14, 15.85, 15.97) plot(x, type=n, axes=FALSE, ann=FALSE, labels=c(22.44, 20.14, 15.85, 15.97)) par(lwd=1) lines(x) points(x, pch=5, bg=grey, cex=1.5) axis(2, las=1) axis(1, at=1:4, lab=c(none, 50-50, 80-20,

[R] Vector of matrix

2009-04-27 Thread Romildo Martins
Hello, To specify a vector of matrices in R (which may have different sizes)? Thanks a lot! Romildo [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] string to integer

2009-04-16 Thread Romildo Martins
Hi, exists a function to converts string to integer? Thanks Romildo Martins __ 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

[R] Transfer data

2009-04-15 Thread Romildo Martins
Hi, I need transfer data from vector(list, 6) to array(dim=c(6)) (example: x receives data from tipo[[1]] ). Thanks tipo - vector(list, 6) tipo [[1]] [1] 1 2 3 5 6 [[2]] [1] 4 8 9 14 [[3]] [1] 7 10 11 12 [[4]] [1] 13 15 16 [[5]] NULL [[6]] NULL x - array(dim=c(6))