Re: [R] Recovering x/y coordinates from a scatterplot image

2010-10-15 Thread Barry Rowlingson
On Fri, Oct 15, 2010 at 9:46 PM, Rob James aetiolo...@gmail.com wrote: Do I recall correctly that there is an R package that can take an image, and help one estimate the x/y coordinates?  I can't find the package, thought it was an R-tool, but would appreciate any leads. Thanks, I dont know

Re: [R] overloading the generic primitive functions + and [

2010-10-28 Thread Barry Rowlingson
On Thu, Oct 28, 2010 at 9:31 AM, Mark Heckmann mark.heckm...@gmx.de wrote: How can I add a new method to the generic function [ or + I want to create a S3 and S4 class that will use the [ and + method in a different way. How can I overload the generic primitive [ or + so the method dispatch

Re: [R] overloading the generic primitive functions + and [

2010-10-28 Thread Barry Rowlingson
On Thu, Oct 28, 2010 at 2:12 PM, Martin Morgan mtmor...@fhcrc.org wrote: Not so hard, eh? Though then like your S3 implementation this makes all 'Ops' (see ?Ops) Except you have to re-run the set* things every R session: setClass(SS, character) setMethod(Ops, c(SS, SS), function(e1, e2)

Re: [R] overloading the generic primitive functions + and [

2010-10-28 Thread Barry Rowlingson
On Thu, Oct 28, 2010 at 12:14 PM, Christofer Bogaso bogaso.christo...@gmail.com wrote: Dear Barry, this is really interesting. However I could not understand this line: Ops.ss=function(e1,e2){paste(e1,e2)} Where you have told R to behave + function differently when it faces ss class? What

Re: [R] Plots inside a Plot

2010-11-01 Thread Barry Rowlingson
On Mon, Nov 1, 2010 at 11:10 AM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: Not in R base graphics, but you can do easily with the grid package. You can do anything in R base graphics! Sometimes it's been done for you, sometimes you just have to draw the whole thing yourself using

Re: [R] Recursive algorithm

2010-11-01 Thread Barry Rowlingson
On Mon, Nov 1, 2010 at 10:12 AM, Megh Dal megh700...@yahoo.com wrote: Dear friend, I have to construct some recursive algorithm for which I used some for loop like: res - vector(length=1) res[1] = 0 for (i in 2:(1+1)) res[i] - res[i-1]*some function I have noticed that

Re: [R] Drawing circles on a chart

2010-11-03 Thread Barry Rowlingson
On Wed, Nov 3, 2010 at 2:07 AM, Santosh Srinivas santosh.srini...@gmail.com wrote: Dear Group, Inside each cell there should be a circle (sphere preferable) with radius of mod(data value). The color should be either red or green depending on -ve or +ve and the intensity should be based on the

Re: [R] Recoding -- test whether number begins with a certain number

2010-11-03 Thread Barry Rowlingson
On Wed, Nov 3, 2010 at 10:01 AM, Marcel Gerds marcel.ge...@gmx.de wrote:  Dear R community, I have a question concerning recoding of a variable. I have a data set in which there is a variable devoted to the ISCO code describing the occupation of this certain individual

Re: [R] '=' vs '-'

2010-11-03 Thread Barry Rowlingson
On Wed, Nov 3, 2010 at 6:04 PM, km srikrishnamo...@gmail.com wrote: Hi all, can we use '=' instead of '-' operator for assignment in R programs? Yes, mostly, you can also use 'help' to ask such questions: help(=) The operators ‘-’ and ‘=’ assign into the environment in which they

Re: [R] programming questions

2010-11-03 Thread Barry Rowlingson
On Wed, Nov 3, 2010 at 6:17 PM, ivo welch ivo.we...@gmail.com wrote: yikes.  this is all my fault.  it was the first thing that I ever defined when I started using R.   is.defined - function(name) exists(as.character(substitute(name))) I presume there is something much better... You didn't

Re: [R] Plotting a grid of directly specified colours

2010-11-04 Thread Barry Rowlingson
On Thu, Nov 4, 2010 at 4:00 PM, Peter Davenport pwdavenp...@gmail.com wrote: Dear R-help, Could any of you direct me to a function for plotting a grid of colours, directly specified by a matrix of hex colour codes?  In other words I'm looking for a heatmap() or image()-like function to which

Re: [R] Centre of gravity of a mountain

2010-11-09 Thread Barry Rowlingson
On Mon, Nov 8, 2010 at 5:15 PM, Peter Langfelder peter.langfel...@gmail.com wrote: If you also need the z coordinate, it simply the mean of the matrix Z. zCenter = mean(Z) How can that be right? Suppose your mountain is very flat, so that your mountain is effectively a cube. The Z values are

Re: [R] Installing R and an editor on a USB drive

2010-11-10 Thread Barry Rowlingson
On Wed, Nov 10, 2010 at 10:47 AM, Hannu Kahra hka...@gmail.com wrote: (setq inferior-R-program-name G:/r-2.12.0/bin/i386/rterm.exe) since R is installed on the G drive. Everything works if R is on G, but when changing the computer, R is usually on another drive and Emacs cannot find it. Is

Re: [R] Adding meta-data when creating objects. e.g: changing - so to (for example) add creation time - how-to and pros/cons?

2010-11-11 Thread Barry Rowlingson
On Thu, Nov 11, 2010 at 9:37 AM, Tal Galili tal.gal...@gmail.com wrote: 4) My real intention is to somehow change the - operator (not simply the assign).  I am unsure as to how to do that. 5) Are there any major pros/cons to the adding of such meta-data to objects? (for example, excessive

Re: [R] Adding meta-data when creating objects. e.g: changing - so to (for example) add creation time - how-to and pros/cons?

2010-11-12 Thread Barry Rowlingson
On Fri, Nov 12, 2010 at 7:05 AM, Tal Galili tal.gal...@gmail.com wrote: Hello Barry, With regards to the identical == FALSE, it didn't occur to me - great point, thank you. So question: how did you end up changing the -, so to enable the creation of the .metadata object? I haven't done that

Re: [R] Fetching data

2010-11-15 Thread Barry Rowlingson
On Mon, Nov 15, 2010 at 3:46 PM, Feng Mai maif...@gmail.com wrote: IMO it is not possible. The code behind aspx page queries data from a database server and display it on the webpage. That doesn't make it possible. Your web browser is sending a request to the web server, and whatever happens

Re: [R] Problem downloading and opening netcdf file

2010-11-17 Thread Barry Rowlingson
On Wed, Nov 17, 2010 at 2:54 PM, D Kelly O'Day ko...@processtrends.com wrote: I am trying to download and open an on-line netcdf file. I'm using Windows XP and R 2.11.1 Here's my script  library(ncdf)  link - http://ibis.grdl.noaa.gov/SAT/SeaLevelRise/slr/slr_sla_gbl_free_all_66.nc;  

Re: [R] Looking up the directory a file is located in

2010-11-18 Thread Barry Rowlingson
On Thu, Nov 18, 2010 at 12:00 AM, Cliff Clive cliffcl...@gmail.com wrote: Basically I'm just looking for a command that can look up the name of the directory of the script that is running.  If I move or copy the script to another directory, it should be able to read the name of the new

Re: [R] Looking up the directory a file is located in

2010-11-18 Thread Barry Rowlingson
On Thu, Nov 18, 2010 at 3:26 PM, Cliff Clive cliffcl...@gmail.com wrote: So it sounds like the best we can do in R is to keep track of the script in a sort of master file that runs the script, and set the working directory in the master.  Is that accurate? Errr no. Maybe. What? Your script

[R] Function call on every prompt

2010-11-19 Thread Barry Rowlingson
Someone on stackoverflow.com was wondering how to display the current time in the R prompt. I could have swore there was a mechanism for hooking a function into R such that it is was called before the prompt was given, but no amount of searching in R's docs, R's source, or RSiteSearch can find

Re: [R] Function call on every prompt

2010-11-19 Thread Barry Rowlingson
On Fri, Nov 19, 2010 at 3:36 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: Barry was probably remembering SweaveHook. The key is the taskCallbackManager. Does exactly what it says on the tin. Doesn't come up with any of my search strings! Hopefully now this is in R-help it'll come up

Re: [R] How to call web service in R

2010-11-23 Thread Barry Rowlingson
On Tue, Nov 23, 2010 at 8:09 AM, 夏高 xiagao1...@gmail.com wrote: Actually RCurl is not for calling web service. But thank you all the same. Does anybody know how to call web service in R? Thanks! Use RCurl. It can be used for calling web services. A web service is just an HTTP endpoint that

Re: [R] extracted residuals as single column

2010-11-23 Thread Barry Rowlingson
On Tue, Nov 23, 2010 at 10:36 AM, Jennifer Dodd j.d...@bio.gla.ac.uk wrote: Dear list, I am looking for some help with the format of extracted residual values output from: residuals (model1) [1]  0.74140534 0.72464895 0.74873373 0.78313611 0.78836470 0.76934676 0.77448847

Re: [R] Generating kml lines output

2010-11-26 Thread Barry Rowlingson
On Fri, Nov 26, 2010 at 5:03 PM, fbielejec fbiele...@gmail.com wrote: Dear, I would like to generate kml file with lines (LineString) of different style (definitely color, but width would also be nice to see). However with kmlLine from maptools package I am able only to output the single

Re: [R] Where the data file is stored?

2010-08-12 Thread Barry Rowlingson
On Thu, Aug 12, 2010 at 12:37 PM, Stephen Liu sati...@yahoo.com wrote: - Original Message From: Alain Guillet alain.guil...@uclouvain.be To: Stephen Liu sati...@yahoo.com Cc: r-help@r-project.org Sent: Thu, August 12, 2010 5:28:32 PM Subject: Re: [R] Where the data file is stored?

Re: [R] Where the data file is stored?

2010-08-12 Thread Barry Rowlingson
On Thu, Aug 12, 2010 at 4:51 PM, Stephen Liu sati...@yahoo.com wrote: Hi Barry, Following 2 commands are useful to me; row.names(subset(file.info(list.files(getwd(),full.name=TRUE)),isdir)) showing directories. row.names(subset(file.info(list.files(getwd(),full.name=TRUE)),!isdir))

Re: [R] how to test if a vector contain a value?

2010-08-16 Thread Barry Rowlingson
On Mon, Aug 16, 2010 at 2:06 PM, Hyunchul Kim hyunchul.kim@gmail.com wrote: Hi all, How to convert following simple python script to R if x in a_list:    print x OR simply, how to test if a vector contain a value? if(any(a_list == x)){ print(x) } Or use %in%:

Re: [R] R with CouchDB?

2010-08-16 Thread Barry Rowlingson
On Mon, Aug 16, 2010 at 12:40 PM, David Mitchell monch1...@gmail.com wrote: What's the best way to go about extracting data from CouchDB databases, so that I can process it using R?  There don't seem to be any specific R modules for CouchDB, but I find it hard to believe that I'd be the first

Re: [R] R Send an Email

2010-08-17 Thread Barry Rowlingson
On Tue, Aug 17, 2010 at 3:54 PM, Doran, Harold hdo...@air.org wrote: Just out of curiosity, has anyone ever written a function that sends an email to you when an R process has finished? For instance, I often work with very large data sets and certain tasks (e.g., merging records, lmer runs)

Re: [R] Using objectname in function

2010-08-18 Thread Barry Rowlingson
On Wed, Aug 18, 2010 at 12:10 PM, JesperHybel jesperhy...@hotmail.com wrote: f-function(x,y){ table(x,y If you look at the code for 'plot', you'll see it does that with some deparse/substitute magic. Then use the dnn option to table to set the names: f-function(x,y){

Re: [R] Latex no where to be seen

2010-08-20 Thread Barry Rowlingson
On Fri, Aug 20, 2010 at 5:18 AM, Donald Paul Winston satchwins...@yahoo.com wrote: I'm experimenting using R as a report writer. I'm told LaTex is the destination for my quest. But ?latex() gives me an error. The package manager does not have it. The package installer can't find it. Where is

Re: [R] Determining the length of unique items in a vector

2010-08-20 Thread Barry Rowlingson
On Fri, Aug 20, 2010 at 11:01 AM, Ron Michael ron_michae...@yahoo.com wrote: Dear all, let suppose I have following vector: dat1 - c(rep(asd, 5), rep(xyz, 12), rep(erd, 17)) dat1 - dat1[sample(1:length(dat1), length(dat1), replace=F)] dat1  [1] erd xyz erd asd asd erd xyz asd erd erd asd xyz

Re: [R] which one give clear picture-pdf, jpg or tiff?

2010-08-20 Thread Barry Rowlingson
On Fri, Aug 20, 2010 at 12:32 PM, Ted Harding ted.hard...@manchester.ac.uk wrote: Now that you remind me, I do recall sending EPS (not EPSI) files to someone and they could see them in Word (recent version). So perhaps Office has moved on (slightly)! Like you, I use Linux and try to avoid

Re: [R] R reports

2010-08-21 Thread Barry Rowlingson
On Sat, Aug 21, 2010 at 4:09 AM, Donald Paul Winston satchwins...@yahoo.com wrote: The ability to generate standard detail, summary, cross-tabs, and control break reports is very important in government and corporate enterprises. The great thing about standards, as a wise man once said, is

Re: [R] Making a series of similar, but modified .r files - suggested method(s)?

2010-08-21 Thread Barry Rowlingson
On Sat, Aug 21, 2010 at 6:48 PM, Laura S lesla...@gmail.com wrote: Dear all: Any suggestions are much appreciated. I am looking for a way to make a series of similar, but slightly modified, .r files. My issue is automating making 320 .r files that change the for(i in 1:x) in my base .r file

Re: [R] graphing plots of plots

2010-08-21 Thread Barry Rowlingson
On Sat, Aug 21, 2010 at 8:48 PM, r.ookie r.oo...@live.com wrote: I'm trying to understand your question because when I think of a graph, I think of one canvas, on which, various functions are plotted (a function can be one point for example). So, when you say each 'element' do you mean each

Re: [R] Recursion problem

2010-08-22 Thread Barry Rowlingson
On Sun, Aug 22, 2010 at 11:19 AM, jim holtman jholt...@gmail.com wrote: We replied once that your function Grx is not correct.  It will recurse to an infinite depth because there is no condition to end the calls.  I would expect that there would be some test at the beginning of the function to

Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread Barry Rowlingson
On Mon, Aug 23, 2010 at 3:55 PM, Velappan Periasamy veepsi...@gmail.com wrote: Hello Chris Campbell , I tried this for my email id it give me errors from - sprintf(sendma...@%s, Sys.info()[4]) to - veepsi...@gmail.com subject - Hello from R msg - It works! sendmail(from, to, subject,

Re: [R] sendmailR-package-valid code needed

2010-08-24 Thread Barry Rowlingson
On Tue, Aug 24, 2010 at 7:18 AM, veepsirtt veepsi...@gmail.com wrote: I could not install Rmail Package . I got the following errors. Then how to do.please  library(caTools) install.packages(Rmail,contriburl=http://www.math.mcmaster.ca/~bolker/R/src/contrib;) Warning: dependency ‘caTools’

Re: [R] How to remove all objects except a few specified objects?

2010-08-24 Thread Barry Rowlingson
2010/8/24 500600 romu...@gmail.com: a - 1 b - 2 c - 3 ls()[-a]  # set minus to all the objects you want to retain rm(list = ls()[-a]  # will remove all the objects - except a ls()  # presto Only because a=1 and a is the first item in the list! Not because you are doing '-a'! If a is 0

Re: [R] Find classes for each column of a data.frame

2010-08-26 Thread Barry Rowlingson
On Thu, Aug 26, 2010 at 4:31 PM, Daniel Brewer daniel.bre...@icr.ac.uk wrote: Hello, Is there a simple way to get the class type for each column of a data.frame?  I am in the situation where I would like to get all the columns of a data.frame that are factors. I have tried:

Re: [R] Find classes for each column of a data.frame

2010-08-26 Thread Barry Rowlingson
On Thu, Aug 26, 2010 at 4:44 PM, Marc Schwartz marc_schwa...@me.com wrote: sapply(iris, class) Sepal.Length  Sepal.Width Petal.Length  Petal.Width      Species   numeric    numeric    numeric    numeric     factor Note that comparing the result of class(foo) is a bad way of telling if

Re: [R] Remove Loading required package message

2010-08-27 Thread Barry Rowlingson
On Fri, Aug 27, 2010 at 9:09 AM, Sébastien Moretti sebastien.more...@unil.ch wrote: Hi I use --vanilla --quiet --slave options on command line but I always get    Loading required package: ... in stderr. How to remove this line ? Thanks require it quietly: require(sp,quietly=TRUE)

Re: [R] Saving plot to tiff, with high resolution for publication ?

2010-08-29 Thread Barry Rowlingson
On Sun, Aug 29, 2010 at 5:46 PM, Tal Galili tal.gal...@gmail.com wrote: Hello all. A Journal we are sending an article to is asking for the following:  To ensure the best reproduction quality of your figures we would appreciate high resolution files. All figures should preferably be in TIFF

Re: [R] Include local files when running R remotely

2010-08-30 Thread Barry Rowlingson
On Mon, Aug 30, 2010 at 5:29 PM, Erik Shilts erik.shi...@opower.com wrote: I run R on a remote UNIX server where the data are stored that I ssh into through Emacs, while I store my R scripts on local Windows network drives. So far this arrangement hasn't been a problem, though now I'd like to

Re: [R] Remove Loading required package message

2010-08-31 Thread Barry Rowlingson
On Tue, Aug 31, 2010 at 5:21 PM, Allan Engelhardt all...@cybaea.com wrote: On 27/08/10 10:19, Barry Rowlingson wrote: On Fri, Aug 27, 2010 at 9:09 AM, Sébastien Moretti sebastien.more...@unil.ch  wrote:   [...]  require it quietly: require(sp,quietly=TRUE) Doesn't work for me

Re: [R] How to generate integers from uniform distribution with fixed mean

2010-09-02 Thread Barry Rowlingson
On Thu, Sep 2, 2010 at 7:17 AM, Yi liuyi.fe...@gmail.com wrote: Hi, folks, runif (n,min,max) is the typical code for generate R.V from uniform dist. But what if we need to fix the mean as 20, and we want the values to be integers only? It's not clear what you want. Uniformly random

Re: [R] How to generate integers from uniform distribution with fixed mean

2010-09-04 Thread Barry Rowlingson
On Sat, Sep 4, 2010 at 8:07 AM, Yi liuyi.fe...@gmail.com wrote: Sorry I forgot to talk about the range. But as an example, range (17,23) works. In your codes, mean is not exactly 20 and the samples are not integer. The samples *are* integers. sample(17:23,1,TRUE) returns integers.

Re: [R] return from .Call()

2010-09-04 Thread Barry Rowlingson
On Sat, Sep 4, 2010 at 10:17 AM, raje...@cse.iitm.ac.in raje...@cse.iitm.ac.in wrote: Hi, I have a .Call in my R function in a loop that repeats a certain number of times. Each time, the .Call returns a list. So, when I say something like, y-func() would y be a list of lists?(as many as

Re: [R] Aggregate certain rows in a matrix

2010-09-06 Thread Barry Rowlingson
On Mon, Sep 6, 2010 at 3:29 PM, Kennedy henrik.aldb...@gmail.com wrote: I want to reduce the matrix according to the following: If the values of the two first columns are the same in two or more rows the values in the third column of the corresponding rows should be added and only one of the

Re: [R] queue implementation?

2010-09-07 Thread Barry Rowlingson
On Tue, Sep 7, 2010 at 8:11 AM, raje...@cse.iitm.ac.in raje...@cse.iitm.ac.in wrote: Hi, is there a queue implementation in R? Tried RSiteSearch(queue)? There's one in the filehash package that uses on-disk databases, which means it's probably fast and can handle massive data sets.

Re: [R] queue implementation?

2010-09-07 Thread Barry Rowlingson
On Tue, Sep 7, 2010 at 3:26 PM, Spencer Graves spencer.gra...@structuremonitoring.com wrote:       I don't know what you mean by a queue implementation, but consider the following: A queue is a FIFO data structure - the basic operations are to add an item to the queue and to remove an item

Re: [R] queue implementation?

2010-09-07 Thread Barry Rowlingson
If anyone still wants a queue implementation, I've tidied up my code and added some docs in the file. Info here: http://www.maths.lancs.ac.uk/~rowlings/R/Queue/ Not a package, but a single R file with a few functions in it. If anyone wants to put it in a package, go ahead. Barry

Re: [R] Passing aruments with source

2010-09-08 Thread Barry Rowlingson
On Wed, Sep 8, 2010 at 10:11 AM, Joel joda2...@student.uu.se wrote: Hi. Im writing a small test program just to see how passing arguments work with R. From the command line everything works as expected but from inside R using source(test.R) i dont know where and how to send in the arguments

Re: [R] Passing aruments with source

2010-09-08 Thread Barry Rowlingson
On Wed, Sep 8, 2010 at 11:29 AM, Joel joda2...@student.uu.se wrote: That is true but then I (or anyone else using the script) most know exactly what the name in the script is to be able to set it correctly and so on. Therefor it would be much better to be able to just send in the value and

Re: [R] optimized value worse than starting Value

2010-09-08 Thread Barry Rowlingson
On Wed, Sep 8, 2010 at 1:35 PM, Michael Bernsteiner dethl...@hotmail.com wrote: Dear all, I'm optimizing a relatively simple function. Using optimize the optimized parameter value is worse than the starting. why? f-function(delta,P,U){    minimiz-P+delta*U    x-minimiz[1]    

Re: [R] saving heatmaps in graphical format that can be edited in graphic editor tool

2010-09-08 Thread Barry Rowlingson
On Wed, Sep 8, 2010 at 4:32 PM, BD bhakti.dwiv...@gmail.com wrote: I generated a heatmap in R using the following commands: mydata - read.csv(file=Data.csv, header=TRUE, sep=,) mydata - mydata[rowSums(mydata[,-1]^2) 0, ] rownames(mydata)=mydata$Name mydata - mydata[,2:253] mydatamatrix -

Re: [R] optimized value worse than starting Value

2010-09-09 Thread Barry Rowlingson
On Wed, Sep 8, 2010 at 6:26 PM, Michael Bernsteiner dethl...@hotmail.com wrote: @Barry: Yes it is the Rosenbrock Function. I'm trying out some thing I found here: http://math.fullerton.edu/mathews/n2003/PowellMethodMod.html @Ravi: Thanks for your help. I will have a closer look at the BB

Re: [R] modulo operation

2010-09-09 Thread Barry Rowlingson
2010/9/9 José M. Blanco Moreno jmbla...@ub.edu:  Dear R-users, May be there is something that I am not understanding, missed or else... Why do these operations yield these results? 25%/%0.2 [1] 124 25%%0.2 [1] 0.2 I would expect (although I know that what I do expect and what is really

[R] difference of two RData files/environments

2010-09-10 Thread Barry Rowlingson
I just wrote up some code for differencing two .RData files or environments (or one of each). Available from source here: http://www.maths.lancs.ac.uk/~rowlings/R/Ediff/ In its handiest form, running: ediff() will tell you the difference between your working environment and the .RData file

Re: [R] SF-36 questionnaire scoring for R?

2010-09-13 Thread Barry Rowlingson
On Mon, Sep 13, 2010 at 11:16 AM, Dieter Menne dieter.me...@menne-biomed.de wrote: Dear useRs from the physiology department, Does someone know of an implementation of the SF-36 questionnaire scoring in R? I only found SAS and STATA versions, e.g

Re: [R] Need to have more control on cat()

2010-09-13 Thread Barry Rowlingson
On Mon, Sep 13, 2010 at 11:53 AM, Christofer Bogaso bogaso.christo...@gmail.com wrote: Hi all, here is my small piece of codes: fn1 - function(x = 4) {    y - 0    if(y == 0) cat(y value                    is zero\n) # I intentionally created 2nd line here    return(4) } If I run this

Re: [R] Need to have more control on cat()

2010-09-13 Thread Barry Rowlingson
On Mon, Sep 13, 2010 at 12:11 PM, Christofer Bogaso bogaso.christo...@gmail.com wrote: Thanks Barry, I agree it will work. But this approach destroys the indent in the program body therefore entire body of program looks messy, for example cat(Here I        put indent) obviously looks

Re: [R] Simple question, name of the variable as string.

2010-09-17 Thread Barry Rowlingson
On Fri, Sep 17, 2010 at 7:54 AM, C.H. chainsawti...@gmail.com wrote: Dear R users, I have a very simple question and I've tried to search for the answer. (But failed.) there should be a function (func) that work like abc - c(1,2,3,4) func(abc) abc I would like to know the name of that

Re: [R] a reliable way to check the latest version of R on CRAN?

2010-09-17 Thread Barry Rowlingson
On Thu, Sep 16, 2010 at 5:29 PM, Yihui Xie x...@yihui.name wrote: Hi all, We know old.packages() can check for updates of add-on packages, but is there a way to check updates of R itself? go to R homepage is a way, of course, but I hope this can be done by R. I'm not sure about the reliable

Re: [R] diagnosing download.file() problems

2010-09-21 Thread Barry Rowlingson
On Tue, Sep 21, 2010 at 9:39 AM, steven mosher mosherste...@gmail.com wrote: I'm accessing around 95 tar files on an FTP server ranging in size between 10 and 40MB a piece. while certainly can click on them and download them outside of R, I'd like to have my script do it. Retrieving the ftp

Re: [R] HOW to create image like this?

2010-09-21 Thread Barry Rowlingson
On Tue, Sep 21, 2010 at 8:58 AM, zcrself zcrs...@gmail.com wrote: http://r.789695.n4.nabble.com/file/n2548152/25jfmyx.jpg HOW to create image like this? **tp://i55.tinypic.com/25jfmyx.jpg[/IMG] My first response is On an empty stomach, with a handy supply of anti-migraine tablets. I don't

Re: [R] Colorramp in Maptools, how to choose min and max values for the fg= argument

2010-09-22 Thread Barry Rowlingson
On Wed, Sep 22, 2010 at 9:56 AM, schaber kscha...@ipp.mpg.de wrote: Hi Jannis, thanks a lot for your reply. Unfortunately the solution you proposed does not work. Maybe the reason is, that plot.Map only accepts hsv colours and I do not know to convert the rgb colours to the right colour

Re: [R] Reading in .aux (ESRI raster files) into R

2010-09-25 Thread Barry Rowlingson
On Fri, Sep 24, 2010 at 3:21 PM, JoH jh...@york.ac.uk wrote: Error in readAsciiGrid(F:/GIS.LandcoverEuropeForRisk/Sept10kmmaps/Sp10KPointID.aux) :  object 'cellsize' not found My original data in Arc GIS is have a cell size an i'mm curious as to how to make sure all the details are

Re: [R] Output Graphics GIF

2010-09-27 Thread Barry Rowlingson
On Mon, Sep 27, 2010 at 1:39 PM, Nilza BARROS nilzabar...@gmail.com wrote: Dear R users, How could I managed graphics in GIF  format? What I have been doing is graphics in *.ps or *.eps and after I convert them using CONVERT (from ImageMagick) but the output quality is not good.  Since these

Re: [R] A problem with plotting a long expression in ylab ?

2010-09-28 Thread Barry Rowlingson
On Tue, Sep 28, 2010 at 10:03 AM, Tal Galili tal.gal...@gmail.com wrote: Hello, It seems that there is a problem when plotting an expression in the ylab of a plot in case it is too long. Example: plot(1) title(ylab = test

Re: [R] A problem with plotting a long expression in ylab ?

2010-09-28 Thread Barry Rowlingson
On Tue, Sep 28, 2010 at 10:35 AM, Tal Galili tal.gal...@gmail.com wrote: My point is that in regular text, ylab plots it where it then goes outside the borders. With the use of expressions - the text just doesn't show up. Originally I thought it was because of my miss-use of expressions,

Re: [R] is there a way to avoid traveling grid?

2010-10-05 Thread Barry Rowlingson
On Tue, Oct 5, 2010 at 3:37 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: my.data$date I wouldn't use grid - it suggests you try abline, so something like: abline(v=my.data$date,lty=2) - to put vertical lines at your data points. For the horizontal grid lines, we can just

Re: [R] Pointing to a specific place on the x-axis with an arrow

2010-10-06 Thread Barry Rowlingson
On Wed, Oct 6, 2010 at 1:45 AM, Josh B josh...@yahoo.com wrote: Hi all, I am trying to do something simple, but which is deviling me. I want to add an up-arrow to the x-axis, pointing to a specific location on the axis. I want the arrow to be as large as possible. Here is where I'm at

Re: [R] Pointing to a specific place on the x-axis with an arrow

2010-10-06 Thread Barry Rowlingson
On Wed, Oct 6, 2010 at 11:04 AM, Michael Bedward michael.bedw...@gmail.com wrote: On 6 October 2010 20:51, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: Moreover, Josh wanted the arrow to be really big. Is it possible to make it bigger? I would be interested too! Sorry - missed that

Re: [R] Pointing to a specific place on the x-axis with an arrow

2010-10-06 Thread Barry Rowlingson
On Wed, Oct 6, 2010 at 12:29 PM, Ivan Calandra ivan.calan...@uni-hamburg.de wrote:  Hi again, Just one little question. I don't understand what clipping is. Probably a problem with English... Therefore the par(xpd=NA) is not really clear for me; nor is the clip() function. And I don't see

Re: [R] exponentiate elements of a whole matrix

2010-10-13 Thread Barry Rowlingson
On Wed, Oct 13, 2010 at 11:51 AM, Maas James Dr (MED) j.m...@uea.ac.uk wrote: I've tried hard to find a way to exponentiate each element of a whole matrix such that if I start with A A = [ 2   3      2   4] I can get back B B = [ 7.38   20.08      7.38   54.60] I've tried B - exp(A)

Re: [R] Create Arrays

2010-10-15 Thread Barry Rowlingson
On Fri, Oct 15, 2010 at 9:55 AM, dpender d.pen...@civil.gla.ac.uk wrote: Hi, For this example: O - c(0 0 0 2 0 0 2 0) I want to create an array every time O[i] 0.  The array should be in the form; R[j] - array(-1, dim=c(2,O[i])) i.e. if O[i] 0 4 times I want 4 R arrays. Does

Re: [R] Something wrong with my function Please Help

2009-09-29 Thread Barry Rowlingson
On Tue, Sep 29, 2009 at 4:29 AM, Chunhao Tu tu_chun...@yahoo.com wrote: Hi R users, I try to build a function to compute odds ratio and relative risk however something wrong. I stuck for many hours but I really don't know how to solve it. Would someone please give me a hint?

Re: [R] vectors levels are carried through to subsets...

2009-09-29 Thread Barry Rowlingson
On Tue, Sep 29, 2009 at 6:47 PM, chipmaney chipma...@hotmail.com wrote: I have a dataset.  Initially, it has 25 levels for a certain factor, Description. However, I then subset it, because I am only interested in 2 of the 25 factors.  When I subset it, I get the following. The vector lists

Re: [R] Problems with code

2009-10-09 Thread Barry Rowlingson
On Fri, Oct 9, 2009 at 4:54 PM, Anne Buunk ann3bu...@hotmail.com wrote:                          text(0.5,0.5, text = paste(letters[i], +, numbers[j],=, letters [i+j+k]) Missing ) on the end there. You have one ( for text( and one for paste( but only one ). Use an editor that matches

Re: [R] Satellite ocean color palette?

2009-10-09 Thread Barry Rowlingson
On Fri, Oct 9, 2009 at 7:51 PM, Tim Clark mudiver1...@yahoo.com wrote: Dear List, Is there a color palette avaliable similar to what is used in satellite ocean color imagery?  I.e. a gradient with blue on one end and red on the other, with yellow in the middle?  I have tried topo.colors(n)

Re: [R] Running R scripts from a GUI interface

2009-10-10 Thread Barry Rowlingson
On Sat, Oct 10, 2009 at 1:01 PM, Jason Rupert jasonkrup...@yahoo.com wrote: Thank you very much for your response and it looks like R Commander is very capable, but I think it is heading the wrong direction from where we are looking to go, i.e. simpler interface. I guess (and I may be

Re: [R] How do I reverse the digits of a number

2009-10-11 Thread Barry Rowlingson
On Sun, Oct 11, 2009 at 12:53 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: Try this: library(tcltk) as.numeric(tcl(string, reverse, 123)) [1] 321 The bit where the original poster said 'unknown length' worried me: as.numeric(tcl(string, reverse, 12377656534)) [1] 0.4356568

Re: [R] Error in family$family : $ operator is invalid for atomic vectors

2009-10-11 Thread Barry Rowlingson
On Sun, Oct 11, 2009 at 4:54 PM, romunov romu...@gmail.com wrote: Dear List, I'm having problem with an exercise from The R book (M.J. Crawley) on page 567. Here is the entire code upto the point where I get an error. data(UCBAdmissions) x - aperm(UCBAdmissions, c(2, 1, 3))

Re: [R] Social networking around R

2009-10-11 Thread Barry Rowlingson
On Sun, Oct 11, 2009 at 7:51 PM, HBaize hba...@buttecounty.net wrote: Harsh-7 wrote: Hi R users, I'd be interested in what R users think about social networking around all things R. For this, I've set up a social network @ www.rstuff.socialgo.comand it would be great if you could post

Re: [R] Function to find prime numbers

2009-10-13 Thread Barry Rowlingson
On Tue, Oct 13, 2009 at 2:41 PM, Thomas Lumley tlum...@u.washington.edu wrote: On Tue, 13 Oct 2009, AJ83 wrote: I need to create a function to find all the prime numbers in an array. Can anyone point me in the right direction? This almost sounds like a homework problem to me... So here's a

Re: [R] General means of matching a color specification to an official R color name

2009-10-13 Thread Barry Rowlingson
On Tue, Oct 13, 2009 at 9:43 PM, Bryan Hanson han...@depauw.edu wrote: Hello List Dwellers: I¹ve looked around quite a bit, but don¹t quite see an answer that I understand. I¹m looking for a way to take any kind of color specification (rgb, hsv, hcl, hex) and match it to the n-nearest R

Re: [R] General means of matching a color specification to an official R color name

2009-10-13 Thread Barry Rowlingson
On Tue, Oct 13, 2009 at 10:58 PM, Bryan Hanson han...@depauw.edu wrote: Works perfectly!  Thanks Barry.  I had actually seen some suggestions on using a distance, but by then I was thinking about hcl spaces and distance isn't so as simple there.  I'm too tired I think. Anyway, you've got me

Re: [R] default borders in boxplot and barplot

2009-10-14 Thread Barry Rowlingson
On Wed, Oct 14, 2009 at 2:21 AM, Jennifer Young jennifer.yo...@math.mcmaster.ca wrote: This is my first post so hopefully I haven't mucked up the rules. I'm trying to change the default borders in either boxplot or barplot so that, at the request of a journal, all of my figures have the same

Re: [R] Complex? import of pdf files (criminal records) into R table

2009-10-15 Thread Barry Rowlingson
On Thu, Oct 15, 2009 at 3:28 PM, Marc Schwartz marc_schwa...@me.com wrote: On Oct 15, 2009, at 3:43 AM, Biedermann, Jürgen wrote: You don't indicate the OS you are on, but you will want to get a hold of 'pdftotext', which is a command line application that can extract the textual content from

Re: [R] Matrixes as data

2009-10-16 Thread Barry Rowlingson
On Fri, Oct 16, 2009 at 4:36 PM, Kjetil Halvorsen kjetilbrinchmannhalvor...@gmail.com wrote: Hola! I am working on a problem where data points are (square) matrices. Is there a way to make a vector of matrices, such that it can be stored in a data.frame? Can that be done with S3? or do I

Re: [R] Variant of cloud with sticks from points to surface

2009-10-19 Thread Barry Rowlingson
On Mon, Oct 19, 2009 at 5:26 AM, PerfectTiling perfecttil...@yahoo.com wrote: Hi, I'd like to  (1) plot a perspective view of a 3D scatterplot, with a fitted (curved) surface;  (2) have a stick from each point vertically to the surface. The latter helps one visualize where a point lies

Re: [R] Pausing R

2009-10-19 Thread Barry Rowlingson
On Mon, Oct 19, 2009 at 2:01 PM, Karl Ove Hufthammer k...@huftis.org wrote: If you start the application using the command line, just press 'Ctrl + Z' to pause/suspend it. Then type 'fg' when you want to resume it. If you can't get to the command line where you started R, then you can send

Re: [R] News on R s largest corporate partner REVolution Computingand SPSS CEO:

2009-10-21 Thread Barry Rowlingson
On Wed, Oct 21, 2009 at 8:09 PM, Charles Annis, P.E. charles.an...@statisticalengineering.com wrote: David: Do you mean inappropriate or embarrassing? How would we R-ians know what has happened at REVolution were it not for Ajay's note?  Were you planning a press release?  Something like,

Re: [R] random numbers between 0 and 1

2009-10-21 Thread Barry Rowlingson
On Wed, Oct 21, 2009 at 8:37 PM, Gábor Csárdi csa...@rmki.kfki.hu wrote: I would suggest to use the generator at http://submoon.freeshell.org/pix/valium/dilbert_rng.jpg and subtract 8.5. You may laugh (indeed I did) but some medical trials have used (and poss still do) telephone-a-human

Re: [R] arima crashes too

2009-10-22 Thread Barry Rowlingson
On Thu, Oct 22, 2009 at 6:19 PM, Alberto Monteiro albm...@centroin.com.br wrote: Another pathological test. arima does not crash for that series that crashes arma: arima(c(2.01, 2.22, 2.09, 2.17, 2.42), order=c(1,0,0)) However, arima crashes for this: arima(c(1.71, 1.78, 1.95, 1.59,

Re: [R] PDF too large, PNG bad quality

2009-10-22 Thread Barry Rowlingson
On Thu, Oct 22, 2009 at 8:28 PM, Greg Snow greg.s...@imail.org wrote: The problem with the pdf files is that they are storing the information for every one of your points, even the ones that are overplotted by other points.  The png file is smaller because it only stores information on which

Re: [R] arima crashes too

2009-10-23 Thread Barry Rowlingson
On Fri, Oct 23, 2009 at 12:32 PM, Alberto Monteiro albm...@centroin.com.br wrote: I mean that, if I run a loop, it doesn't finish. Or, more catastrophically, if I am running a loop and saving data to an open file, it terminates the loop and does not close the file. Reproducible example:

Re: [R] Determining which file is newer

2009-10-23 Thread Barry Rowlingson
On Fri, Oct 23, 2009 at 5:02 PM, Dennis Fisher fis...@plessthan.com wrote: Colleagues, I wish to execute a task only if a particular file is newer than a second file.  I can access the file modification dates using file.info()$mtime. This yields a time object (? POSIX).                      

  1   2   3   4   5   6   7   >