Re: [R] Spatstat users.
Yes I am an active spatstat use On Wednesday, 28 March 2012, Rolf Turner wrote: This is a cry for help. My apologies for taking up bandwidth with an issue that is not really on topic. But I really do want to acquire the requested information. In the course of preparing my PBRF (performance based research funds) portfolio for the upcoming PBRF exercise here in New Zealand, I have been advised that I should provide some estimate of the number of active users of the spatstat package (of which I am a co-developer with Adrian Baddeley) and which I am touting as one of my contributions to the well-being of the universe. So how do I estimate the number of active users? Bozhemoi! I decided I'd do a survey of the r-help list. So *please* respond (VERY briefly) to this email, saying just Yes I am an active spatstat user, or No I am not an active spatstat user. Please don't alter the subject line. Please respond immediately if you're going to respond at all; I need to have this stuff done by the afternoon of Fri. 30 March 2012, New Zealand time. I leave it to you to decide what *active* user means. I guess if you've done more than just had a brief vague look at the package . I hope to be able to tally the Yes's and No's, take the ratio of the Yes count to the total count, multiply by the total number of subscribers to r-help (which I *hope* to be able to find out from the list maintainer). And there's my estimate. Please don't waste your time telling me this is a load of dingos' kidneys. I know that. The pitfalls and unsatisfied assumptions outnumber the stars in the sky. But what else can I do, eh? Thank you for your time and forbearance. cheers, Rolf Turner __** R-help@r-project.org mailing list https://stat.ethz.ch/mailman/**listinfo/r-helphttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/** posting-guide.html http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
[R] Cran package directory 404 error since 30th December
I have been getting a object not found error trying to access the CRAN package directory since the 30th December. I have tried several mirrors with the same error. A search here only shows a single question on this from anyone else (on the 30th December) which wasn't answered. I am surprised that there hasn't been more comment on this. Is there an announcement somewhere about this that I have missed, that say CRAN packages is down for maintenance or some other planned down time. Many thanks, Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Cran package directory 404 error since 30th December
Thanks Brian, The short answer is that this needs someone in Vienna to fix (people do have vacations and take weekends off), and that the web/packages directory is pure sugar: the packages are still there, the check results are there ... just the summary pages are missing and they are accessible via one (at least) of the mirrors. The person whose message here was unanswered bombarded many people, including CRAN and me personally, so did get several replies. I'm not subscribed to R-devel, and usually just sit and wait for these things to sort themselves out. Generally, even during holiday periods this sort of thing get sorted amazingly quickly, but I was puzzled by the lack of comment. suggesting it may be some DNS look up error at my end. It came to light when browsing he task views and then wanting to read the manual for a particular package, but getting a 404 when I clicked the link. I was obviously un lucky with the mirrors I tried. Any thanks again. Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Can we prepare a questionaire in R
1) Is there a way to populate html form element values directly into R or is it only possible to get the values into a db or an excel file or a csv file and import it for data analysis. I realise this isn't exactly what you are asking, but it is a possible solution. If you google or search these forums you will find information on linking R to the spreadsheet in Google Docs. With GoogleDocs you can create forms that can be filled in online or via email, which automatically populate a google spreadsheet. Running the R code for the analysis then automatically updates with the latest data from the spreadsheet. So the analysis is always based on the latest data. Not sure if that helps, but it may be worth exploring. Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Decision Trees /Decision Analysis with R?
Jon, So TreeAge fits models but won't predict from them? That seems like bizarre behavior. Nothing bizarre about TreeAge, just a different tool in a different disicpline. http://en.wikipedia.org/wiki/Decision_tree Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] BiodiversityR GUI on macosx
Janos, Vegan has just been updated due to a problem with BiodiversityR and R 2.13, not sure if its the same issue you are having, but updating vegan could be worth a try. Graham On 1 June 2011 20:08, János Korponai korponai.ja...@nyuduvizig.hu wrote: Dear List! I installed R and quite a few packages I use. When I try to start BiodiversityR the library loads without any problems but GUI do not start. Rcmdr loads without any problems. I am using R 2.13.0 64 bit. Downgrade to R 2.12.2 works. Thanks, Janos __ 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 commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
[R] medians in Wilcoxon disagree with median function
I am sure I am opening myself up to looking stupid, but I have two samples with medians of 613.5 and 189 (difference in location of 424 compared to the difference suggested from the wilcoxon of 291.5) wilcox.test(pipwtCount,pipwdCount, conf.int=TRUE, na.rm=TRUE) Wilcoxon rank sum test data: pipwtCount and pipwdCount W = 822, p-value = 0.01227 alternative hypothesis: true location shift is not equal to 0 95 percent confidence interval: 58 639 sample estimates: difference in location 291.5 The data is here pipwtCount [1] 532 298 215 1588 38 180 284 376 5349 1024 650 605 1307 6147 21 [16] 453 23 1983 1048 464 2183 1028 1361 163 175 5944 569 622 793 70 [31] 67 1188 248 3010 19 2179 1339 408 113 739 2615 4619 pipwdCount [1] 89 384 12 7032 138 189 383 314 482 96 907 90 1193 154 [16] 305 61 414 4764 1066 121 143 102 174 44 2896 NA 1103 161 199 median(pipwtCount) [1] 613.5 median(pipwdCount,na.rm=T) [1] 189 613.5-189 [1] 424.5 I would appreciate if someone could point out the obvious to me, and explain why there is such a large discrepancy in the differences in location. Many thanks, Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] medians in Wilcoxon disagree with median function
I am sure I am opening myself up to looking stupid, but I have two samples with medians of 613.5 and 189 (difference in location of 424 compared to the difference suggested from the Wilcoxon of 291.5) After a rather frustrating search, with it only explained in one of the books I found. It seems that the difference in medians for the Wilcoxon is calculated by looking at pair wise differences between the observations from each sample, at least in Minitab it is. This would potentially explain the discrepancy I am getting. Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] medians in Wilcoxon disagree with median function
David, I am sure I am opening myself up to looking stupid, Or exposing a failure to read the help page. Well no, and of course I did read the help pages as well as several introductions on Wilcoxon before posting, but as I said in my other post it is generally not at all clear, the distinction between difference between medians and median differences. I didn't find the help page all that enlightening, given that I came to them with a firm misconception about medians and the dummy data sets I created to try and work out what might be going on, plus data sets I pulled from Wilcoxon tutorials gave differences in medians that matched the Wilcoxon median differences. Now that I realise that the Wilcoxon gives median differences, and how they are calculated, it all makes more sense. I realise the data are highly skewed, but what started out as a quick look to see what a Wilcoxon looked like with this data, became an all morning search through text books and google, together with experiments in R, to try and work out why I was getting this discrepancy in locations. I now know why. Thanks, Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Cost-benefit/value for money analysis
Ben Perhaps you can specify your question more precisely, or differently. The way I interpret it, if there are no interactions in price (e.g. you get a discount for buying more than one book at a time) or in value (e.g. you learn more from one book having read another), then you get the best value/price ratio by taking only the book with the highest value/price. (If you take no books at all, your value/price ratio is undefined.) The algebra below shows that combining a lower value/price book with a higher one always lowers your overall value/price ratio. Thanks, for the pointers on R functions. My question was as superficial as it sounded. I have a commercial programme that does this (one of several that are available), and wondered if there was an R package that provided the same tools. It's a common tool, and I had hoped to have explained enough to allow an appropriate package to be identified, so I could have a quick look at what it does. But having started this, I now feel obliged to clarify the question. I only chose books as an easy example, you could substitute alternative marketing strategies, monitoring programmes, choice of ornaments for a new house, or holidays etc. So there could be only a few potential combinations or hundreds. But to stick with the books, and only three options: A, B and C Book A costs $100 and I have given it a subjective value of 50 Book B costs $36 and I have given it a subjective value of 60 Book C costs $50 and I have given it a subjective value of 80 So book A is costing me $2 per value unit, Book B $0.6 per value unit and book C £0.63 per value unit. Buying books A+B gives me a $1.24 per value unit Buying books A+C gives $1.07 per value unit Buying books B+C gives 0.61 per value unit Buying books A+B+C gives 0.97 per value unit So in terms of value for money, there are three contenders Book B on its own, Book C on its own, or buying both books B and C. Book B $36.00 and value 60 Book C $50.00 and value 80 Book B+C at $76.00 and value 140 Depending on how you are using this tool, you can either use it to decide how spend an existing budget, or use it to set a budget. Seems hardly worth the bother for three books but if you are looking at 20 books or 30 different monitoring options etc, it gives a useful insight into how best to spend or set a budget The commercial software graphs this costs vs values so you usually end up with some sort of an asymptotic graph where you can see that spending below a certain budget gives a very poor return. Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Cost-benefit/value for money analysis
David, I think a similar argument at the margins would show that even if the task were specified as maximal value with a budget, simply ordering by the value/price and buying until the cumsum of the price was greater than budget would solve the alternate statement of the problem. I suppose there might be situations where there were marginal choices of buying two books whose value/price was less than marginally maximal because two other marginally maximal choices would break the budget. This sounds like a homework problem and I don't see any student effort yet. Search terms include: decision analysis , cost-benefit analysis, or utility theory. Hopefully, my response to Ben will clarify my question, and why I am asking it. At the moment (and that may change) I'm not specifically interested in how you do it R, just as to whether there is a package aimed at this kind of Cost Benefit analysis. Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Cost-benefit/value for money analysis
Denis, Are you perhaps thinking of conjoint analysis? Thanks, but as far as I can make out, having just looked at conjoint analysis, it looks like some form of discriminant analysis, which is not what I am looking for. I only have two variables cost and value. I am ignoring how you establish the value, I just need to be able to assess every possible combination of costs and value. Its common technique in the Decision Analysis literature (and specialist Decision Analysis software), but I have never seen it given a Specific name. But of course it may have several names, and be used across different disciplines for different purposes. Its such a common tool, that I was hoping that someone would instantly recognise, what I was describing, and be able to say that it was available in a particular package. But I had never looked at conjoint analysis before, so nice to know it exists. Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Cost-benefit/value for money analysis
Liviu Try this: require(sos) findFn('cost benefit') found 12 matches Thanks, I wasn't aware of sos, however, following up the hits hasn't moved me any further forward, except to demonstrate that such a function I want doesn't exist. But I will try some other search options. Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
[R] Cost-benefit/value for money analysis
I assume this has a proper name, but I don't know what it is and wondered if anyone knew of a package that might do the following, or something similar. As an example, assume I have borrowed and read 10 books on R , and I have subjectively given each of them a value score in terms of how useful I think they are. I also know how much each costs in terms of money. What I would like to do is to calculate the costs of every possible combination of the 10 books, and plot the total monetary value for each of these possible combination with their associated subjective value totals, to help decide which combination of books represents the best value for money. I know that some specialist decision analysis software does this sort of thing, but was hoping R might have an appropriate package. Many thanks, Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Preparing data frame for Plotrix kiteChart
Jim, Ben's solution is excellent, I just thought I would add an alternative starting with the X dataframe: x2-matrix(X$Count,ncol=3) rownames(x2)-unique(X$Distance) colnames(x2)-unique(X$Species) kiteChart(t(X3),xlab=Distance,ylab=Species) Thanks, very useful to see an alternative approach. Graham __ 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 commented, minimal, self-contained, reproducible code.
[R] OT Gmane and r-help moderator approval
I have started to read r-help on Gmane using Thunderbird as a reader. Before that I had messages sent to gmail account. The first post through Gmane needed moderator approval, but then I got a message from Your friendly autoauthorizer at Gmane.org saying You are now authorized to post to the gmane.comp.lang.r.general newsgroup. But my messages are still needing moderator approval, which I assumed would no longer be needed given the message from my friendly autoauthorizer Am I missing something here. Thanks __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] OT Gmane and r-help moderator approval
Ted, The moderator approval is being applied by the R-help server (mailman) at ethz.ch, the home of R-help, not by Gmane. If you look at the headers of your latest message (the one to which I am replying) you will see the header: Thanks for the explanation. The message is Posting by a non-member to a members-only list. I was subscribed but for various reasons I thought it would be more convenient to pick up the messages direct from Gmane, but maybe I will just go back to a subscription, as it appears this will be convenent. Thanks again, Graham __ 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 commented, minimal, self-contained, reproducible code.
[R] Preparing data frame for Plotrix kiteChart
Although, I can fix this, I am trying to sort out something as straighforward as possible for my students, and I have some questions that hopefully someone can help me with. My data is: Species DistanceCount A 5 0 A 10 5 A 15 5 A 20 3 A 25 1 B 5 8 B 10 20 B 15 28 B 20 12 B 25 12 C 5 5 C 10 12 C 15 19 C 20 27 C 25 34 But I am struggling to get this into a data frame that does what I expect. I have tried various arrangements. What I am hoping for is: an x-axis labelled Distance with tick marks at 0, 5, 10,15,20 and 25. And, an y-axis labelled Species and tick marks labelled A, B and C. So I would appreciate some help on how the data should be prepared for kiteChart, to maximise the lablels being added automatically. If possible. Many thanks, Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Preparing data frame for Plotrix kiteChart
Ben, Thanks for your help on this. Obviously a bit of a mental block on my part, as it seems painfully obvious now. Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] R reports
Good grief. Adding a report function is not going to make R less flexible. Don't you want to use a tool that's relevant to the rest of the world? That world is much bigger then your world. This is ridiculous. How big a world do you want , Google use R successfully , and it is being used by NIST to analyse what is happening with the oil disaster in the Gulf of Mexico. As an environmental consultant I use R in preference to other programs I have available (Stata, Statistica and Genstat), partly because of its flexibility, but a lot because , in conjunction with SWeave, (which I normally use via Lyx or Orgmode in Emacs) it allows me to produce clent ready reports. Something I couldn't do with the reporting facilities with the other programs. Although, it has and is, taking a lot of learning I am producing client ready reports faster and of a higher quality than I was before. Working to tight budgets and tight deadlines this is important. It has certainly been a lot of hard work to learn, and I am still far from being where I would like to be. And like you, I moaned about how easy things were in the other programs, but until you have experienced the full power of R,and yes, the flexibility it gives, you really are commenting from a platform of ignorance. I would listen carefully to people like Frank Harrell, who has a lot of experience of SAS and R, as well as a lot of experience of working in the very real world of medical research. I would also strongly encourage you to take R for what it is, and learn the many different ways of producing reports. It is a lot to learn, but in my mind well worth it. Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Kite diagrams
Jim, This is very good news, not so much for me, as I don't use them, but I have colleagues who do, and its an expected graphic in student assignments. So I have passed on the information. So many thanks for adding this, I a sure many people will find it useful. Graham On 9 July 2010 09:41, Jim Lemon j...@bitwrit.com.au wrote: On 07/09/2010 07:23 AM, Graham Smith wrote: I asked the same question on R-sig-eco, and Ben Bolker provided this solution, which as I assume this should show up in a search I copy here. However, if someone can come up with a single function, that would be good. Hi Graham, library(plotrix) kiteChart(t(X)) Jim __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Kite diagrams
I asked the same question on R-sig-eco, and Ben Bolker provided this solution, which as I assume this should show up in a search I copy here. However, if someone can come up with a single function, that would be good. -- I don't do kite diagrams at all, but here are some quick dirty solutions. ## inspired by violin plots in: ## http://learnr.wordpress.com/2009/07/02/ggplot2-version-of-figures-in-lattice-multivariate-data-visualization-with-r-part-3/ X - read.table(textConnection(dist spA spB spC 0 0 0 0 5 0 4 0 10 0 20 0 15 5 30 0 20 10 20 0 25 20 8 4 30 15 2 5 35 5 0 10 40 0 0 20 45 0 0 10 50 0 0 5 55 0 0 0),header=TRUE) library(reshape) mX - melt(X,id.var=dist) names(mX)[2:3] - c(species,abundance) mX$fabund - cut(mX$abundance, breaks=c(-0.01,0,5,20,100), labels=c(Abs,Rare,Common,Abundant)) library(ggplot2) p - ggplot(mX, aes(x=dist)) ## plot by proportion p + geom_ribbon(aes(ymax = -abundance, ymin = +abundance))+ facet_grid(species ~ .) ## plot by abundance category p + geom_ribbon(aes(ymax = as.numeric(fabund)-1, ymin = -(as.numeric(fabund)-1)))+ facet_grid(species ~ .) -- Ben Bolker Associate professor, Biology Dep't, Univ. of Florida bol...@ufl.edu / people.biology.ufl.edu/bolker GPG key: people.biology.ufl.edu/bolker/benbolker-publickey.asc Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Best fitted curve using AIC
Simon I need a R script that compare known curves (e.g. logistic, exponential) with my curve. That curve was generated fitting data of forest cover (hectares) measured in 10 road distances (buffers). I´d like that comparison should be done using AICc to select the best model, that is, the best fitted curve in comparison with my data. You could have a look at the fitdistrplus package and have a browse at what is available in the Probability Distributions Task View on Cran. Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] From THE R BOOK - Warning: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
Corrado I am afraid not the paragraph's title is a bit of a give away: Proportion Data and Binomial Errors The sentence reads: are dealt with by using a generalised linear model with a binomial error structure. with the example: glm(y~x,family=binomial) You can check at page 514/515. It would be better to check Chapter 16 (from page 569) on Proportions. The pages you cite don't come across to me as an example of how this procedure should be carried out, but rather a trivial example on the changes in syntax between a linear model and a GLM. Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Three most useful R package
1) What are your 3 most useful R package? On the assumption that we mean those packages that add some generic functionality, then plyr ggplot2 Car and Hmisc (i know that is four) So similar to others peoples list I have others that are always first to be installed, but specific to my interests e.g. vegan. Not sure about the other question Graham __ 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 commented, minimal, self-contained, reproducible code.
[R] citing R - really a bibtex/jabref question
Although this is really a bibtex/Jabref question, I am hoping this might still be the best place for help. The bibtex entry in Jabref is like this @MANUAL{R2009, title = {R: A Language and Environment for Statistical Computing}, author = {{R Development Core Team}}, organization = {R Foundation for Statistical Computing}, address = {Vienna, Austria}, year = {2009}, note = {{ISBN} 3-900051-07-0}, owner = {graham}, timestamp = {2009.12.06}, url = {http://www.R-project.org} } But the author formatting in the Jabref preview and when I paste it into Lyx is parsed to Team, R. D. C. As far as I can make out from the help, the double curly brackets should stop this parsing. Googling has drawn a blank, so does anyone know how I can get this to format as R Development Core Team rather than Team, R.D.C. Many thanks, Graham __ 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 commented, minimal, self-contained, reproducible code.
[R] Reading comments in text file from R
When a text file starts with a few lines commented out with # can you read those line from within R. read.table ignores the comments to load the file, but it would sometimes be useful to be able to read what these comments say. Thanks, Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Reading comments in text file from R
Thanks all. I assumed it would be easy, but searching yielded nothing useful. Graham __ 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 commented, minimal, self-contained, reproducible code.
[R] resampling problem counting number of means above a specific value
I am trying to modify some code from Good 2005. I am trying to resample the mean of 8 values and then count how many times the resampled mean is greater than 10. But my count of means above 10 is coming out as zero, which I know isn't correct. I would appreciate it if someone could look at the code below and tell me what I am doing wrong. Many thanks, Graham LL- c(12.5,17,12,11.5,9.5,15.5,16,14) N-1000 n-length(LL) threshold-10 cnt-0 for(i in 1:N){ + LLb - sample (LL, n, replace=TRUE) + if (mean(LLb)=threshold) cnt-cnt+1 + } cnt [1] 0 __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] resampling problem counting number of means above a specific value
David, Thanks, its me getting mixed up I actually meant less than or equal to 10. That apart, I guess the code is OK, I just expected, especially as I increased N that I might have got some means less than 10, but having gone back to it , I see I need a million iterations before getting two means less than 10. It seems I misjudged the probabilities. Thanks again. Graham 2009/11/15 David Winsemius dwinsem...@comcast.net: On Nov 15, 2009, at 12:12 PM, Graham Smith wrote: I am trying to modify some code from Good 2005. I am trying to resample the mean of 8 values and then count how many times the resampled mean is greater than 10. But my count of means above 10 is coming out as zero, which I know isn't correct. If that is your goal, then why are you using = and not in your test? for(i in 1:N){ + LLb - sample (LL, n, replace=TRUE) + if (mean(LLb) threshold) cnt-cnt+1 + } cnt [1] 1000 I would appreciate it if someone could look at the code below and tell me what I am doing wrong. Many thanks, Graham LL- c(12.5,17,12,11.5,9.5,15.5,16,14) N-1000 n-length(LL) threshold-10 cnt-0 for(i in 1:N){ + LLb - sample (LL, n, replace=TRUE) + if (mean(LLb)=threshold) cnt-cnt+1 + } cnt [1] 0 __ 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 commented, minimal, self-contained, reproducible code. David Winsemius, MD Heritage Laboratories West Hartford, CT __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] resampling problem counting number of means above a specific value
Dimitris, Thanks, I shall give this a try as an alternative. Graham 2009/11/15 Dimitris Rizopoulos d.rizopou...@erasmusmc.nl: try the following: LL - c(12.5,17,12,11.5,9.5,15.5,16,14) n - length(LL) N - 1000 threshold - 10 smpls - sample(LL, N*n, replace = TRUE) dim(smpls) - c(n, N) cnt - sum(colMeans(smpls) threshold) cnt I hope it helps. Best, Dimitris Graham Smith wrote: I am trying to modify some code from Good 2005. I am trying to resample the mean of 8 values and then count how many times the resampled mean is greater than 10. But my count of means above 10 is coming out as zero, which I know isn't correct. I would appreciate it if someone could look at the code below and tell me what I am doing wrong. Many thanks, Graham LL- c(12.5,17,12,11.5,9.5,15.5,16,14) N-1000 n-length(LL) threshold-10 cnt-0 for(i in 1:N){ + LLb - sample (LL, n, replace=TRUE) + if (mean(LLb)=threshold) cnt-cnt+1 + } cnt [1] 0 __ 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 commented, minimal, self-contained, reproducible code. -- Dimitris Rizopoulos Assistant Professor Department of Biostatistics Erasmus University Medical Center Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands Tel: +31/(0)10/7043478 Fax: +31/(0)10/7043014 __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] off topic but need your pointers about statistics
Could anybody give me some pointers about existing books/articles about the greatest inventions/discoveries in statistics? And topic list? You could have a look at http://www.amazon.com/Lady-Tasting-Tea-Statistics-Revolutionized/dp/0805071342/ref=sr_1_1?ie=UTF8s=booksqid=1245356064sr=8-1 Graham __ 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 commented, minimal, self-contained, reproducible code.
[R] Sweave recode(car) and Lyx, compiling but not executing on Mac
I am just beginning to use Sweave with Lyx on a Mac (R2.8.1). I have 12 chunks of Sweave code that work fine, but this piece: = library(car) cabbages$Year-recode(cabbages$Year,'X2001'='2001';'X2002'='2002';'X2003'='2003';'X2004'='2004';'X2005'='2005';'X2006'='2006';'X2007'='2007';'X2008'='2008';'X2009'='2009';'X2010'='2010';'X2011'='2011';'X2012'='2012') @ just prints out verbatim as a single line running off the page (No recoding occurs). It worked in R before pasting into Lyx. Initially I had the double quotes and single quotes the other way round, but this produced this in the complied pdf: cabbages$Year - recode(cabbages$Year, \X2001\=\2001\;\X2002\=\2002\;\X2003\=\2003\;\ etc The first double quote in the printout shown above was a single quote before compiling. I have asked on the Lyx forum for help, but maybe someone here can suggest what I might be doing wrong. Of course it could be a Mac/Lyx issue rather than an SWeave/R issue, but any help would be appreciated. Thanks, Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Sweave recode(car) and Lyx, compiling but not executing on Mac
John, Thanks, its difficult when you don't know where the problem is. The code works fine directly in R on the Mac, and from whta you say it works with Sweave, so it seems to narrow it down to Lyx/Sweave/Mac interaction. Graham 2009/6/12 John Fox j...@mcmaster.ca: Dear Graham, I just tried a similar recode() command using Sweave on a Windows system (not through LyX) and it worked fine. I hope this helps, John -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Graham Smith Sent: June-12-09 10:27 AM To: r-help@r-project.org Subject: [R] Sweave recode(car) and Lyx, compiling but not executing on Mac I am just beginning to use Sweave with Lyx on a Mac (R2.8.1). I have 12 chunks of Sweave code that work fine, but this piece: = library(car) cabbages$Year- recode(cabbages$Year,'X2001'='2001';'X2002'='2002';'X2003'='2003';'X2004'=' 2 004';'X2005'='2005';'X2006'='2006';'X2007'='2007';'X2008'='2008';'X2009'='20 0 9';'X2010'='2010';'X2011'='2011';'X2012'='2012') @ just prints out verbatim as a single line running off the page (No recoding occurs). It worked in R before pasting into Lyx. Initially I had the double quotes and single quotes the other way round, but this produced this in the complied pdf: cabbages$Year - recode(cabbages$Year, \X2001\=\2001\;\X2002\=\2002\;\X2003\=\2003\;\ etc The first double quote in the printout shown above was a single quote before compiling. I have asked on the Lyx forum for help, but maybe someone here can suggest what I might be doing wrong. Of course it could be a Mac/Lyx issue rather than an SWeave/R issue, but any help would be appreciated. Thanks, Graham __ 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 commented, minimal, self-contained, reproducible code. __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Sweave recode(car) and Lyx, compiling but not executing on Mac
Just to follow this up. Changing the document encoding in Lyx from the default (whatever that was) to utf8 (with some help from Jay) allowed some samplerecode code to run (it wouldn't run initially), but my original code still won't run. Strangely looking at the Latex code window in Lyx shows some strange syntax highlighting in my code cabbages$Year-recode(cabbages$Year,'X2001'... The code is higlighted between the $ signs and I wonder if this suggests there are still some sort of encoding problem. Graham 2009/6/12 John Fox j...@mcmaster.ca: Dear Graham, I just tried a similar recode() command using Sweave on a Windows system (not through LyX) and it worked fine. I hope this helps, John -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Graham Smith Sent: June-12-09 10:27 AM To: r-help@r-project.org Subject: [R] Sweave recode(car) and Lyx, compiling but not executing on Mac I am just beginning to use Sweave with Lyx on a Mac (R2.8.1). I have 12 chunks of Sweave code that work fine, but this piece: = library(car) cabbages$Year- recode(cabbages$Year,'X2001'='2001';'X2002'='2002';'X2003'='2003';'X2004'=' 2 004';'X2005'='2005';'X2006'='2006';'X2007'='2007';'X2008'='2008';'X2009'='20 0 9';'X2010'='2010';'X2011'='2011';'X2012'='2012') @ just prints out verbatim as a single line running off the page (No recoding occurs). It worked in R before pasting into Lyx. Initially I had the double quotes and single quotes the other way round, but this produced this in the complied pdf: cabbages$Year - recode(cabbages$Year, \X2001\=\2001\;\X2002\=\2002\;\X2003\=\2003\;\ etc The first double quote in the printout shown above was a single quote before compiling. I have asked on the Lyx forum for help, but maybe someone here can suggest what I might be doing wrong. Of course it could be a Mac/Lyx issue rather than an SWeave/R issue, but any help would be appreciated. Thanks, Graham __ 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 commented, minimal, self-contained, reproducible code. __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Sweave recode(car) and Lyx, compiling but not executing on Mac
While this is a bit embarrassing , it seems I had two problems, one was that the recode command seems to need utf8 coding rather than the Lyx default (which is fine), plus I had typing error in the data set, which is not fine :-(. I rewrote my code using the with command which allowed it to run, but it then became obvious that the recoded resuts were not what I had expected. The typing error then being obvious. The first entry in my rcode was 'X2001'='2001' but the first level in the data set was X20001 and this was enough to cause recode to fail in my original code, but run using the with command. Its now working. Thanks to everyone for there help. Graham 2009/6/12 Graham Smith myotis...@gmail.com: I am just beginning to use Sweave with Lyx on a Mac (R2.8.1). I have 12 chunks of Sweave code that work fine, but this piece: = library(car) cabbages$Year-recode(cabbages$Year,'X2001'='2001';'X2002'='2002';'X2003'='2003';'X2004'='2004';'X2005'='2005';'X2006'='2006';'X2007'='2007';'X2008'='2008';'X2009'='2009';'X2010'='2010';'X2011'='2011';'X2012'='2012') @ just prints out verbatim as a single line running off the page (No recoding occurs). It worked in R before pasting into Lyx. Initially I had the double quotes and single quotes the other way round, but this produced this in the complied pdf: cabbages$Year - recode(cabbages$Year, \X2001\=\2001\;\X2002\=\2002\;\X2003\=\2003\;\ etc The first double quote in the printout shown above was a single quote before compiling. I have asked on the Lyx forum for help, but maybe someone here can suggest what I might be doing wrong. Of course it could be a Mac/Lyx issue rather than an SWeave/R issue, but any help would be appreciated. Thanks, Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Akaike weight in R
Seems pretty clear from a quick glance at that page (and in retrospect, even from the URL itself) that Graham misspelled the package name, Try looking for package, aod (without any caps.) Yep, mea culpa (and I have probably spelt that wrong as well), it was quick after thought as I almost just gave the link to the page. Sorry for the confusion. Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Akaike weight in R
Odette Wondering how can I generate Akaike weight with R? I know the description, but is there any function to generate by R on the web-site or R library? I am using GLM or GLMM (family=binomial), so would be appreciated if you help me. You could have a look at this. http://bm2.genes.nig.ac.jp/RGM2/R_current/library/aod/man/summary.aic.html Which is in the OAD package Graham __ 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 commented, minimal, self-contained, reproducible code.
[R] Suppressing tick labels?
I am trying to suppress the tick labels on the x-axis of the following: barchart(richness[Wood==V]~Sample[Wood==V]) I have tried col.axis=white I have tried removing the axis all together with axes=FALSE I have tried xaxt=n I have also tried labels=c(label1, label2) to replace the default labels, based on reading that the defaults are only printed if an alternative isn't specified. But none of these is making any difference to the graphical output. I know these don't all do exactly the same thing, but I have just been trying to find something that makes any change in the right direction that might help me find a solution. Can any one help with this I am using Ubuntu 8.04 and R 2.8.0. Many thanks, Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Simple Gantt like chart for numbers rather dates
Jim, Gabor is right, gantt.chart comes close but you will have to change all the POSIXct axis calls to plain old axis calls and manually create the list of gantt.info with the x values as numbers. Mmm, I have had a quick look at the code and it seems a bit beyond me, but it could be a good exercise :-) Certainly, this exactly what I want. Thanks, Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Simple Gantt like chart for numbers rather dates
Gabor, Then try something like this. We plot it as a stacked horizontal bargraph where the first bar in the stack is white and with border = 0 so its not visible. # test data - rows are from and to points and # column names are the labels mat - matrix(1:10, 2, byrow = TRUE, dimnames = list(c(from, to), letters[1:5])) bp - barplot(mat, col = c(white, lightblue), border = 0, horiz = TRUE) text(mat[1, ], bp, mat[1,], pos = 4) text(colSums(mat), bp, mat[2,], pos = 2) Thanks, that's a clever approach, I think I will still have a go at editing the Gantt code, but I can get my head around this approach a bit easier. Graham __ 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 commented, minimal, self-contained, reproducible code.
[R] Simple Gantt like chart for numbers rather dates
I would like to produce a chart that looks like a Gantt chart (or shingle plot), but instead of tasks you have variable names and instead of start and finish dates you have an upper and lower numeric value. If that makes sense, is there an obvious way of doing this. Thanks, Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Simple Gantt like chart for numbers rather dates
You could consider modifying the code for gantt.chart in plotrix. Not sure that I have the skills, but I was tempted when I found plotrix earlier today, to see if it could be modified someway. Thanks, Graham __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Simple Gantt like chart for numbers rather dates
Thanks, I will have a look at this. Graham 2008/10/17 jim holtman [EMAIL PROTECTED]: ?segments segments will draw the lines for you, You can also use 'rect' for rectangles. So the functions are there to draw it, you just have to decide how you want it to look. On Fri, Oct 17, 2008 at 3:22 PM, Graham Smith [EMAIL PROTECTED] wrote: I would like to produce a chart that looks like a Gantt chart (or shingle plot), but instead of tasks you have variable names and instead of start and finish dates you have an upper and lower numeric value. If that makes sense, is there an obvious way of doing this. Thanks, Graham __ 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 commented, minimal, self-contained, reproducible code. -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Fw: How to learn R language?
While agreeing with how good the texts that have been suggested are, the questions to me (language + systematic) suggests Braun and Murdoch A first course in statistical programming or/and Chambers Software for data analysis: programming with R These would seem to take you through developing an understanding of language fundamentals, in a more structured manner than the other books mentioned. Graham 2008/8/27 saggak [EMAIL PROTECTED]: --- On Wed, 27/8/08, saggak [EMAIL PROTECTED] wrote: From: saggak [EMAIL PROTECTED] Subject: How to learn R language? To: r-help@r-project.org Date: Wednesday, 27 August, 2008, 3:37 PM Hi! I am a post graduate in Statistics. I want to learn R language, but am very confused as to how to begin systematically. I need to learn R language from Statistics point of view e.g. I need to fit distributions to data or run regression analysis etc. No doubt there are so many articles available on internet. But can someone guide me as to how do I begin and go on improving myself SYSTEMATICALLY? Hence, please guide me as to how should I start learning R language? What should I read first etc. Thanks in advance, Sagga K Unlimited freedom, unlimited storage. Get it now Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/ [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code. __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Quantitative risk analysis with R
Tobias, Thanks I will give this a look, it seems the focus is on credit risk (where I am more interested in environmental risks) but it should still be useful. Graham 2008/8/28 Tobias Verbeke [EMAIL PROTECTED]: Dear Graham, Recently a course with this title, from Vose consulting, was announced on the list. Does anyone know of any books/websites/downloadable tutorials etc that cover the same ground. There is an R package QRMlib on CRAN http://cran.r-project.org/web/packages/QRMlib/index.html that accompanies the book Quantitative Risk Management: Concepts, Techniques and Tools by Alexander J. McNeil, Rüdiger Frey and Paul Embrechts http://www.ma.hw.ac.uk/~mcneil/book/index.html HTH, Tobias ie not just quantitative risk analysis, but specifically on using R for risk analysis and as an alternative to @Risk/Crystal Ball. Many thanks, Graham __ 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 commented, minimal, self-contained, reproducible code. __ 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 commented, minimal, self-contained, reproducible code.
[R] Quantitative risk analysis with R
Recently a course with this title, from Vose consulting, was announced on the list. Does anyone know of any books/websites/downloadable tutorials etc that cover the same ground. ie not just quantitative risk analysis, but specifically on using R for risk analysis and as an alternative to @Risk/Crystal Ball. Many thanks, Graham __ 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 commented, minimal, self-contained, reproducible code.
[R] ubuntu repository for R
Maybe this is more a Ubuntu question,but... I am trying to get synaptic to work with R I have added http://cran.uk.r-project.org/bin/linux/ubuntu as the URL and hardy/ as the distribution. But when I reload the repositories, I get an error Failed to fetch http://cran.uk.r-project.org/bin/linux/ubuntu/hardy/Packages.gz 301 Moved Permanently Some index files failed to download, they have been ignored, or old ones used instead. I'm still struggling with Linux/Ubuntu so can anyone suggest what I might be doing wrong. Many thanks, Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] ubuntu repository for R
Marielle, Thanks for this. I think I have done as you suggest but still get the public key error. Do I need to reboot to get it to work: here is the script: [EMAIL PROTECTED]:~$ gpg --keyserver subkeys.pgp.net --recv E2A11821 gpg: requesting key E2A11821 from hkp server subkeys.pgp.net gpg: key E2A11821: public key Vincent Goulet [EMAIL PROTECTED] imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 [EMAIL PROTECTED]:~$ gpg --export --armor E2A11821 | sudo apt-key add- sudo: unable to resolve host Antec-Linux [sudo] password for graham: Usage: apt-key [command] [arguments] Manage apt's list of trusted keys apt-key add file - add the key contained in file ('-' for stdin) apt-key del keyid - remove the key keyid apt-key export keyid - output the key keyid apt-key exportall - output all trusted keys apt-key update - update keys using the keyring package apt-key net-update - update keys using the network apt-key list- list keys 2008/6/21 Marielle [EMAIL PROTECTED]: I am trying to get synaptic to work with R I have added http://cran.uk.r-project.org/bin/linux/ubuntu as the URL and hardy/ as the distribution. Try a different mirror, I used http://cran-mirror.cs.uu.nl/. When you try apt-get update, you'll get a warning (that's better than an error ;) W: GPG error: http://cran-mirror.cs.uu.nl hardy/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D67FC6EAE2A11821 To solve this, run: gpg --keyserver subkeys.pgp.net --recv E2A11821 gpg --export --armor E2A11821 | sudo apt-key add - apt-get update, and you should be able to install r-base (and any other packages you need). Marielle -- View this message in context: http://www.nabble.com/ubuntu-repository-for-R-tp18043145p18046293.html Sent from the R help mailing list archive at Nabble.com. __ 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 commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] ubuntu repository for R
Dirk, Thanks for this, in fact I did notice the error after posting. I didn't know there was an r-sig-debian list, I shall join and use it for any future questions of this type. Graham 2008/6/21 Dirk Eddelbuettel [EMAIL PROTECTED]: On Sat, Jun 21, 2008 at 06:03:39PM +0100, Graham Smith wrote: Marielle, Thanks for this. I think I have done as you suggest but still get the public key error. Do I need to reboot to get it to work: here is the script: [EMAIL PROTECTED]:~$ gpg --keyserver subkeys.pgp.net --recv E2A11821 gpg: requesting key E2A11821 from hkp server subkeys.pgp.net gpg: key E2A11821: public key Vincent Goulet [EMAIL PROTECTED] imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 [EMAIL PROTECTED]:~$ gpg --export --armor E2A11821 | sudo apt-key add- sudo: unable to resolve host Antec-Linux [sudo] password for graham: Usage: apt-key [command] [arguments] Manage apt's list of trusted keys apt-key add file - add the key contained in file ('-' for stdin) apt-key del keyid - remove the key keyid apt-key export keyid - output the key keyid apt-key exportall - output all trusted keys apt-key update - update keys using the keyring package apt-key net-update - update keys using the network apt-key list- list keys Notice that Marielle (correctly) wrote gpg --export --armor E2A11821 | sudo apt-key add - whereas you used gpg --export --armor E2A11821 | sudo apt-key add- and the space matters. You tell apt-get to use a command 'add-' which doesn't exist whereas you need to tell it to use 'add' with '-' as input (meaning the key will be read on stdin). In the future, consider the r-sig-debian list for Debian / Ubuntu questions. We are now fairly off-topic for R. Dirk 2008/6/21 Marielle [EMAIL PROTECTED]: I am trying to get synaptic to work with R I have added http://cran.uk.r-project.org/bin/linux/ubuntu as the URL and hardy/ as the distribution. Try a different mirror, I used http://cran-mirror.cs.uu.nl/. When you try apt-get update, you'll get a warning (that's better than an error ;) W: GPG error: http://cran-mirror.cs.uu.nl hardy/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D67FC6EAE2A11821 To solve this, run: gpg --keyserver subkeys.pgp.net --recv E2A11821 gpg --export --armor E2A11821 | sudo apt-key add - apt-get update, and you should be able to install r-base (and any other packages you need). Marielle -- View this message in context: http://www.nabble.com/ubuntu-repository-for-R-tp18043145p18046293.html Sent from the R help mailing list archive at Nabble.com. __ 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 commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code. -- Three out of two people have difficulties with fractions. [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Editor for Mac OSX
Have a look at TextMate http://macromates.com/ Graham 2008/6/18 Sebastian Leuzinger [EMAIL PROTECTED]: Dear R-list I am (forced) to change from Linux to Mac and am now looking for a new editor for R. I would like one that features a split window (console + editor) as well as syntax highlighting. Can anyone help? Especially the split-window feature does not seem to be easily available in the editors desribed on the R-help site, except Emacs, which I am reluctant to start using. I am on a MacBook Air with OS X 10.5 using R 2.7.0 Thanks Sebastian .. Sebastian Leuzinger McClintock, PhD University of Basel, Department of Environmental Science Institute of Botany Schönbeinstr. 6 CH-4056 Basel ph0041 (0) 61 2673511 fax 0041 (0) 61 2673504 email [EMAIL PROTECTED] web http://pages.unibas.ch/botschoen/leuzinger private: Thannerstrasse 47, 4054 Basel SWITZERLAND ++41 (0) 77 421 85 59 email [EMAIL PROTECTED] ... _ Connect to the next generation of MSN Messenger http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
[R] extracting averages from smooth.ppp output on spatstat
I have used smooth.ppp in spatstat to create a smoothed surface plot based on randomly selected depths across a lake (as marks). I wonder if based on the smoothed surface plot if I can calculate the average depth for each 10x10 grid square across the lake. I can't see any obvious way of doing this and would appreciate some pointers. Many thanks, Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] R2HTML package and Open Office: text only pasted
Max, Thanks, a few people have suggested this offlist and I am having a look at this, but I just trying to quickly get results into a word processor in a more easily read format than a straight copy and paste. Open Office Writer was ideal in the past, because a straight paste produced a formatted table, something must have changed in the more recent version but so far no reply from the Open Offfice help list. However, now that I have grasped how ODFWeave works I can certainly see that being useful for more formal document creation. Graham On 06/11/2007, Kuhn, Max [EMAIL PROTECTED] wrote: Graham, I'm not sure what the issue is, but I would suggest using OpenOffice directly with the odfWeave package. Max -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Graham Smith Sent: Monday, November 05, 2007 3:02 AM To: [EMAIL PROTECTED] Subject: [R] R2HTML package and Open Office: text only pasted I am trying to use R2HTML (just downloaded from CRAN) to paste R (2.6.0) results output via the clipboard to OpenOffice Writer and Calc (version 2.3on WinXPPro) Pasting into Excel gives a formatted table of results (as expected), but pasting into Calc simply pastes the HTML code. Trying paste special only gives an option to paste unformatted text. Equally, with Writer, in the past when I tried this, the results were pasted as a table, but now they are pasted as HTML code. Again trying to use paste special, there is only an unformatted text option. I am using the simplest R2HTML code option, which as a I said, works with Excel HTML2clip(x) I suspect this is more an OOo issue, but hopefully someone has experience of using this combination and can help. Thanks, Graham [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.