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
Kingdom.1252
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$mfr
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]
Sub
Something like this might do what you want:
dates<-paste(c("2008"), c("Jan", "Feb", "Sep", "Sep", "Dec"), 1:3,
sep="")
temp<-rnorm(length(dates))*30
data1<-data.frame(Dates=dates, Temp=temp)
data.s1<-data1[grep("Sep", data1[["Dates"]]),]
> data.s1
Dates Temp
3 2008Sep3 22.263627
4 2
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
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
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: r-help@r-pro
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: [
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: jul
the same thing?
Regards
JS
---
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: 27 June 2008 11:10
To: john seers (IFR)
Cc: jim holtman; juli pausas; R-help
Subject: Re: [R] removing blanks from a string
There are well-informed answers given as examples o
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
nal 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 f
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 PROTECTE
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 (rte
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 non-ex
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 matri
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
Hello R people
I have a column of numeric values that are grouped in blocks of 25 and
to be centered and scaled within each block. (That is subtract the mean
and divide by the standard deviation.)
Is there a neater way to do this? i.e not using a loop?
Example looped code:
testdata<-1:100
cs
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
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 .
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
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
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
sinc
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
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("
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
When you start R you get this information:
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
That should help answer your question.
Regards
JS
---
-Original Message-
From
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
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
unstru
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 O
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 and
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
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: r
Hello R experts
I am just learning how to build a package so this is probably a basic
question. I have read the manual( well, to be more truthful, am reading)
the manual, and I have searched the archives to the best of my ability.
I am on Windows.
When running the command "R CMD check packagen
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 a
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
Hi Peter
Perhaps "get" is what you need?
foo.bar <- list( "a"= "a", "b"=1 )
save( file="foo.bar.RData", foo.bar )
rm( foo.bar )
my.fn <- function( fname ) {
load( fname )
attach( get(ls( pat="foo" )) ) # works
#attach( foo.bar ) # works
}
Regards
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 al
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
Kingd
Hi
I use the following method which works well for me.
I create a directory to hold the installed packages e.g. C:\Program
Files\R\mylibrary
Then in my C:\Program Files\R\R-2.5.1\.Renviron file I have a line as
follows:
R_LIBS=C:/PROGRA~1/R/mylibrary
(I think you have to use Windows short
tup from the environment
variable R_LIBS (which should be a semicolon-separated list of
directories at which R library trees are rooted) followed by those in
environment variable R_LIBS_USER.
john seers (IFR) wrote:
>
> I use the following method which works well for me.
>
> I create
41 matches
Mail list logo