similar to: how to find smallest non-negative and biggest non-positive number in a matrix column ?

Displaying 20 results from an estimated 10000 matches similar to: "how to find smallest non-negative and biggest non-positive number in a matrix column ?"

2010 Jul 15
2
replace negative numbers by smallest positive value in matrix
Hi Group, I have a matrix, and I would like to replace numbers less than 0 by the smallest minimum number. Below is an small matrix, and the loop I used. I would like to get suggestions on the "R way" to do this. Thanks, Juliet # example data set mymat <- structure(c(-0.503183609420937, 0.179063475173256, 0.130473004669938, -1.80825226960127, -0.794910626384209, 1.03857280868547,
2009 Mar 19
2
find the index of the smallest or biggest number in a vetor or data.frame
Dear R experts, How to find out the index of minimum or maxmum number in a vetor or data.frame? For example, a= n price 1 50 -2 100 0 200 -1 300 ...... I want to find out the row which the n is the smallest or largestest and extract the price. Thanks Ted -- View this message in context:
2005 Mar 23
1
smallest/biggest number
Hi, I'm running monte carlo and i wonder what is the biggest/smallest number that can reliably be represented in R? Thanks, Chris
2010 Nov 21
1
"negative alpha" or custom gradient colors of data dots in scatterplot ?
I know that by setting alpha to for example col = rgb(0, 0, 0, 0.1) it is possible to see how many overlapping is in the plot. But disadvantage of it is that single points are barely visible on the background. So I wonder if there is possible to make setting that single points would be almost black, but with more and more data on the same spot it would get more and more whiteish. Or maybe it is
2010 Dec 07
4
increase or decrease variable by 1
many languages have shorthands for that operation like: variable += 1 or ++variable is there something like that in R ? -- View this message in context: http://r.789695.n4.nabble.com/increase-or-decrease-variable-by-1-tp3076390p3076390.html Sent from the R help mailing list archive at Nabble.com.
2010 Dec 08
1
how to strip list from NA values looking only at one column ?
I have got a list with 3 colums x,y,z, now I want do delete whole rows where column z has NA values I am not intereted in x and y columns if there are also NA values or not, moreover I do not want to touch them because if there would be NA that would mean a more serious error for me, and I have cath for that somewhere else I am asking because I only saw an example where function loops over all
2010 Nov 21
3
how to get rid of unused space on all 4 borders in plot() render
x= c(1,5,7,-3,4) y= c(2,4,-5,2,5) plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(0, 0, 0, 0.5),yaxt="n", ann=FALSE) and this code produces: http://i53.tinypic.com/ffd7d3.png Where I marked in red areas that I want to get rid of and use as much real screen estate as I can. -- View this message in context:
2008 May 03
2
Stacked bar plot anomaly When column contains a negative and a positive value
Hello users, I've noticed a problem when creating a stacked column plot when a column contains a negative and a positive value. e.g. series1<-c(-1,-2, 3, 4, 5) series2<-c( 5, -4,-3,-2, 1) data<-rbind(series1,series2) barplot(as.matrix(data), beside=FALSE) In these cases (i.e. first, third and fifth columns) the plotting is not handled correctly. Compare this output with that
2010 Nov 21
8
[beginner] simple keyword to exit script ?
I have tried quit(), and return() but first exits from whole graphical interface and second is only for functions. What I need only to exit from current script and return to the console. -- View this message in context: http://r.789695.n4.nabble.com/beginner-simple-keyword-to-exit-script-tp3052417p3052417.html Sent from the R help mailing list archive at Nabble.com.
2010 Dec 07
2
longer object length is not a multiple of shorter object length
In datamatrix[, "y"] == datamatrix[, "y"][-1] : longer object length is not a multiple of shorter object length out = c(FALSE,datamatrix[,'y'] == datamatrix[,'y'][-1]) and I do not know why I get that error, the resulting out matrix is somehow one row larger than datamatrix... all I try to do is filter matrix by dropping rows where [,'y'][-1] ==
2010 Nov 22
2
I need a very specific unique like function and I don't know even how to properly call this
consider this matrix: [,1] [,2] [1,] 3 7 [2,] 6 5 [3,] 7 5 [4,] 3 5 [5,] 7 5 [6,] 5 5 [7,] 8 4 [8,] 2 4 [9,] 7 4 [10,] 0 6 I need to delete all rows where column 2 above and below has the same value, so the effect would be: [,1] [,2] [1,] 3 7 [2,] 6 5 [6,] 5 5 [7,] 8 4 [9,] 7 4 [10,] 0 6
2010 Dec 07
1
please show me simple example how to plot "Distance-Weighted Least Squares" fitting
I got simple x,y pairs of data and simple scatterplot and just cannot figure how to do it , there are many examples but always there is error popping out please show me an example stripped with additional data just core of what I need to do to get this damn line -- View this message in context:
2010 Dec 08
1
how to make partial mean() of a matrix only when second value matching some logic
for example I have matrix with two columns x,y 1,0.56 2,9.55 2,7.56 5,2.55 5,0.56 3,0.55 2,0.56 2,1.56 so I need to take average from y values placed where x==2 -- View this message in context: http://r.789695.n4.nabble.com/how-to-make-partial-mean-of-a-matrix-only-when-second-value-matching-some-logic-tp3078449p3078449.html Sent from the R help mailing list archive at Nabble.com.
2007 Apr 24
2
negative number to positive number
Hello all, I know this is a pretty easy question but I can't find it in S poetry or R help. How can I make a negative number positive. Such as -5 to be +5 I tried +(-5), but that didn't work. So no, I don't mean taking a -5^2 just to get a positive number. This is in a function so it's not just -5 it's x. :) Thanks, Paul -- Research Technician Mass Spectrometry o The
2009 Nov 03
2
Change negative values in column
Hi all, I'm trying to write a script that changes all negative values in a data frame column to a small positive value, based on the the minimum value of the column. However, I get the following error: Error in if (x[i] < 0) { : argument is of length zero As well, I would "minimum" to be the smallest of the non-negative values...
2006 Nov 20
1
Smallest R executable
Hello, I am trying to find out how can I generate the smallest R executable. R is to be run in a grid application, in batch mode, so I need a small exceutable, possibly getting rid of any interactive component. Should I look at the embedded version? Any other pointers? Many thanks, Iago Mosqueira -- Dr. Iago Mosqueira Marine Research Division AZTI Tecnalia Txatxarramendi Ugartea, z/g 48395
2013 Apr 15
0
Smallest Space Analysis help
Hello fellow R users, I need to perform Guttman's Smallest Space Analysis, which is a type of Non-metric Multidimensional Scaling. Not wanting to reinvent the wheel i decided to look for a package which may have an implementation of it, but no success at all. Do you guys know of any package that perform SSA? I found 'isoMDS' and 'sammon', both on the MASS package, but though
2010 Jul 05
4
Smallest install?
I have a 500Mb ATA Flash drive in my machine. If I deselect everything at install time (CentOS 5.0 - just for testing) it still requires 524Mb. Is there any way of doing an even smaller install? -- rgds Stephen
2009 Mar 15
2
smallest page of encoded data
Hi, I am implementing and audio recorder where I need to encode to vorbis DURING recording. I need to allow the user to cut and paste segments of encoded audio into a new stream. As such, I need to encode the audio in sub-second pages (the smallest allowable amount for the wave format), so that cut/paste can be implemented simply by re-arranging these encoded pages. How can I calculate, the
2004 Feb 03
4
Smallest server continued...
This thread got me thinking of other servers that would run asterisk. The obvious question comes up if Xebian (the xbox version of Debian) would run as a SIP only server? Asterisk on an XBox would be a small box! Cheap too. Tom Schaefer