similar to: increase or decrease variable by 1

Displaying 20 results from an estimated 7000 matches similar to: "increase or decrease variable by 1"

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:
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 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 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.
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
2012 Apr 10
7
How to remove $ (Dollar sign) from string
How do I remove a "$" character from a string sub() and gsub() with "$" or "\$" as pattern do not work. > sub("$","","ABC$DEF") [1] "ABC$DEF" > sub("\$","","ABC$DEF") Error: '\$' is an unrecognized escape in character string starting "\$" >
2010 Dec 04
1
what is this averaging function called ?, has R a built in function for it ?
I know little of statistics and have created this function out of intuition. But since this algorithm is so basic I wonder what is the proper name of this function and is it build in R. here is some code in PHP to illustrate what the function is doing, it uses some function I created but the meaning is obvious: #get csv file and interchange rows with columns to get two arrays $csv =
2010 Oct 11
2
(senza oggetto)
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101011/7fd9c9d5/attachment.pl>
2012 Jul 30
6
Turning off continuation prompt?
Greetings All. My apologies for a question whose answer is probably readily available somewhere (for some interpetation of "somewhere") ... Say I have just typed (from a sheet of paper) several lines into the R command-line, and what I see is: > chisq.test(matrix(c(3,6,3,4,4, + 4,1,4,6,5, + 2,7,4,2,5, + 8,2,4,4,2, +
2011 Mar 16
4
'x' values must be positive.
> b [1] "2" "1" "1" "1" "1" "1" > pie(b) Error in pie(b) : 'x' values must be positive. Can someone help me? And sorry i am an beginner -- View this message in context: http://r.789695.n4.nabble.com/x-values-must-be-positive-tp3381744p3381744.html Sent from the R help mailing list archive at Nabble.com.
2011 Feb 28
3
Problems using unique function and !duplicated
Hi, I am trying to simultaneously remove duplicate variables from two or more variables in a small R data.frame. I am trying to reproduce the SAS statements from a Proc Sort with Nodupkey for those familiar with SAS. Here's my example data : test <- read.csv("test.csv", sep=",", as.is=TRUE) > test date var1 var2 num1 num2 1 28/01/11 a 1 213 71 2
2010 Nov 22
2
xlim=c(min(x), max(x)) still produces extra margin on both sides of x axis in plot()
code: op <- par(bg='black',fg='gray',col='gray',col.axis='gray',col.lab='gray',col.main='gray',col.sub='gray',mai=c(0,0,0,0), tck = 0.01, mgp = c(0, -1.4, 0), mar=c(0,0,0,0)) plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(1,1,1, 0.5),yaxt="n", ann=FALSE) abline(v=c(min(x),max(x)), lty=3,
2011 Aug 23
4
Correlation discrepancy
Dear R list, I have one very elementary question regrading correlation between two variables. x = c(44,46,46,47,45,43,45,44) y = c(44,43,41,41,46,48,44,43) > cov(x, y) [1] -2.428571 However, if I try to calculate the covariance using the formula as covariance = sum((x-mean(x))*(y-mean(y)))/8       # no of of paired obs. = 8 or     covariance = sum(x*y)/8-(mean(x)*mean(y)) gives
2013 Apr 25
2
Decomposing a List
Greetings! For some reason I am not managing to work out how to do this (in principle) simple task! As a result of applying strsplit() to a vector of character strings, I have a long list L (N elements), where each element is a vector of two character strings, like: L[1] = c("A1","B1") L[2] = c("A2","B2") L[3] = c("A3","B3")
2011 Nov 18
3
Permutations
Hi all, why factorial(150) shows the error out of range in 'gammafn'? I have to calculate the number of subset formed by 150 samples taking 10 at a time. How is this possible? best [[alternative HTML version deleted]]
2011 May 02
2
vector decreasing by a factor
Hi, I'm quite new to R so this question will sound quite fundamental. I need to create a vector of length 160. The first element should be (1+r)^159 and each element thereafter should decrease by a factor of (1+r) until the 160th element that should be 1. Is there a function similar to seq() but increasing or decreasing by factors? I need to do this in one step i.e, not using loops. Any help
2012 Oct 11
2
Help on probability distribution question
Dear All,   I have a questions I would like to ask about and wonder if you have any thoughts to make it work in R.   1. I work in the field of medicine where physiologic variables are often simulated, and they can not have negative values. Most often the assumption is made to simulate this parameters with a normal distribution but in the "log-domain" to avoid from negative values to be