[R] Aligning gel data

2007-10-26 Thread john seers (IFR)
Hello R I have some data from a number of gels showing the distance of bands in each gel and lane. My problem is to align these values by some method. It has been suggested to me (by a Matlab expert) that I could use Spectral methods such as COW (correlation-optimised warping) or PAGA (peak

Re: [R] problem with png()

2007-11-15 Thread john seers (IFR)
Hi Ingo Your code worked for me and I did not lose the title. Not much help I know but my session details are below to compare. Windows XP ... Regards JS sessionInfo() R version 2.6.0 (2007-10-03) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United

[R] Building a formula using paste

2008-02-01 Thread john seers (IFR)
Hi All I have looked but cannot find an answer to this. I want to build a formula dynamically (in a function), using for example paste, and using it in a model: fr-F1 f1-formula(paste(fr, ~ SensoryTerm)) m1-aov(f1, data=vdata) So this is the equivalent of

Re: [R] Building a formula using paste

2008-02-01 Thread john seers (IFR)
February 2008 09:57 To: [EMAIL PROTECTED]; john seers (IFR); [EMAIL PROTECTED] Subject: RE: [R] Building a formula using paste Please disregard my previous reply. Now that I have read your question, all becomes clear. To do what you want to do is a bit tricky. Here is one way f1 - as.name(F1) fm

Re: [R] Building a formula using paste

2008-02-01 Thread john seers (IFR)
Thanks for the help. Regards John Seers --- -Original Message- From: Peter Dalgaard [mailto:[EMAIL PROTECTED] Sent: 01 February 2008 10:04 To: [EMAIL PROTECTED] Cc: john seers (IFR); [EMAIL PROTECTED] Subject: Re: [R] Building a formula using paste [EMAIL PROTECTED] wrote: use

Re: [R] How to search for packages

2008-02-04 Thread john seers (IFR)
Hi I think this is a good suggestion. And I would like to add the associated problem of deciding between packages that do the same function which one is better. Or similarly packages are often superceded. I find I have to spend a lot of time learning how to use packages to decide which one

[R] Using lapply and list names not available

2008-02-05 Thread john seers (IFR)
Hello All Using lapply and ending up with lists of lists I often end up in the position of not having the names of the list passed by lapply. So, if I am doing something like a plot, and I would like the title to reflect which plot it is, I cannot easily do it. So I find myself doing some

Re: [R] modifying arrays within functions

2008-02-05 Thread john seers (IFR)
Hi KB I am not sure exactly what you want to do but perhaps this is this closer to what you need: addition-function(X, a){Xnew-X + a} X-array(1,dim=c(2,2)) a-2 Xa-addition(X,a) Xa Regards JS --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

Re: [R] Using lapply and list names not available

2008-02-05 Thread john seers (IFR)
to plot the data (or whatever) and be able to slap a label on it so I can keep track of what I am doing. Regards John Seers -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: 05 February 2008 16:17 To: john seers (IFR) Cc: R Help Subject: Re: [R] Using lapply

Re: [R] Using lapply and list names not available

2008-02-05 Thread john seers (IFR)
OK, that looks a good suggestion. Though it is a bit of a step towards loops and counting ... Thanks a lot. Regards JS -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Tue 2/5/2008 4:51 PM To: john seers (IFR) Cc: R Help Subject: Re: [R] Using lapply

Re: [R] Difference between P.Value and adj.P.Value

2008-02-11 Thread john seers (IFR)
Hi Corinna The p.adjusted value is the the p-value adjusted for Multiple Comparisons. Enter ?p.adjust to get more of an explanation. Regards JS --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Schmitt, Corinna Sent: 11 February 2008 16:02 To:

Re: [R] Building a package and Depends search

2008-02-19 Thread john seers (IFR)
Thank you very much for your help - that fixed it. Sorry I did not see it in the manual. Regards JS --- -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: 19 February 2008 14:14 To: john seers (IFR) Cc: r-help@r-project.org Subject: Re: [R] Building

Re: [R] fitted values are different from manually calculating

2008-02-19 Thread john seers (IFR)
Hi A simple example of a linear model: x-1:10 y-3*x+1 m1-lm(y~x) y # [1] 4 7 10 13 16 19 22 25 28 31 fitted(m1) # 1 2 3 4 5 6 7 8 9 10 # 4 7 10 13 16 19 22 25 28 31 The fitted and calculated values look identical to me. Can you give an example of how your calculated values

Re: [R] download.file error

2008-04-01 Thread john seers (IFR)
Hi Chib whether there is a way of handling the error you get in the download.file() function I think the function try will do this for you. That is, handle the error. Have a look at ?try. Regards John Seers --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Re: [R] qqline function doesn't plot

2008-08-05 Thread john seers (IFR)
Hi qqline does not do the plot. It adds a line to an existing plot. So you have to do something else first, like: qqnorm(x) qqline(x) JS --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scotty Nelson Sent: 05 August 2008 09:58 To:

Re: [R] removing blanks from a string

2008-06-27 Thread john seers (IFR)
There is also the trim command in the gdata package. Removes blanks from the front of the string as well which may not be what you want. Regards JS --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jim holtman Sent: 27 June 2008 10:27 To: juli

Re: [R] false discovery rate !

2008-07-10 Thread john seers (IFR)
Hi Are all your input p values the same? If so your output FDR values would be the same. Or are all your p-values relatively large? Then (nearly) all your FDR values might be 1. Why don't you put a small example up of what you did? Then we could see what method you used etc. Regards JS

Re: [R] false discovery rate !

2008-07-14 Thread john seers (IFR)
Message- From: A Ezhil [mailto:[EMAIL PROTECTED] Sent: 10 July 2008 16:23 To: r-help@r-project.org; john seers (IFR) Subject: RE: [R] false discovery rate ! Dear John, My P values are not same and the smallest P value = 0.0002. My P value distribution is not that great (see the attached file

Re: [R] par() function does not work

2008-07-23 Thread john seers (IFR)
Hi Fabio Works OK for me. par(mfrow=c(2,2)) par(mfrow) [1] 2 2 But then I am using Windows ... sessionInfo() R version 2.7.1 (2008-06-23) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United

Re: [R] par() function does not work

2008-07-23 Thread john seers (IFR)
Hi Fabio Have you used the name c for something else? Try typing in c at the command line, you should see something like: c function (..., recursive = FALSE) .Primitive(c) Regards John --- for example; par(mfrow=c(2,2)) Error in c(2, 2) : unused argument(s) (2) par$mfrow NULL

Re: [R] Simple... but...

2008-07-23 Thread john seers (IFR)
This is definitely the best way: c(lapply(1:length(x), function(i, x, y) c(x[i], y[i]), x, y), recursive=TRUE) JS --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shubha Vishwanath Karanth Sent: 23 July 2008 13:55 To: [EMAIL PROTECTED]

Re: [R] Just 2 more questions - for now!

2008-07-24 Thread john seers (IFR)
Q1: Have a look at: ?save ?save.image ?load Q2: I am not sure this is right: model-lm(data$admissions~data$maxitemp) Try and code a line that looks more like this with the variables the names of the columns in your data: model-lm(admissions ~ maxitemp + minitemp, data=data) Have a read

Re: [R] add string

2008-07-31 Thread john seers (IFR)
Is this what you want: paste(Mystring, frequency, sep=) --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alfredo Alessandrini Sent: 31 July 2008 10:11 To: r-help@r-project.org Subject: [R] add string Hi, How can I join two string? frequency =

[R] Getting JRI/rJava to work

2008-05-16 Thread john seers (IFR)
Hello All I am trying to get the JRI examples from rJava to work on Windows XP and failing. (And as a more general and connected question is there any review/summary of front-end software for R?) I have installed rJava from the Windows binary supplied. I compile and run the example supplied

Re: [R] Getting JRI/rJava to work

2008-05-16 Thread john seers (IFR)
Hello Trying to run R in a non-existent locale (or at least in a charset iconv() does not understand). However, your example (with suitably modified paths) does work for me in apparently the same locale, so I cannot debug it for you. Thank you for trying. I do not understand the

Re: [R] Sort matrix with duplicate row names alphabetically by rowname

2008-05-19 Thread john seers (IFR)
Try: mat - mat[order(rownames(mat)), ] --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Geeleher Sent: 19 May 2008 12:07 To: r-help@r-project.org Subject: [R] Sort matrix with duplicate row names alphabetically by rowname Hi, I've a

Re: [R] how to use substring match as condition?

2008-05-29 Thread john seers (IFR)
Something like this may be close to what you want: subset(input, field1==blah1 !is.na(charmatch(blah3,input$field3))) --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Albert Vilella Sent: 29 May 2008 11:38 To: r-help@r-project.org Subject: [R]

Re: [R] Scaling a column in groups

2007-11-16 Thread john seers (IFR)
Ah, that is neat. Thanks. JS -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: 16 November 2007 15:12 To: john seers (IFR) Cc: r-help@r-project.org Subject: Re: [R] Scaling a column in groups Try this: c(apply(matrix(testdata, 25), 2, scale)) On Nov 16

Re: [R] Problem with scan() from UTF-8 encoded URL

2007-12-03 Thread john seers (IFR)
Hello Works fine for me: data -scan(file='http://en.wikipedia.org/wiki/Special:Recentchanges',what='c haracter') Read 3581 items So I don't think it is the Wikipedia end. Regards John Seers --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

Re: [R] Rprofile.site not executed?

2008-01-16 Thread john seers (IFR)
Hi I am running under Windows XP using R2.6.1. I pasted your code in my Rprofile.site in the etc directory and it worked for me. All I can suugest is: 1. Check you really put it in the etc directory. (Do you have an old version of R somewhere ...?) 2. Is it really called Rprofile.site. (Not

Re: [R] save a plot from R graphics window (in Windows)

2008-01-24 Thread john seers (IFR)
Hi Are you sure this is an R problem? The Choose dialog can be very slow if you have networked directories that cannot be connected to. Windows tries to connect repeatedly and each time waits for a timeout. Suggest you check your mapped network drives. Regards JS --- Dear R users since

[R] How to assign names in a list

2009-01-19 Thread john seers (IFR)
Hi All How can you associate names with a list when names have not been assigned? For example if you have a list like this: list2-list(1,2,3) list2 [[1]] [1] 1 [[2]] [1] 2 [[3]] [1] 3 How do you make it look like this with names? : f1-1 f2-2 f3-3 list1-list(name1=f1, name2=f2, name3=f3)

Re: [R] How to assign names in a list

2009-01-19 Thread john seers (IFR)
Dallazuanna [mailto:www...@gmail.com] Sent: 19 January 2009 12:30 To: john seers (IFR) Cc: r-help@r-project.org Subject: Re: [R] How to assign names in a list If I understand correctly: names(list2) - paste(name, 1:3, sep = ) On Mon, Jan 19, 2009 at 10:23 AM, john seers (IFR) john.se...@bbsrc.ac.uk