similar to: ?any

Displaying 20 results from an estimated 20000 matches similar to: "?any"

2013 Nov 17
4
quotation marks and scan
Dear R People: I'm sure that this is a very simple problem, but I have been wresting with it for some time. I have the following file that has the following one line: CRS("+init=epsg:28992") Fair enough. I scan it into R and get the following: > u [1] "CRS(\"+init=epsg:28992\")" > gsub(pattern='\"',replacement='"',x=u) [1]
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]]
2013 Mar 26
2
edit.data() read-only?
Greetings All. The function edit.data() allows a convenient spreadsheet-like view of a dataframe with too many rows/columns to fit on the screen (especially when there are many columns). Very useful when scanning through a dataset (row & column are conveniently identified by the labels at the side and above). However, there seens to be no option to set it "read-only" on start-up,
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")
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 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
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.
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 "\$" >
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
2012 May 20
2
Histograms with bin proportions on the y-axis
I have what is probably a simple problem. I have a data file from an MCMC Bayes estimation problem that is a vector of 500,000 numeric values (just one variable) ranging from 100,000 to 700,000. I need to display the histogram of this data in a high quality graphic for a figure in a journal publication. I want 100 bins so as to display a reasonable complete and smooth histogram, and I need the
2012 Feb 25
2
Finding name of variable supplied as function argument
Greetings All. I want to do the following simple thing. I have defined a function med3x3() such that, given vectors X,Y, med3x3(X,Y) returns a 3x3 table where: Row 1: X > median(X) Row 2: X = median(X) Row 3: X < median(X) Col 1: Y < median(Y) Col 2: Y = median(Y) Col 3: Y > median(Y) (with intersections of these conditions for the individual cells). I can easily define fixed
2012 Jul 07
5
number of decimal places in a number?
Dear R users, I need a function that gets a number and returns its number of actual decimal places. For example f(3.14) should return 2, f(3.142) should return 3, f(3.1400) should also return 2 and so on. Is such function already available in R? If not, could you give me a hint how to achieve that? Many thanks in advance. -----------------------------------------------------------------
2012 Dec 18
3
Regression line does not show on scatterplot
Hello, I have done a scatterplot and now would like to add its regression line but it does not show. Below, the code I have used. lm3 <- lm(data$S_pH_KCl2.5_BCx~data$B_OleicoPF_BCx_per) plot(data$S_pH_KCl2.5_BCx, data$B_OleicoPF_BCx_per) abline(lm3) I have been able to do the complete operation using the software STATISTICA but it would be great to do it with R. If you require more details
2012 Apr 05
2
"NA" vs. NA
Dear All, I assume this is an R-devel issue, apologies if I missed something obvious. I have a dataframe where the row names are country codes, based on ISO 3166, something like this: ------------ "v1" "v2" "UK" 1 2 "NA" 2 3 ------------ It happens that "NA" is the country code for "Namibia", and that creates problems on
2012 Apr 13
3
A little exercise in R!
Greetings all! A recent news item got me thinking that a problem stated therein could provide a teasing little exercise in R programming. http://www.bbc.co.uk/news/uk-england-cambridgeshire-17680326 Cambridge University hosts first European 'maths Olympiad' for girls The first European girls-only "mathematical Olympiad" competition is being hosted by Cambridge
2012 Jul 10
2
RGB components of plot() colours
A quick question: Is there anywhere a listing of the RGB components of the named colours listed by colors()? For example, where would I find the RGB for "orange1" or "salmon"? When I look at an EPS file from R where I have used these colours, it seems that for: "salmon": 0.9804 0.5020 0.4471 rgb "orange1": 1 0.6471 0 rgb However, this is a tedious way
2010 Oct 18
3
remove numbers from string of characters
Greetings I want to remove numbers from a string of characters that identify sites so that I can merge two data frames. For example, a site in one frame is called "001a Frozen Niagara Entrance" whereas the same site in the other data frame is called "Frozen Niagara Entrance". It seems to me the easiest thing to do would be to remove the numbers from the first data
2010 Nov 11
3
overlap histogram and density
Hi, Does anybody encounter the same problem when we overlap histogram and density     that the density line seem to shift to the right a little bit?           If you do have the same problem, what should we do to correct that?           Thank you.           par(mar=c(4,4,2,1.2),oma=c(0,0,0,0))     hist(datobs,prob=TRUE, main ="Volume of a catchment from four    
2010 Nov 09
6
Extending the accuracy of exp(1) in R
Hi, I want to use a more accurate value of exp(1).  The value given by R is 2.718282. I want a value which has more than 15 decimal places. Can anyone let me know how can I increase the accuracy level. Actually there are some large multipliers of exp(1) in my whole expression, and I want a more accurate result at the last step of my program, and for that I need to use highly accurate value
2010 Nov 13
1
Efficient marginal sums?
Hi Folks, [This is not unrelated to the current "vector of vectors" thread, but arises quite independently] Say I have a function f(x,y) which computes a value for scalar x and y; or, if either x=X or y=Y is a vector, a corresponding vector of values f(X,y) or f(x,Y) (with the usual built-in vectorisation of operations). Now I have X=(x.1,x.2,...,x.m) and Y=(y.1,y.2,...,y.n). I'm