Re: [R] R-help Digest, Vol 54, Issue 30

2007-08-31 Thread David Duffy
Ron Crump wrote:
 Hi,
 
 I have a dataframe that contains pedigree information;
 that is individual, sire and dam identities as separate
 columns. It also has date of birth.
 
 These identifiers are not numeric, or not sequential.
 
 Obviously, an identifier can appear in one or two columns,
 depending on whether it was a parent or not. These should
 be consistent.
 
 Not all identifiers appear in the individual column - it
 is possible for a parent not to have its own record if its
 parents were not known.
 
 Missing parental (sire and/or dam) identifiers can occur.
 
 I need to export the data for use in another program that
 requires the pedigree to be coded as integers, increasing
 with date of birth (therefore sire and dam always have
 lower identifiers than their offspring) and with missing
 values coded as 0.
 
 How would I go about doing this?


You might look at http://www.qimr.edu.au/davidD/sib-pair.R,
specifically the read.pedigree() and wrlink() functions.  The former is not
very impressive speedwise -- I usually perform these tasks in the
my Sib-pair (Fortran) program, which is on the same webpage.  It will order
the pedigree by generational position, so a DOB is not required to do the sort.

Terry Therneau's kinship package does that ordering, but doesn't include
output routines for the Linkage format.

David Duffy.


| David Duffy (MBBS PhD) ,-_|\
| email: [EMAIL PROTECTED]  ph: INT+61+7+3362-0217 fax: -0101  / *
| Epidemiology Unit, Queensland Institute of Medical Research   \_,-._/
| 300 Herston Rd, Brisbane, Queensland 4029, Australia  GPG 4D0B994A v

__
R-help@stat.math.ethz.ch 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 Help

2007-08-28 Thread Henrique Dallazuanna
You don't have installed the akima pakage.

install.packages(akima, dep=T)

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O

On 28/08/07, Ola Asteman [EMAIL PROTECTED] wrote:



 I got the Warning message below when I tried to load Locfit. What is
 wrong?

 Regards
 Ola Asteman


 --

 R version 2.4.0 (2006-10-03)
 Copyright (C) 2006 The R Foundation for Statistical Computing
 ISBN 3-900051-07-0

 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
 Type 'license()' or 'licence()' for distribution details.

 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.

 Type 'demo()' for some demos, 'help()' for on-line help, or
 'help.start()' for an HTML browser interface to help.
 Type 'q()' to quit R.

  library(foreign)
  library(mgcv)
 This is mgcv 1.3-19
  library(locfit)
 Loading required package: akima
 Error: package 'akima' could not be loaded
 In addition: Warning message:
 there is no package called 'akima' in: library(pkg, character.only = TRUE,
 logical = TRUE, lib.loc = lib.loc)
 




 --
 This e-mail and any attachment may be confidential and may a...{{dropped}}

 __
 R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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 Help

2007-08-28 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 28.08.2007 13:33:13:

 You don't have installed the akima pakage.
 
 install.packages(akima, dep=T)

And wait about two months and update your R version to 2.6.0. Or update 
now to 2.5.1

Regards

Petr


 
 -- 
 Henrique Dallazuanna
 Curitiba-Paraná-Brasil
 25° 25' 40 S 49° 16' 22 O
 
 On 28/08/07, Ola Asteman [EMAIL PROTECTED] wrote:
 
 
 
  I got the Warning message below when I tried to load Locfit. What is
  wrong?
 
  Regards
  Ola Asteman
 
 
  
 
--
 
  R version 2.4.0 (2006-10-03)
  Copyright (C) 2006 The R Foundation for Statistical Computing
  ISBN 3-900051-07-0
 
  R is free software and comes with ABSOLUTELY NO WARRANTY.
  You are welcome to redistribute it under certain conditions.
  Type 'license()' or 'licence()' for distribution details.
 
  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.
 
  Type 'demo()' for some demos, 'help()' for on-line help, or
  'help.start()' for an HTML browser interface to help.
  Type 'q()' to quit R.
 
   library(foreign)
   library(mgcv)
  This is mgcv 1.3-19
   library(locfit)
  Loading required package: akima
  Error: package 'akima' could not be loaded
  In addition: Warning message:
  there is no package called 'akima' in: library(pkg, character.only = 
TRUE,
  logical = TRUE, lib.loc = lib.loc)
  
 
 
 
 
  
--
  This e-mail and any attachment may be confidential and m...{{dropped}}

__
R-help@stat.math.ethz.ch 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 help

2007-06-07 Thread Jim Lemon
scott flemming wrote:
 Hi,
 
 I wonder whether R can finish the following project:
 
 I want to make a chart to represent 10 genes. Each gene has orientation and 
 length. Therefore, a gene can be represented by arrows. 
 
 Can R be used to draw 10 arrows in one line ?
 
Hi Scott,
Maybe the feather.plot function in the plotrix package is what you want.

Jim

__
R-help@stat.math.ethz.ch 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 help

2007-06-06 Thread Sarah Goslee
On 6/5/07, scott flemming [EMAIL PROTECTED] wrote:

 Can R be used to draw 10 arrows in one line ?

Um, sure.

Assuming you actually also want to know how to do it, why don't
you take a look at the help for arrows().

Sarah

-- 
Sarah Goslee
http://www.functionaldiversity.org

__
R-help@stat.math.ethz.ch 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 help

2007-06-06 Thread michael watson \(IAH-C\)
Yes, but you need to be a bit more specific... When it comes to graphs
and drawing lines, there isn't much R can't do... 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of scott flemming
Sent: 06 June 2007 04:49
To: r-help@stat.math.ethz.ch
Subject: [R] R help

Hi,

I wonder whether R can finish the following project:

I want to make a chart to represent 10 genes. Each gene has orientation
and length. Therefore, a gene can be represented by arrows. 

Can R be used to draw 10 arrows in one line ?

scott

   
-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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 help

2007-06-06 Thread John Kane

--- scott flemming [EMAIL PROTECTED] wrote:

 Hi,
 
 I wonder whether R can finish the following project:
 
 I want to make a chart to represent 10 genes. Each
 gene has orientation and length. Therefore, a gene
 can be represented by arrows. 
 
 Can R be used to draw 10 arrows in one line ?
 
 scott

Do you mean something like this?

x - 1:10
y - 1:10
plot(x,y, type=n )
arrows(c(1,4,6),c(3,3,3), c(2,3, 7), c(4,4,2))

__
R-help@stat.math.ethz.ch 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-help with apply and ccf

2007-05-22 Thread ONKELINX, Thierry
You could combine them with cbind, and then split the rows again inside
the function you're calling with apply.

Mat - cbind(mat1, mat2)
apply(Mat, 1, function(x){
row.mat1 - x[seq_len(length(x)/2)]
row.mat2 - x[length(x)/2 + seq_len(length(x)/2)]
cor(row.mat1, row.mat2)
})

Cheers,

Thierry



ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Reseach Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
[EMAIL PROTECTED]
www.inbo.be 

Do not put your faith in what statistics say until you have carefully
considered what they do not say.  ~William W. Watt
A statistical analysis, properly conducted, is a delicate dissection of
uncertainties, a surgery of suppositions. ~M.J.Moroney

 

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] Namens Michael Andric
 Verzonden: dinsdag 22 mei 2007 17:35
 Aan: r-help@stat.math.ethz.ch
 Onderwerp: [R] R-help with apply and ccf
 
 Dear R gurus,
 
 I would like to use the ccf function on two matrices that are 
 each 196000 x 12.  Ideally, I want to be able to go row by 
 row for the two matrices using apply for the ccf function and 
 get one 196000 X 1 array output.  The apply function though 
 wants only one array, no?  Basically, is there a way to use 
 apply when there are two arrays in order to do something like 
 correlation on a row by row basis?
 Thanks for your help
 
 Michael
 
   [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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-help with apply and ccf

2007-05-22 Thread Bert Gunter
I understand you to want correlations of corresponding rows (** not ccf,
which returns a vector ccf for each pair of rows). If that is so, 

1) ... in theory, diag(cor(t(A), t(B)) would work without apply, except
196,000 rows is probably too large, and it is probably too inefficient to
compute and then throw away all the off-diagonals anyway.

2. ##Use a 3d array.
 ar - array(c(A,B),dim=c(dim(A),2)) ## this can also be done by abind() in
the abind package
  apply(ar,1,function(x)cor(x[,1],x[,2])) ## Value is a vector

3. ## probably simplest and best
 sapply(seq_along(nrow(a)),function(i)cor(a[i,],b[i,])) ## Note: value is a
vector, not an array


Bert Gunter
Genentech Nonclinical Statistics


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael Andric
Sent: Tuesday, May 22, 2007 8:35 AM
To: r-help@stat.math.ethz.ch
Subject: [R] R-help with apply and ccf

Dear R gurus,

I would like to use the ccf function on two matrices that are each 196000 x
12.  Ideally, I want to be able to go row by row for the two matrices using
apply for the ccf function and get one 196000 X 1 array output.  The apply
function though wants only one array, no?  Basically, is there a way to use
apply when there are two arrays in order to do something like correlation on
a row by row basis?
Thanks for your help

Michael

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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-help Digest, Vol 46, Issue 27

2006-12-27 Thread Grant Izmirlian
On Wednesday 27 December 2006 06:00, [EMAIL PROTECTED] wrote:
 jingjiangyan

I agree, you can use 'assign'. To be more explicit, you could use the 
following function. 

jingjiangyan - 
function(formula, data)
{
  m - match.call()
  %,% - function(x,y)paste(x,y,sep=)
  d.nm - as.character(m$data)
  y.nm - as.character(formula[[2]])
  x.nm - as.character(formula[[3]])
  for(i in levels(data[[x.nm]])){
var.name - d.nm %,% . %,% i
var.val - data[[y.nm]][data[[x.nm]]==i]
cmd - var.name %,%  -  %,% var.val
eval(cmd)
assign(var.name, var.val, globalenv())
  }
}

Next, assuming the data.frame listed in the previous posting, 'df' 
exists in your workspace, the call 

  jingjiangyan(bb ~ aa, data=df)

would produce the desired results.

Cheers,
Grant Izmirlian
-- 
Հրանդ Իզմիրլյան

__
R-help@stat.math.ethz.ch 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-Help

2006-12-06 Thread Uwe Ligges
You might want to contact the nortest maintainer, Juergen Gross (CCing), 
who is not listening to the traffic on this list.

Uwe Ligges

amna khan wrote:
 Respected Sir
 I am a very new user of R. I want to ask a question about the nortest
 package. In this package how we can write the code of ad.test, cvm.test,
 ks.test for other distributions like GEV, GPA etc.
 
 I request you to please  guide to me.
 Kind Regards
 AMNA


__
R-help@stat.math.ethz.ch 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 Help

2006-11-11 Thread David Barron
d - read.table(lahore.txt, header=TRUE)

On 11/11/06, amna khan [EMAIL PROTECTED] wrote:
 Respected Sir
 I request you to please fill the following read.table function and
 read.csvfor my understanding by assuming my data attached with this
 maiL, because I
 am fail to run these functions using manual guidlines.

 read.table(file, header = FALSE, sep = , quote = \',
dec = ., row.names, col.names,
as.is = !stringsAsFactors,
na.strings = NA, colClasses = NA, nrows = -1,
skip = 0, check.names = TRUE, fill = !blank.lines.skip,
strip.white = FALSE, blank.lines.skip = TRUE,
comment.char = #, allowEscapes = FALSE, flush = FALSE,
stringsAsFactors = default.stringsAsFactors())

 read.csv(file, header = TRUE, sep = ,, quote=\, dec=.,
  fill = TRUE, comment.char=, ...)

 read.delim(file, header = TRUE, sep = \t, quote=\, dec=.,
fill = TRUE, comment.char=, ...)

 I shall be really thankful to  you.
 REGARDS

 --
 AMINA SHAHZADI
 Department of Statistics
 GC University Lahore, Pakistan.
 Email:
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]


 __
 R-help@stat.math.ethz.ch 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 Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP

__
R-help@stat.math.ethz.ch 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 Help

2006-11-11 Thread Benilton Carvalho
data = read.delim(lahore.txt)

is enough for what you want to do.

b

On Nov 11, 2006, at 2:11 PM, amna khan wrote:

 Respected Sir
 I request you to please fill the following read.table function and
 read.csvfor my understanding by assuming my data attached with this
 maiL, because I
 am fail to run these functions using manual guidlines.

 read.table(file, header = FALSE, sep = , quote = \',
   dec = ., row.names, col.names,
   as.is = !stringsAsFactors,
   na.strings = NA, colClasses = NA, nrows = -1,
   skip = 0, check.names = TRUE, fill = !blank.lines.skip,
   strip.white = FALSE, blank.lines.skip = TRUE,
   comment.char = #, allowEscapes = FALSE, flush = FALSE,
   stringsAsFactors = default.stringsAsFactors())

 read.csv(file, header = TRUE, sep = ,, quote=\, dec=.,
 fill = TRUE, comment.char=, ...)

 read.delim(file, header = TRUE, sep = \t, quote=\, dec=.,
   fill = TRUE, comment.char=, ...)

 I shall be really thankful to  you.
 REGARDS

 --  
 AMINA SHAHZADI
 Department of Statistics
 GC University Lahore, Pakistan.
 Email:
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 lahore.txt
 __
 R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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 Help

2006-11-11 Thread Nicolas Mazziotta
Not sure of what you ask...
Does it help?

$ read.table(Desktop/lahore.txt, header=T)
   Years lrmax n1 n2 n3 n4 arranged
1   1980 207.6 25 24 23 22 29.4
2   1981  92.7 24 23 22 21 49.4
3   1982  67.5 23 22 21 20 55.1
4   1983  93.8 22 21 20 19 58.0
5   1984  60.6 21 20 19 18 59.0
6   1985 117.4 20 19 18 17 59.1
7   1986  65.3 19 18 17 16 60.6
8   1987  59.1 18 17 16 15 65.3
9   1988  76.9 17 16 15 14 67.5
10  1989 123.1 16 15 14 13 69.6
11  1990  83.1 15 14 13 12 75.7
12  1991  75.7 14 13 12 11 76.8
13  1992  69.6 13 12 11 10 76.9
14  1993  55.1 12 11 10  9 83.1
15  1994  49.4 11 10  9  8 84.2
16  1995  76.8 10  9  8  7 87.0
17  1996 189.7  9  8  7  6 88.2
18  1997 151.1  8  7  6  5 92.7
19  1998  59.0  7  6  5  4 93.8
20  1999  88.2  6  5  4  3110.0
21  2000 110.0  5  4  3  2117.4
22  2001  87.0  4  3  2  1123.1
23  2002  29.4  3  2  1  0136.8
24  2003  84.2  2  1  0  0151.1
25  2004  58.0  1  0  0  0189.7
26  2005 136.8  0  0  0  0207.6
   

Le Samedi 11 Novembre 2006 20:11, amna khan a écrit :
 Respected Sir
 I request you to please fill the following read.table function and
 read.csvfor my understanding by assuming my data attached with this
 maiL, because I
 am fail to run these functions using manual guidlines.

 read.table(file, header = FALSE, sep = , quote = \',
dec = ., row.names, col.names,
as.is = !stringsAsFactors,
na.strings = NA, colClasses = NA, nrows = -1,
skip = 0, check.names = TRUE, fill = !blank.lines.skip,
strip.white = FALSE, blank.lines.skip = TRUE,
comment.char = #, allowEscapes = FALSE, flush = FALSE,
stringsAsFactors = default.stringsAsFactors())

 read.csv(file, header = TRUE, sep = ,, quote=\, dec=.,
  fill = TRUE, comment.char=, ...)

 read.delim(file, header = TRUE, sep = \t, quote=\, dec=.,
fill = TRUE, comment.char=, ...)

 I shall be really thankful to  you.
 REGARDS

-- 
Nicolas Mazziotta

__
R-help@stat.math.ethz.ch 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 Help

2006-11-11 Thread Jeffrey Robert Spies
If you were trying to use the sep=\t argument, you might have  
encountered an error, as there are three tabs one of the two blank  
lines at the end of your data file.  The default for read.table and  
read.delim (as has been suggested by David and Benilton) is  
whitespace, which consumes the unintended tabs w/o problem.

Jeff.

On Nov 11, 2006, at 2:31 PM, Benilton Carvalho wrote:

 data = read.delim(lahore.txt)

 is enough for what you want to do.

 b

 On Nov 11, 2006, at 2:11 PM, amna khan wrote:

 Respected Sir
 I request you to please fill the following read.table function and
 read.csvfor my understanding by assuming my data attached with this
 maiL, because I
 am fail to run these functions using manual guidlines.

 read.table(file, header = FALSE, sep = , quote = \',
   dec = ., row.names, col.names,
   as.is = !stringsAsFactors,
   na.strings = NA, colClasses = NA, nrows = -1,
   skip = 0, check.names = TRUE, fill = !blank.lines.skip,
   strip.white = FALSE, blank.lines.skip = TRUE,
   comment.char = #, allowEscapes = FALSE, flush = FALSE,
   stringsAsFactors = default.stringsAsFactors())

 read.csv(file, header = TRUE, sep = ,, quote=\, dec=.,
 fill = TRUE, comment.char=, ...)

 read.delim(file, header = TRUE, sep = \t, quote=\, dec=.,
   fill = TRUE, comment.char=, ...)

 I shall be really thankful to  you.
 REGARDS

 --  
 AMINA SHAHZADI
 Department of Statistics
 GC University Lahore, Pakistan.
 Email:
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 lahore.txt
 __
 R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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@stat.math.ethz.ch 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-help in Newsreader?

2006-11-06 Thread Jens Scheidtmann
Matthias Voigt [EMAIL PROTECTED] writes:

 Dear list,

 I am new to this all and therefore have following Newbie question:

 How can I receive and read R-help mailings in a newsreader like thunderbird?

Use gmane.comp.lang.r.general on gmane.org

HTH,

Jens

__
R-help@stat.math.ethz.ch 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-help in Newsreader?

2006-11-03 Thread Marc Schwartz
On Fri, 2006-11-03 at 17:36 +0100, Matthias Voigt wrote:
 Dear list,
 
 I am new to this all and therefore have following Newbie question:
 
 How can I receive and read R-help mailings in a newsreader like thunderbird?
 
 Thanks
 Matthias

If you go to the main R web site (http://www.r-project.org/) and click
on the Mailing Lists link, then scroll down to Archives and Search
Facilities, the second bullet indicates that the lists are available
via Gmane, which mirrors the R lists (and many others) to an NNTP
server.

HTH,

Marc Schwartz

__
R-help@stat.math.ethz.ch 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-help in a newsgroup

2006-07-18 Thread Marc Schwartz (via MN)
On Tue, 2006-07-18 at 11:30 -0700, Darren Weber wrote:
 Hi,
 
 I find a lot of the R-help email traffic overloads my inbox.  My IT
 managers are not really happy for me to be subscribed to several
 high-traffic email lists.  I don't want to lose my contact with the
 R-help emails, so I'm having to consider various ways of handling the
 traffic.  Anyhow, I'm wondering how many people on the R-help email
 list would prefer that most of the traffic were in a newsgroup?  In
 case your interested in that option, there is a group available at:
 
 [EMAIL PROTECTED]
 
 I think the subscription is through normal news group channels.  The
 google search services on this group are nice too.  This group is not
 divided into useful categories, like help, admin, develop etc., but
 it's not too difficult to create new groups for that.
 
 Best, Darren

r-help is already available with an NNTP interface at gmane.org:

  http://dir.gmane.org/gmane.comp.lang.r.general

There is also a web based interface, where you can see that your post is
already available:

  http://news.gmane.org/gmane.comp.lang.r.general

Similarly, r-devel is also present:

  http://dir.gmane.org/gmane.comp.lang.r.devel


The Google group you reference is completely independent of the R e-mail
lists, whereas the gmane interface is synchronized with the R e-mail
lists.

HTH,

Marc Schwartz

__
R-help@stat.math.ethz.ch 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-help in a newsgroup

2006-07-18 Thread Duncan Murdoch
On 7/18/2006 2:30 PM, Darren Weber wrote:
 Hi,
 
 I find a lot of the R-help email traffic overloads my inbox.  My IT
 managers are not really happy for me to be subscribed to several
 high-traffic email lists.  I don't want to lose my contact with the
 R-help emails, so I'm having to consider various ways of handling the
 traffic.  Anyhow, I'm wondering how many people on the R-help email
 list would prefer that most of the traffic were in a newsgroup?  In
 case your interested in that option, there is a group available at:
 
 [EMAIL PROTECTED]
 
 I think the subscription is through normal news group channels.  The
 google search services on this group are nice too.  This group is not
 divided into useful categories, like help, admin, develop etc., but
 it's not too difficult to create new groups for that.

If you prefer the newsgroup interface, you should also look at gmane. 
Gabor G posted a list of the newsgroups here:

http://finzi.psych.upenn.edu/R/Rhelp02a/archive/75239.html

recently.

Duncan Murdoch
 
 Best, Darren
 
 __
 R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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-help at stat.math.ethz.ch

2006-05-16 Thread Ben Bolker

  
Xin jasonshi510 at hotmail.com writes:

 
 Dear All:
 


 Then error messga there: initial value in 'vmmin' is not finite
 In addition: There were 38 warnings (use warnings() to see them).
 
 Could you give some advice please?
 
 Thanks a lot!
 
 Xin Shi
 
   [[alternative HTML version deleted]]
 
 __
 R-help at stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 
 

A little more information (and an informative Subject: line)
would help.  A reproducible example (let us know how you're
calling optim(), and ideally show your data or a subsample
of it that produces the same problem --- see the posting guide).

A few ideas:

  - the 'vmmin' error message says that your starting values
are giving non-finite results -- this could be because some
of your x and y values are negative (which in your could
would lead to infinite values).  Bottom line: try your
objective function with your starting parameter values and
see what happens

  - you could use dnbinom(...,log=TRUE) if you wanted

  - you may need to be careful with constraining alpha, beta,
delta, as you could end up with negative means.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 39, Issue 13

2006-05-13 Thread Alan Cobo-Lewis
r-help@stat.math.ethz.ch on Saturday, May 13, 2006 at 6:00 AM -0500 wrote:
 lme(biomass~age, random=~woods/age)?

Jörn

Consult Pinheiro and Bates (2000, Mixed-effects models in S and S-Plus, 
Springer, ISBN 0-387-98957-0 ref 7 at 
http://www.r-project.org/doc/bib/R-books.html ) for how to fit more elaborate 
models, but two straightforward ones that might be adequate
are
lme( biomass~age, random=~1|woods )
and
lme( biomass~age, random=~age|woods )

In the lme4 library corresponding syntax is
lmer( biomass~age+(1|woods) )
and
lmer( biomass~age+(age|woods) )

For vignettes on the lme4 library see the mlmRev library and
@ARTICLE{Rnews:Bates:2005,
  AUTHOR = {Douglas Bates},
  TITLE = {Fitting Linear Mixed Models in {R}},
  JOURNAL = {R News},
  YEAR = 2005,
  VOLUME = 5,
  NUMBER = 1,
  PAGES = {27--30},
  MONTH = {May},
  URL = {[ http://CRAN.R-project.org/doc/Rnews/ 
]http://CRAN.R-project.org/doc/Rnews/}
}

alan

--
Alan B. Cobo-Lewis, Ph.D.   (207) 581-3840 tel
Department of Psychology(207) 581-6128 fax
University of Maine
Orono, ME 04469-5742[EMAIL PROTECTED]

http://www.umaine.edu/visualperception

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 38, Issue 30

2006-04-30 Thread isaac . martin
Mi nueva dirección de correo es: [EMAIL PROTECTED]

New e-mail address: [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R help

2006-04-25 Thread Doran, Harold
Ezra

I don't know what the elements of your matrix are, but if there are a
large proportion of 0s you can work with sparse matrices in the Matrix
package.

Harold
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Erez
Sent: Tuesday, April 25, 2006 8:39 AM
To: r-help@stat.math.ethz.ch
Subject: [R] R help

Hello,

I'm working with large matrix data and i would like to know if there is
any way to reduce the size of it because even that I'm increasing the
memory limit and that i have 1 gb memory the program throwing me out.
There is any way to use a smaller size data (such as using bits or so)
to reduce the size of it.

Erez

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R help

2006-04-25 Thread Gabor Grothendieck
A similar question was just asked. See:

http://tolstoy.newcastle.edu.au/R/help/06/04/25898.html

On 4/25/06, Erez [EMAIL PROTECTED] wrote:
 Hello,

 I'm working with large matrix data and i would like to know if
 there is any way to reduce the size of it because even that I'm
 increasing the memory limit and that i have 1 gb memory the
 program throwing me out.
 There is any way to use a smaller size data (such as using bits or so)
 to reduce the size of it.

 Erez

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R help

2006-04-24 Thread Petr Pikal
Hi

more memory
new comp
new OS
think about possibility to reformulate the problem with help of 
database and loading/processing data in chunks.

Couple of similar questions were answered not long ago so check 
archives.

HTH
Petr



On 24 Apr 2006 at 13:06, Erez wrote:

Date sent:  Mon, 24 Apr 2006 13:06:12 +0200
From:   Erez [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject:[R] R help

 Hello,
 
 I'm trying to create a large matrix and it's extends the limit
 boundaries. The matrix is 100,000x2874 and R is throwing me out, what
 shall i do?
 
 Thanks
 Erez
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html

Petr Pikal
[EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-Help

2006-04-20 Thread Gabor Grothendieck
Read them in as zoo objects (you can replace textConnection(Lines1)
with the filename) and then merge them using all = FALSE to retain
only common time points.  Note that in my English locale I had
to modify your Apl to Apr.

Lines1 - Date  x y
Jan-1,2005120   230
Jan-2,2005123   -125
Jan-3,2005-110  300
Jan-4,2005114   -21
Jan-7,200511299
Mar-5,2005200   311

Lines2 - Date  x  y
Jan-2,2005123   -125
Jan-3,2005-110  300
Jan-4,2005114   -21
Jan-5,200511299
Jan-6,2005-23   12
Mar-5,2005200   311

Lines3 - Date  x  y
Jan-3,2005-110  300
Jan-4,2005114   -21
Jan-5,200511299
Mar-5,2005200   311
Apr-23,2005   123   200
library(zoo)
DF1 - read.zoo(textConnection(Lines1), header = TRUE, format = %b-%d,%Y)
DF2 - read.zoo(textConnection(Lines2), header = TRUE, format = %b-%d,%Y)
DF3 - read.zoo(textConnection(Lines3), header = TRUE, format = %b-%d,%Y)
merge(DF1, DF2, DF3, all = FALSE)


On 4/20/06, stat stat [EMAIL PROTECTED] wrote:
 Dear r-users,

 Suppose I have three datasets:
  Dataset-1:
  Date  x y
  Jan-1,2005120   230
 Jan-2,2005123   -125
 Jan-3,2005-110  300
 Jan-4,2005114   -21
 Jan-7,200511299
 Mar-5,2005200   311

  Dataset-2:
  Date  x  y
  Jan-2,2005123   -125
 Jan-3,2005-110  300
 Jan-4,2005114   -21
 Jan-5,200511299
 Jan-6,2005-23   12
 Mar-5,2005200   311

  Dataset-3:
  Date  x  y
  Jan-3,2005-110  300
 Jan-4,2005114   -21
 Jan-5,200511299
 Mar-5,2005200   311
 Apl-23,2005   123   200
  Now I want to get the common dates along with x and y from this above three 
 datasets keeping the same order
 in date-variable as it is.
  For ex. I want to get:
  Datex  y xy  
 x  y
   (from dataset-1) (from dataset-2)  (from 
 dataset-3)
 
  Jan-3,2005-110  300  -110 300  -110  
 300
 Jan-4,2005 114  -21 114-21   114  
  -21
 Mar-5,2005200   311   200 311  200   
 311
  Can anyone give me any R code to implement this for any number of datasets ?
  Thanks and regards


 thanks in advance

 -


[[alternative HTML version deleted]]

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-Help

2006-04-20 Thread john seers \(IFR\)


I think this does what you require.

#Read your data in whatever way you wish:

d1-data.frame(Date=c(2005/1/1,2005/2/1,2005/1/3,2005/1/4,2005/
1/7,2005/3/5),
x=c(119,123,-110,114,11,200),
y=c(230,-125,300,-21,299,311))

d2-data.frame(Date=c(2005/1/3,2005/1/4,2005/1/5,2005/1/6,2005/
3/5),
x=c(-220,116,888,-239,201),
y=c(301,-23,3000,122,312))


d3-data.frame(Date=c(2005/1/4,2005/1/5,2005/3/5,2005/4/23),
x=c(392,511,600,723),
y=c(-81,6699,9311,1200))


#Make a list

listof-list(d1,d2,d3)


#loop over any number of datasets merging as you go

for ( dataset in 1:length(listof)-1) {
if (dataset == 1) {

res-merge(listof[dataset],listof[dataset+1],all=T,by=Date)   
} else {
res-merge(res,listof[dataset+1],all=T,by=Date)   
}
}


# Hope that helps


JS







 
---

John Seers
Institute of Food Research
Norwich Research Park
Colney
Norwich
NR4 7UA
 

tel +44 (0)1603 251490 
fax +44 (0)1603 255167
e-mail [EMAIL PROTECTED] 
e-disclaimer at http://www.ifr.ac.uk/edisclaimer/ 
 
Web sites:

www.ifr.ac.uk   
www.foodandhealthnetwork.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of stat stat
Sent: 20 April 2006 09:17
To: r-help@stat.math.ethz.ch
Subject: [R] R-Help


Dear r-users,
  
Suppose I have three datasets:
  Dataset-1:
  Date  x y
  Jan-1,2005120   230
Jan-2,2005123   -125
Jan-3,2005-110  300
Jan-4,2005114   -21
Jan-7,200511299
Mar-5,2005200   311
   
  Dataset-2:
  Date  x  y
  Jan-2,2005123   -125
Jan-3,2005-110  300
Jan-4,2005114   -21
Jan-5,200511299
Jan-6,2005-23   12
Mar-5,2005200   311
   
  Dataset-3:
  Date  x  y
  Jan-3,2005-110  300
Jan-4,2005114   -21
Jan-5,200511299
Mar-5,2005200   311
Apl-23,2005   123   200
  Now I want to get the common dates along with x and y from this above
three datasets keeping the same order
in date-variable as it is.
  For ex. I want to get:
  Datex  y xy
x  y
   (from dataset-1) (from dataset-2)  (from
dataset-3)


  Jan-3,2005-110  300  -110 300
-110  300
Jan-4,2005 114  -21 114-21   114
-21
Mar-5,2005200   311   200 311  200
311
  Can anyone give me any R code to implement this for any number of
datasets ?
  Thanks and regards


thanks in advance

-


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 38, Issue 19

2006-04-19 Thread isaac . martin
Mi nueva dirección de correo es: [EMAIL PROTECTED]

New e-mail address: [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 38, Issue 9

2006-04-09 Thread isaac . martin
Mi nueva dirección de correo es: [EMAIL PROTECTED]

New e-mail address: [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 37, Issue 26

2006-03-26 Thread isaac . martin
Mi nueva dirección de correo es: [EMAIL PROTECTED]

New e-mail address: [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 37, Issue 15

2006-03-15 Thread isaac . martin
Mi nueva dirección de correo es: [EMAIL PROTECTED]

New e-mail address: [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 37, Issue 12

2006-03-12 Thread Ferran Carrascosa
Hi r-users,

I would like to know if R have any solution to the Address standardization.
The problem is to classify a database of addresses with the real
addresses of a streets of Spain. Ideally, I would like to assign
Postal code, census data and other geographic information.

If this is not possible I would like to know solutions in R about text
mining, text classification, distance within text data,...

Any help will be appreciate

Thanks in advance

Ferran Carrascosa

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 37, Issue 12

2006-03-12 Thread Liaw, Andy
 From: Ferran Carrascosa
 
 Hi r-users,
 
 I would like to know if R have any solution to the Address 
 standardization. The problem is to classify a database of 
 addresses with the real addresses of a streets of Spain. 
 Ideally, I would like to assign Postal code, census data and 
 other geographic information.

I have no idea about this one...
 
 If this is not possible I would like to know solutions in R 
 about text mining, text classification, distance within text data,...

RSiteSearch(text mining) produced hits that look relevant.

Andy
 
 Any help will be appreciate
 
 Thanks in advance
 
 Ferran Carrascosa
 
 __
 R-help@stat.math.ethz.ch mailing list 
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help list: temporary problem in local archives

2006-03-06 Thread Martin Maechler
 Dimitri == Dimitri Szerman [EMAIL PROTECTED]
 on Mon,  6 Mar 2006 14:17:33 -0300 writes:

Dimitri Hi,

Dimitri It seems the list faced some problems during the
Dimitri weekend, so I am re-sending this message.

To be specific:  The only problems it saw was that the local  *archiving*
had stopped working from ~ Friday 17:30 MET.

The archiver now works again (and I have spent about an hour to
ensure that everything shows up in the archives as it should).

Dimitri's message actually *did* appear well on the list
(yesterday).

Martin Maechler, ETH Zurich
your mailing list manager

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help list: temporary problem in local archives

2006-03-06 Thread Martin Maechler
 Martin == Martin Maechler [EMAIL PROTECTED]
 on Mon, 6 Mar 2006 18:37:06 +0100 writes:

 Dimitri == Dimitri Szerman [EMAIL PROTECTED]
 on Mon,  6 Mar 2006 14:17:33 -0300 writes:

Dimitri Hi,

Dimitri It seems the list faced some problems during the
Dimitri weekend, so I am re-sending this message.

Martin To be specific:  The only problems it saw was that the local  
*archiving*
Martin had stopped working from ~ Friday 17:30 MET.

Martin The archiver now works again (and I have spent about an hour to
Martin ensure that everything shows up in the archives as it should).

well, unfortunately, I have managed to wipeout the index.html file
of the full archive there.  AARgh!
[the archives, its HTML pages, everything is still there, but
 all the older parts are currently not *linked* to]

Recreating everything from scratch (1997) would need so many
hours --- where mailman delivery to r-help was completely blocked ---

that I'm considering other plans to get that file back
(and only recreate the March 2006 part).

All this mess just because of a spam that I wanted to have
removed, something which needs careful manual intervention; I
have failed in my care at one place.

Martin

Martin Dimitri's message actually *did* appear well on the list
Martin (yesterday).

Martin Martin Maechler, ETH Zurich
Martin your mailing list manager

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 37, Issue 1

2006-03-01 Thread isaac . martin
Mi nueva dirección de correo es: [EMAIL PROTECTED]

New e-mail address: [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 36, Issue 21

2006-02-21 Thread Evgeniy Kachalin
Hello, dear R users.

I've already sent a question here, but I'm not sure that it had been read.

I need to visualize classification of my numerical data based on 2-3 
factors. As I suppose, the best way is a tree.
With an orbitrary function at the ends (leaves), or at least with means 
of my data at the ends.

What is the way to do it? As I found, ctree offers binary 
classification, but it that the only way? Of course, tree is not only 
way, may be you could offer other ways.

Thank you.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 36, Issue 21

2006-02-21 Thread Evgeniy Kachalin
Evgeniy Kachalin wrote:
 Hello, dear R users.
 
 I've already sent a question here, but I'm not sure that it had been read.
 
 I need to visualize classification of my numerical data based on 2-3 
 factors. As I suppose, the best way is a tree.
 With an orbitrary function at the ends (leaves), or at least with means 
 of my data at the ends.
 
 What is the way to do it? As I found, ctree offers binary 
 classification, but it that the only way? Of course, tree is not only 
 way, may be you could offer other ways.
 
Or the best way of it is to do it with replacement, like a 'heatmap', 
but with means in the cells instead of colors, if it is possible.

Sorry for the second letter.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help, specifying the places to decimal

2006-02-13 Thread Dimitris Rizopoulos
have a look at ?round()

Best,
Dimitris


Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://www.med.kuleuven.be/biostat/
 http://www.student.kuleuven.be/~m0390867/dimitris.htm


- Original Message - 
From: Subhabrata [EMAIL PROTECTED]
To: r-help r-help@stat.math.ethz.ch
Sent: Monday, February 13, 2006 9:33 AM
Subject: [R] R-help, specifying the places to decimal


 Hello - R-experts,


 Is there any way with which we can specify the number after
 decimal point to take. Like I have a situation where
 the values are comming 0.160325923 but I only want
 4 place to decimal say 0.1603. Is there any way for that.

 I am no expert in R- and this may sound simple to many.sorry


 Thanks for any help.

 With Regards

 Subhabrata

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help, specifying the places to decimal

2006-02-13 Thread Vivek Satsangi
In addition to round() mentioned earlier, if you are merely looking to
*display* your results differently, you may want to check out the
digits option, e.g. in summary():

(This is the method signature for data.frame 's):

 summary(object, maxsum = 7,
digits = max(3, getOption(digits)-3), ...)


(Begin quoted message)
Date: Mon, 13 Feb 2006 14:03:55 +0530
From: Subhabrata [EMAIL PROTECTED]
Subject: [R] R-help, specifying the places to decimal
To: r-help r-help@stat.math.ethz.ch
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain;   charset=iso-8859-1

Hello - R-experts,


Is there any way with which we can specify the number after
decimal point to take. Like I have a situation where
the values are comming 0.160325923 but I only want
4 place to decimal say 0.1603. Is there any way for that.

I am no expert in R- and this may sound simple to many.sorry


Thanks for any help.

With Regards

Subhabrata

--
-- Vivek Satsangi
Student, Rochester, NY USA

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 35, Issue 24

2006-01-25 Thread Ted Harding
I've been reluctant to step into this topic, but now
feel that it may be helpful to make a certain point.

On the internet, for the most part, the person behind
the email is invisible and intangible. It is therefore
possible, when someone puts their foot down, to stamp
inadvertently on someone else's already broken toes.

A friend of mine, very intelligent, very knowledgeable
and creative, very articulate, nevertheless when writing
uses spelling which can be a close approximation to
random, and some interesting variants of grammar and
vocabulary as well.

The reason: dyslexia.

While most of us hit the wrong keys at times (and when
we read back over what we've written tend to see what we
intended to write rather than what we did write), and
when backed against the wall would admit that we could
have got it right if we had paid better attention, there
are some people who can't help getting it wrong.

But, on the internet, one cannot readily recognise who
they are (though in some cases, if one knows the signs,
one may guess).

Best wishes to all,
Ted.


E-Mail: (Ted Harding) [EMAIL PROTECTED]
Fax-to-email: +44 (0)870 094 0861
Date: 25-Jan-06   Time: 10:06:35
-- XFMail --

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 35, Issue 24

2006-01-25 Thread François Pinard
[Gabor Grothendieck]

[...] this list is inhabited by some rather rude participants but
everyone puts up with them in the hope that they do have some useful
remarks.

I've been witnessing this list for about one year, and also read *lots* 
of archived messages.  While it is true that a few members do not use 
white gloves, are rather fond on concise replies, and do express strong 
opinions at times, they never went overboard insulting people and always 
kept a reasonable measure, at least so far that I could see (yet who 
knows, outliers might happen! :-).

(*) Our whole society is a bit shy and shivers easily when opinions are 
expressed nowadays, I often observed than people quickly get insecure,
feel attacked, and overreact (by running away or starting a fight).

there is even a group of thought that feels it is a justifiable way to
keep the list volume under control.

This may work because of the starred paragraph above, that is, for wrong 
reasons.  Best is, and this often occurs on the R list, when everything 
(facts, opinions) is being shared efficiently, without useless arguing.  
Then, threads quickly fade out.

-- 
François Pinard   http://pinard.progiciels-bpi.ca

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 35, Issue 24

2006-01-24 Thread Keith . Chamberlain
Dear Prof Ripley,

First of all, unless you are an english professor, then I do not think you have
any business policing language. I'm still very much a student, both in R, and
regarding signal analysis. My competence on the subject as compared too your
own level of expertise, or my spelling for that matter, may be a contension for
you, but it would have been better had you kept that opinion too yourself. There
are plenty of other reasons besides laziness or carelessness that people will
consistently error in language use, such as learning disorders, head injuries,
and/or vertigo.

On the contrary, I am aware of the definition of a periodogram, and I know what
the unnormalized periodogram in the data I presented looks like. Spec.pgram()
is actually normalized too something, because it's discrete integral is not
well above the SS amplitude of the signal it computed the periodogram for. In
other words, the powers are not in units of around 4,000, which the peak would
be if the units were merely the modulus squared of the Fourier coeficients of
the data I presented. Alas, the modulus squared of the Fourier coeficients IS
the TWO SIDED unnormalized periodogram, ranging from [-fc, fc] | fc=nyquist
critical frequency. The definition of the ONE SIDED periodogram IS the modulus
squared of the Fourier coeficients ranging over [0, fc], but since the function
is even, data points in (0, fc) non-inclusive, need to be multiplied by 2. Thus
is according too the definition given by Press, et al (1988, 1992, 2002, c.f.
cp 12  13). I'm assuming that R returns an FFT in the same layout as Press, et
al describe.

Press, et al. are also very clear about the existence of far too many ways of
normalizing the periodogram too document, which they stated before delving into
particularly how they normalized to the mean squared amplitude of the signal
that the periodogram was computed from. In the page before, and perhaps this is
where some of the confusion arises from, they document the calculations for MS
and SS amplitudes and time integral squared amplitude of the signal in the
time domain, not the frequency domain. The page after that, their example
only shows how to normalize a periodogram so its sum is equal too the MS
amplitude. In short, but starting from SS amplitude:

a). sum(a[index=(1:N) or t=(0:N-1)]^2) = SS amplitude calculated in time domain

b). 1/N * sum(Mod(fft[-fc:fc])^2) = two sided periodogram that sums too the SS
amplitude

c). Same as b but over the range [0, fc], and (0, fc) multiplied by 2 is the one
sided periodogram, also sums too the SS amplitude

For MS amplitude, the procedures are identical, only the time domain is divided
by N, and the frequency domain figures are divided by N^2 instead of N.

When the periodogram is in power per unit time, as in the above, so that the
power is interpretable at N/2+1 independent frequencies, it is a normalized
periodogram. spec.pgram() IS normalized, I just do not know what it's
normalized too because I can not seem to get spec.pgram to stop tapering (at
which point the normalization should be dead on, not just close).

By the way, normalized does not automatically mean anything unless to what
is stated. I could normalize something arbitrarily to the number of tics on my
dogs back side, and still call it normed, or erroneously refer too it as
unnormed. If normalized is suposed to mean something specific, then I am
confident that more than 90% of undergraduates are not familiar with what the
term should mean. Stats and coding and using programs are a human endeavor.
This human seems to have made meaning out of terms differently than what those
who wrote the documentation seem to have intended. Only, I do not know where
the documentation or my understanding may have been missled (R docs, Numerical
Recipes, or any other source I looked at since I started).

Cheers,
KeithC.

First, please look up `too' in your dictionary.

Second, please study the references on the help page, which give the
details.  That is what references are for!  The references will also
answer your question about the reference distribution.

The help page does not say it is `normalized' at all: it says it computes
the peridogram, and you seem unaware of the definitions of the latter (and
beware, there are more than one).

On Tue, 24 Jan 2006, Keith Chamberlain wrote:

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 35, Issue 24

2006-01-24 Thread Spencer Graves
Dear Mr. Chamberlain:

  You asked for free consulting, and as near as I can tell, you got 
pretty good advice.  Now you complain that you don't like the packaging. 
  If you can't stand the heat, get out of the kitchen.

  Professor Brian Ripley has an international reputation based on solid 
contributions to human knowledge over many years.  He is an expert in 
statistical science, not diplomacy.  Professor Ripley has been 
incredibly generous in donating substantial portions of his time for 
many years both to help make R what it is today and to answering 
questions on this listserve.  I think he deserves a great deal of 
respect for not only the time he has devoted to this but to how much he 
has achieved with that time.

  What would you like him to do as a result of your email?  Retire? 
Stop contributing to this listserve and to the R project more generally? 
  I sincerely hope he does not consider such.  It would be a great loss 
to humanity if he did.

  Mr. Chamberlain, if English (or as Prof. Ripley might say, 
American) is your mother tongue, then your deplorable lack of skill in 
its use raises serious questions about the standard of academic 
excellence at the University of Colorado, which I had previously thought 
was a great university and the finest Colorado had to offer.  Of course, 
if English is a second language for you, then I would not complain. 
Rather, I would be humbled and honored that you chose to meet the rest 
of the world in my native tongue.  Another question:  The web lists you 
as a senior in psychology.  Have you learned anything in your study of 
psychology?  I would think that psychology students should meet a much 
higher standard for social skills and communications than you have 
displayed today.  Would you like me to forward your correspondence to, 
say, the editor of the Flatiron News there in Boulder or Prof. W. Edward 
Craighead, the chair of the Psychology Dept., asking if a degree from 
the once-great University of Colorado is supposed to imply that the 
degree holder meets any standard for academic excellence in comportment 
and the use of language?

  Sincerely,
  Spencer Graves

[EMAIL PROTECTED] wrote:

 Dear Prof Ripley,
 
 First of all, unless you are an english professor, then I do not think you 
 have
 any business policing language. I'm still very much a student, both in R, and
 regarding signal analysis. My competence on the subject as compared too your
 own level of expertise, or my spelling for that matter, may be a contension 
 for
 you, but it would have been better had you kept that opinion too yourself. 
 There
 are plenty of other reasons besides laziness or carelessness that people will
 consistently error in language use, such as learning disorders, head injuries,
 and/or vertigo.
 
 On the contrary, I am aware of the definition of a periodogram, and I know 
 what
 the unnormalized periodogram in the data I presented looks like. Spec.pgram()
 is actually normalized too something, because it's discrete integral is not
 well above the SS amplitude of the signal it computed the periodogram for. In
 other words, the powers are not in units of around 4,000, which the peak would
 be if the units were merely the modulus squared of the Fourier coeficients of
 the data I presented. Alas, the modulus squared of the Fourier coeficients IS
 the TWO SIDED unnormalized periodogram, ranging from [-fc, fc] | fc=nyquist
 critical frequency. The definition of the ONE SIDED periodogram IS the modulus
 squared of the Fourier coeficients ranging over [0, fc], but since the 
 function
 is even, data points in (0, fc) non-inclusive, need to be multiplied by 2. 
 Thus
 is according too the definition given by Press, et al (1988, 1992, 2002, 
 c.f.
 cp 12  13). I'm assuming that R returns an FFT in the same layout as Press, 
 et
 al describe.
 
 Press, et al. are also very clear about the existence of far too many ways of
 normalizing the periodogram too document, which they stated before delving 
 into
 particularly how they normalized to the mean squared amplitude of the signal
 that the periodogram was computed from. In the page before, and perhaps this 
 is
 where some of the confusion arises from, they document the calculations for MS
 and SS amplitudes and time integral squared amplitude of the signal in the
 time domain, not the frequency domain. The page after that, their example
 only shows how to normalize a periodogram so its sum is equal too the MS
 amplitude. In short, but starting from SS amplitude:
 
 a). sum(a[index=(1:N) or t=(0:N-1)]^2) = SS amplitude calculated in time 
 domain
 
 b). 1/N * sum(Mod(fft[-fc:fc])^2) = two sided periodogram that sums too the SS
 amplitude
 
 c). Same as b but over the range [0, fc], and (0, fc) multiplied by 2 is the 
 one
 sided periodogram, also sums too the SS amplitude
 
 For MS amplitude, the procedures are identical, only the time domain is 
 divided
 by N, and 

Re: [R] R-help Digest, Vol 35, Issue 24

2006-01-24 Thread François Pinard
[EMAIL PROTECTED], addressing to Brian Ripley]

First of all, unless you are an english professor, then I do not think
you have any business policing language.

We all do mistakes (English or otherwise).  I'm very grateful that 
people forgive my own errors, and I try to be tolerant to others.  (Yet, 
it happens that people lacking good will ask for stronger reactions.)

This is the business of everybody, really, building a better community 
in every possible aspect, and the means for this go through interaction 
and collaboration.  Let's all be humble enough to ponder the criticism 
of others, improve ourselves, and so increase the value of our share.

-- 
François Pinard   http://pinard.progiciels-bpi.ca

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 35, Issue 24

2006-01-24 Thread Gabor Grothendieck
Its not really you.  Its a fact of life that this list is inhabited by
some rather rude participants but everyone puts up with
them in the hope that they do have some useful remarks.
This has been discussed repeatedly on the list and there
is even a group of thought that feels it is a justifiable way
to keep the list volume under control.

On 1/24/06, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Dear Prof Ripley,

 First of all, unless you are an english professor, then I do not think you 
 have
 any business policing language. I'm still very much a student, both in R, and
 regarding signal analysis. My competence on the subject as compared too your
 own level of expertise, or my spelling for that matter, may be a contension 
 for
 you, but it would have been better had you kept that opinion too yourself. 
 There
 are plenty of other reasons besides laziness or carelessness that people will
 consistently error in language use, such as learning disorders, head injuries,
 and/or vertigo.

 On the contrary, I am aware of the definition of a periodogram, and I know 
 what
 the unnormalized periodogram in the data I presented looks like. Spec.pgram()
 is actually normalized too something, because it's discrete integral is not
 well above the SS amplitude of the signal it computed the periodogram for. In
 other words, the powers are not in units of around 4,000, which the peak would
 be if the units were merely the modulus squared of the Fourier coeficients of
 the data I presented. Alas, the modulus squared of the Fourier coeficients IS
 the TWO SIDED unnormalized periodogram, ranging from [-fc, fc] | fc=nyquist
 critical frequency. The definition of the ONE SIDED periodogram IS the modulus
 squared of the Fourier coeficients ranging over [0, fc], but since the 
 function
 is even, data points in (0, fc) non-inclusive, need to be multiplied by 2. 
 Thus
 is according too the definition given by Press, et al (1988, 1992, 2002, 
 c.f.
 cp 12  13). I'm assuming that R returns an FFT in the same layout as Press, 
 et
 al describe.

 Press, et al. are also very clear about the existence of far too many ways of
 normalizing the periodogram too document, which they stated before delving 
 into
 particularly how they normalized to the mean squared amplitude of the signal
 that the periodogram was computed from. In the page before, and perhaps this 
 is
 where some of the confusion arises from, they document the calculations for MS
 and SS amplitudes and time integral squared amplitude of the signal in the
 time domain, not the frequency domain. The page after that, their example
 only shows how to normalize a periodogram so its sum is equal too the MS
 amplitude. In short, but starting from SS amplitude:

 a). sum(a[index=(1:N) or t=(0:N-1)]^2) = SS amplitude calculated in time 
 domain

 b). 1/N * sum(Mod(fft[-fc:fc])^2) = two sided periodogram that sums too the SS
 amplitude

 c). Same as b but over the range [0, fc], and (0, fc) multiplied by 2 is the 
 one
 sided periodogram, also sums too the SS amplitude

 For MS amplitude, the procedures are identical, only the time domain is 
 divided
 by N, and the frequency domain figures are divided by N^2 instead of N.

 When the periodogram is in power per unit time, as in the above, so that the
 power is interpretable at N/2+1 independent frequencies, it is a normalized
 periodogram. spec.pgram() IS normalized, I just do not know what it's
 normalized too because I can not seem to get spec.pgram to stop tapering (at
 which point the normalization should be dead on, not just close).

 By the way, normalized does not automatically mean anything unless to what
 is stated. I could normalize something arbitrarily to the number of tics on my
 dogs back side, and still call it normed, or erroneously refer too it as
 unnormed. If normalized is suposed to mean something specific, then I am
 confident that more than 90% of undergraduates are not familiar with what the
 term should mean. Stats and coding and using programs are a human endeavor.
 This human seems to have made meaning out of terms differently than what those
 who wrote the documentation seem to have intended. Only, I do not know where
 the documentation or my understanding may have been missled (R docs, Numerical
 Recipes, or any other source I looked at since I started).

 Cheers,
 KeithC.

 First, please look up `too' in your dictionary.

 Second, please study the references on the help page, which give the
 details.  That is what references are for!  The references will also
 answer your question about the reference distribution.

 The help page does not say it is `normalized' at all: it says it computes
 the peridogram, and you seem unaware of the definitions of the latter (and
 beware, there are more than one).

 On Tue, 24 Jan 2006, Keith Chamberlain wrote:

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the 

Re: [R] R-help Digest, Vol 35, Issue 23

2006-01-23 Thread Dr. Herwig Meschke
 summary.aov(aovRes, split=list(interval = list(i1 vs i2 = 1, i2 vs
 i3 = 2, i3 vs i4 = 3, i4 vs i5 = 4, i5 vs i6 = 5)))
 
try
class(aovRes) #- aovlist !
summary.aovlist(aovRes, spit=...)
or simply
summary(aovRes, spit=...)

Hoping this helps,
Herwig

-- 
Dr. Herwig Meschke
Wissenschaftliche Beratung
Hagsbucher Weg 27
D-89150 Laichingen

phone +49 7333 210 417 / fax +49 7333 210 418
email [EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] r-help, how can i use my own distance matrix without usin g dist()

2006-01-18 Thread Liaw, Andy
Use something like hclust(as.dist(mydist), ...) ought to work.

Andy

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, January 18, 2006 4:47 PM
To: r-help@stat.math.ethz.ch
Subject: [R] r-help, how can i use my own distance matrix without using
dist()


Dear R-helpers,

i am a beginner of R and i am using cluster package to do hierarchical
clustering

i am wondering if i can use my own distance matrix to do the hierarchical
clustering without using dist() function.

if i have my own distance matrix, how can i ask hclust() function to
recongnize
it( as the output of dist() function).

thank you very much and i looking forward to hearing from you.

Marshall

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] r-help, how can i use my own distance matrix without using dist()

2006-01-18 Thread Marco Geraci
see ?dist
   
  there's an example
  
   x - matrix(rnorm(100), nrow=5)
 m - as.matrix(dist(x))
 d - as.dist(m)

'as.dist' is what you're probably looking for
   
  regards,
  Marco

   
   
  [EMAIL PROTECTED] wrote:
  Dear R-helpers,

i am a beginner of R and i am using cluster package to do hierarchical
clustering

i am wondering if i can use my own distance matrix to do the hierarchical
clustering without using dist() function.

if i have my own distance matrix, how can i ask hclust() function to recongnize
it( as the output of dist() function).

thank you very much and i looking forward to hearing from you.

Marshall

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
  



-

 Photo Books. You design it and we’ll bind it!
[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] R-help Digest, Vol 35, Issue 14

2006-01-16 Thread Achim Zeileis
On Sun, 15 Jan 2006, Werner Wernersen wrote:

 Dear all,

 Is anybody aware of a tutorial, introduction, overview
 or alike  for cluster
 analysis with R? I have been searching for something
 like that but it seems
 there are only a few rather specialized articles
 around.

As an overview (rather than an introduction or tutorial), the Cluster task
view might be helpful to you:
  http://CRAN.R-project.org/src/contrib/Views/Cluster.html
Z

 I would very much appreciate any hint.

 Thanks a million,
Werner






 ___
 Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 35, Issue 14

2006-01-14 Thread Werner Wernersen
Dear all,

Is anybody aware of a tutorial, introduction, overview
or alike  for cluster 
analysis with R? I have been searching for something
like that but it seems 
there are only a few rather specialized articles
around.

I would very much appreciate any hint.

Thanks a million,
   Werner






___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 35, Issue 14

2006-01-14 Thread Prof Brian Ripley
On Sun, 15 Jan 2006, Werner Wernersen wrote:

 Is anybody aware of a tutorial, introduction, overview
 or alike  for cluster
 analysis with R? I have been searching for something
 like that but it seems
 there are only a few rather specialized articles
 around.

Chapter 11 of MASS (the book discussed in the FAQ).

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 35, Issue 7

2006-01-08 Thread Evgeniy Kachalin
Uwe Ligges пишет:
 Evgeniy Kachalin wrote:
 
 Hello, dear participants!

 Could you tip me, is there any simple and nice way to build 
 scatter-plot for three different types of data (, and o and * - signs, 
 for example) with legend.

 Now i can guess only that way:

 plot(x~y,data=subset(mydata,factor1=='1'), pch='.',col='blue')
 points(x~y,data=subset(mydata,factor1=='2'), pch='*',col='green')
 points( etc

 What is the simple and nice way?
 Thank you very much for your kindness and help.

 
 
 Example:
 
 
 with(iris,
   plot(Sepal.Length, Sepal.Width, pch = as.integer(Species)))
 with(iris,
   legend(7, 4.4, legend = unique(as.character(Species)),
 pch = unique(as.integer(Species
 

Uwe, sorry for my stupid question. You mean that when pch=factor , plot 
can recycle the factor and use it for subscripts or marks.

Then pch=as.integer(Species) results in c(1,2,3) for 3 factor levels. 
And I need symbols 15,16,17 and colors red, blue, green.

So then I do:
iris$Species-spec.symb
iris$Species-spec.col
levels(spec.symb)-c(15,16,17)
levels(spec.col)-c('red','green','blue')

That's the only way?
More of that!!! 'Plot' does not like factors in 'pch'. So it must be so:
plot(x~y,data, pch=as.integer(as.character(spec.symb))).
That's totally crazy...

-- 
Evgeniy

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] R-help Digest, Vol 35, Issue 7

2006-01-08 Thread Kyosti H Kurikka
Hi!

Just use your factors for indexing c(15,16,17) and
c(red,green,blue). So, with the iris data:

with(iris, plot(Sepal.Length, Sepal.Width,
   pch=c(15,16,17)[as.integer(Species)],
   col=c(red,green,blue)[as.integer(Species)] ))

Best regards,
Kyosti Kurikka


  Evgeniy Kachalin wrote:
 
  Hello, dear participants!
 
  Could you tip me, is there any simple and nice way to build
  scatter-plot for three different types of data (, and o and * - signs,
  for example) with legend.
 
  Now i can guess only that way:
 
  plot(x~y,data=subset(mydata,factor1=='1'), pch='.',col='blue')
  points(x~y,data=subset(mydata,factor1=='2'), pch='*',col='green')
  points( etc
 
  What is the simple and nice way?
  Thank you very much for your kindness and help.
 
 
 
  Example:
 
 
  with(iris,
plot(Sepal.Length, Sepal.Width, pch = as.integer(Species)))
  with(iris,
legend(7, 4.4, legend = unique(as.character(Species)),
  pch = unique(as.integer(Species
 

 Uwe, sorry for my stupid question. You mean that when pch=factor , plot
 can recycle the factor and use it for subscripts or marks.

 Then pch=as.integer(Species) results in c(1,2,3) for 3 factor levels.
 And I need symbols 15,16,17 and colors red, blue, green.

 So then I do:
 iris$Species-spec.symb
 iris$Species-spec.col
 levels(spec.symb)-c(15,16,17)
 levels(spec.col)-c('red','green','blue')

 That's the only way?
 More of that!!! 'Plot' does not like factors in 'pch'. So it must be so:
 plot(x~y,data, pch=as.integer(as.character(spec.symb))).
 That's totally crazy...

 --
 Evgeniy

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 35, Issue 7

2006-01-08 Thread Uwe Ligges
Evgeniy Kachalin wrote:

 Uwe Ligges пишет:
 
 Evgeniy Kachalin wrote:

 Hello, dear participants!

 Could you tip me, is there any simple and nice way to build 
 scatter-plot for three different types of data (, and o and * - 
 signs, for example) with legend.

 Now i can guess only that way:

 plot(x~y,data=subset(mydata,factor1=='1'), pch='.',col='blue')
 points(x~y,data=subset(mydata,factor1=='2'), pch='*',col='green')
 points( etc

 What is the simple and nice way?
 Thank you very much for your kindness and help.



 Example:


 with(iris,
   plot(Sepal.Length, Sepal.Width, pch = as.integer(Species)))
 with(iris,
   legend(7, 4.4, legend = unique(as.character(Species)),
 pch = unique(as.integer(Species

 
 Uwe, sorry for my stupid question. You mean that when pch=factor , plot 
 can recycle the factor and use it for subscripts or marks.

Yes, it can recycle, but in the example above it does not recycle but 
takes the whole Species vector.


 Then pch=as.integer(Species) results in c(1,2,3) for 3 factor levels. 
 And I need symbols 15,16,17 and colors red, blue, green.

What about adding 14 as in as.integer(Species)+14, or 1 for the colors, 
respectively?



 So then I do:
 iris$Species-spec.symb
 iris$Species-spec.col
 levels(spec.symb)-c(15,16,17)
 levels(spec.col)-c('red','green','blue')
 
 That's the only way?

This is one qay of many.


 More of that!!! 'Plot' does not like factors in 'pch'. So it must be so:
 plot(x~y,data, pch=as.integer(as.character(spec.symb))).
 That's totally crazy...

You can set up your own pch variable of course, if you don't like it 
this fast and easy way.

Uwe Ligges

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] R-help Digest, Vol 35, Issue 7

2006-01-07 Thread Evgeniy Kachalin
Hello, dear participants!

Could you tip me, is there any simple and nice way to build scatter-plot 
for three different types of data (, and o and * - signs, for example) 
with legend.

Now i can guess only that way:

plot(x~y,data=subset(mydata,factor1=='1'), pch='.',col='blue')
points(x~y,data=subset(mydata,factor1=='2'), pch='*',col='green')
points( etc

What is the simple and nice way?
Thank you very much for your kindness and help.

-- 
Evgeniy Kachalin

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 35, Issue 7

2006-01-07 Thread Uwe Ligges
Evgeniy Kachalin wrote:

 Hello, dear participants!
 
 Could you tip me, is there any simple and nice way to build scatter-plot 
 for three different types of data (, and o and * - signs, for example) 
 with legend.
 
 Now i can guess only that way:
 
 plot(x~y,data=subset(mydata,factor1=='1'), pch='.',col='blue')
 points(x~y,data=subset(mydata,factor1=='2'), pch='*',col='green')
 points( etc
 
 What is the simple and nice way?
 Thank you very much for your kindness and help.
 


Example:


with(iris,
   plot(Sepal.Length, Sepal.Width, pch = as.integer(Species)))
with(iris,
   legend(7, 4.4, legend = unique(as.character(Species)),
 pch = unique(as.integer(Species


Uwe Ligges

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help: gls with correlation=corARMA

2005-12-12 Thread gaffigan
Thank you for your extra efforts in pinpointing the source of my problem.
That is a smart workaround, to reduce the parameters until invertibility 
conditions are satisfied.  The concern in my case is what effect the 
constant will have on the covariance matrix and the resulting estimates 
for the slope in the model.  I might look at other cases where the 
invertibility condition was satisfied and compare the slope estimates 
and standard errors for the unscaled and scaled time series parameters.  

The example below was one of many series.  I should have been quicker to 
realize that someone might use the same form as my example to mess 
with someones machine.  I have used tryCatch over the weekend to skip the 
gls fit in cases where this error occurred (4282 out of 187283 series).  
There were no errors when I fit a (0,0,1)x(0,0,1) model (e.g. q=13), 
instead of q=25.  Thank you again for your time and explanation.

Sincerely,

Steve Gaffigan


On Sun, 11 Dec 2005, Spencer Graves wrote:

 The error message is misleading.  It should say something like, 
 Error in corARMA(q = 25, value = -ma.coefs, fixed = T) : The moving 
 average process specified is not invertible, having roots outside the 
 unit circle.  Instead it says, Error in corARMA(q = 25, value = 
 -ma.coefs, fixed = T) : All parameters must be less than 1 in absolute 
 value.  I'm copying Doug Bates on this reply in case he wants to try to 
 fix this.
 
 I got an answer just by shrinking your ma.coefs' by a factor of 0.8:
 
 mod.gls=gls(obs~model,correlation=corARMA(q=25,value=0.8*ma.coefs,fixed=T),
method=ML)
 
 This seemed to produce an answer for me;  it least it did not give me 
 an error message.
 
 In case you are interested in how I determined this, I will outline 
 the steps I took in analyzing this problem.  First, I copied the web 
 address you gave for the data into a web browser to make sure it was 
 honest text and not something that might corrupt my computer.  You are 
 to be commended for providing an example that allowed me to replicate 
 your problem.  If the example had been smaller and simpler, it would 
 have made my job easier and might have gotten you an earlier reply from 
 someone else.  Then I ran your code and got the error you reported:
 
 ...
   mod.gls=gls(obs~model,
 +   correlation=corARMA(q=25,value=ma.coefs,fixed=T),
 +   method=ML)
 Error in corARMA(q = 25, value = ma.coefs, fixed = T) :
   All parameters must be less than 1 in absolute value
 
 Next, I considered ways to simplify this problem and still get the 
 same error message.  I decided to try the corARMA part by itself:
 
   corARMA(q=25,value=ma.coefs,fixed=T)
 Error in corARMA(q = 25, value = ma.coefs, fixed = T) :
   All parameters must be less than 1 in absolute value
  
 Progress.  Then I typed corARMA at a command prompt and copied the 
 code into a scrit file.  The I typed debug(corARMA) and repeated the 
 corARMA(...) command.  After tracing through the corARMA code line by 
 line, I found that the error message is issued from 
 '.C(ARMA_unconstCoef, ...)'.  I gave that up:  This approach did not 
 help in this case, thoug it has in others.
 
 Then I tried some simpler examples:  'corARMA(q=1,value=.5,fixed=T)' 
 and 'corARMA(q=1,value=-.5,fixed=T)' did NOT give me that error message, 
 but 'corARMA(q=2,value=c(.8, -.5),fixed=T)' did.
 
 Then I checked a time series book for the conditions for 
 invertibility.  I found that all the roots of the characteristic 
 equation must lie outside the unit circle.  So I checked the following:
 
   round(Mod(polyroot(c(1, ma.coefs))), 3)
   [1] 1.069 0.995 0.995 0.995 0.995 0.995 0.995 0.995 0.995 1.069 1.069 
 1.069
 [13] 0.995 0.995 0.995 0.995 1.069 1.069 1.069 1.069 1.069 1.069 1.069 1.069
 [25] 1.930
 
 Then I shrunk the ma.coefs' by 0.999 and got larger roots but still 
 some inside the unit circle.  So I tried 0.99 and 0.9 with the same 
 result.  With 0.8, all the roots were outside the unit circle.
 
 hope this helps.
 spencer graves
   
 [EMAIL PROTECTED] wrote:
 
  Dear Madams/Sirs,
  
  Hello.  I am using the gls function to specify an arma correlation during
  estimation in my model.  The parameter values which I am sending the
  corARMA function are from a previous fit using arima.  I have had some
  success with the method, however in other cases I get the following error
  from gls:  All parameters must be less than 1 in absolute value.  None
  of the parameters (individually) are greater than or equal to 1.
  Please copy the code below into R to reproduce the error.  Thanks.
  
  Is my logic incorrect?  In the corARMA function, there's a call to
  pre-compiled C code with the name ARMA_unconstCoef.  Is the source
  code for such compiled code freely available for download?
  Thanks for your suggestions.
  
  Sincerely
  
  Steve Gaffigan
  
  

Re: [R] R-help Digest, Vol 34, Issue 14

2005-12-11 Thread Dominik Schaub
Guten Tag,

Ich bin vom 12. bis 23. Dezember 2005 im Militär-WK.
Ich werde die Mails somit nur verzögert beantworten können.

Für dringende Fälle:
Während diesen zwei Wochen bin ich via Natel (am besten per SMS) erreichbar 
unter der Nummer 079 438 27 68.

Mit freundlichem Gruss
Dominik Schaub

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help: gls with correlation=corARMA

2005-12-11 Thread Spencer Graves
  The error message is misleading.  It should say something like, 
Error in corARMA(q = 25, value = -ma.coefs, fixed = T) : The moving 
average process specified is not invertible, having roots outside the 
unit circle.  Instead it says, Error in corARMA(q = 25, value = 
-ma.coefs, fixed = T) : All parameters must be less than 1 in absolute 
value.  I'm copying Doug Bates on this reply in case he wants to try to 
fix this.

  I got an answer just by shrinking your ma.coefs' by a factor of 0.8:

mod.gls=gls(obs~model,correlation=corARMA(q=25,value=0.8*ma.coefs,fixed=T),
   method=ML)

  This seemed to produce an answer for me;  it least it did not give me 
an error message.

  In case you are interested in how I determined this, I will outline 
the steps I took in analyzing this problem.  First, I copied the web 
address you gave for the data into a web browser to make sure it was 
honest text and not something that might corrupt my computer.  You are 
to be commended for providing an example that allowed me to replicate 
your problem.  If the example had been smaller and simpler, it would 
have made my job easier and might have gotten you an earlier reply from 
someone else.  Then I ran your code and got the error you reported:

...
  mod.gls=gls(obs~model,
+   correlation=corARMA(q=25,value=ma.coefs,fixed=T),
+   method=ML)
Error in corARMA(q = 25, value = ma.coefs, fixed = T) :
All parameters must be less than 1 in absolute value

  Next, I considered ways to simplify this problem and still get the 
same error message.  I decided to try the corARMA part by itself:

  corARMA(q=25,value=ma.coefs,fixed=T)
Error in corARMA(q = 25, value = ma.coefs, fixed = T) :
All parameters must be less than 1 in absolute value
 
  Progress.  Then I typed corARMA at a command prompt and copied the 
code into a scrit file.  The I typed debug(corARMA) and repeated the 
corARMA(...) command.  After tracing through the corARMA code line by 
line, I found that the error message is issued from 
'.C(ARMA_unconstCoef, ...)'.  I gave that up:  This approach did not 
help in this case, thoug it has in others.

  Then I tried some simpler examples:  'corARMA(q=1,value=.5,fixed=T)' 
and 'corARMA(q=1,value=-.5,fixed=T)' did NOT give me that error message, 
but 'corARMA(q=2,value=c(.8, -.5),fixed=T)' did.

  Then I checked a time series book for the conditions for 
invertibility.  I found that all the roots of the characteristic 
equation must lie outside the unit circle.  So I checked the following:

  round(Mod(polyroot(c(1, ma.coefs))), 3)
  [1] 1.069 0.995 0.995 0.995 0.995 0.995 0.995 0.995 0.995 1.069 1.069 
1.069
[13] 0.995 0.995 0.995 0.995 1.069 1.069 1.069 1.069 1.069 1.069 1.069 1.069
[25] 1.930

  Then I shrunk the ma.coefs' by 0.999 and got larger roots but still 
some inside the unit circle.  So I tried 0.99 and 0.9 with the same 
result.  With 0.8, all the roots were outside the unit circle.

  hope this helps.
  spencer graves

[EMAIL PROTECTED] wrote:

 Dear Madams/Sirs,
 
 Hello.  I am using the gls function to specify an arma correlation during
 estimation in my model.  The parameter values which I am sending the
 corARMA function are from a previous fit using arima.  I have had some
 success with the method, however in other cases I get the following error
 from gls:  All parameters must be less than 1 in absolute value.  None
 of the parameters (individually) are greater than or equal to 1.
 Please copy the code below into R to reproduce the error.  Thanks.
 
 Is my logic incorrect?  In the corARMA function, there's a call to
 pre-compiled C code with the name ARMA_unconstCoef.  Is the source
 code for such compiled code freely available for download?
 Thanks for your suggestions.
 
 Sincerely
 
 Steve Gaffigan
 
 data=read.table(http://ak.aoos.org/data/sample_070989.dat,header=T)
 attach(data)
 mod.ols=lm(obs~model)
 mod.sma=arima(residuals(mod.ols),order=c(0,0,1),seasonal=list(order=c(0,0,2),period=12))
 theta.1=mod.sma$coef[1]
 THETA.1=mod.sma$coef[2]
 THETA.2=mod.sma$coef[3]
 ma.coefs=c(-theta.1,double(10),-THETA.1,theta.1*THETA.1,double(10),-THETA.2,theta.1*THETA.2)
 library(nlme)
 mod.gls=gls(obs~model,correlation=corARMA(q=25,value=ma.coefs,fixed=T),method=ML)
 detach(data)
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA

[EMAIL PROTECTED]
www.pdf.com http://www.pdf.com
Tel:  408-938-4420
Fax: 408-280-7915

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 

Re: [R] R-help Digest, Vol 33, Issue 27

2005-11-27 Thread A.J. Rossini
 From: Duncan Murdoch [EMAIL PROTECTED]

 I'd recommend using the RWinEdt package instead for a different way to
 integrate winedit with R.

winedit and winedt are two different editors, last I checked.

best,
-tony

[EMAIL PROTECTED]
Muttenz, Switzerland.
Commit early,commit often, and commit in a repository from which we can easily
roll-back your mistakes (AJR, 4Jan05).

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help: conversion of long decimal numbers into hexadeci

2005-11-10 Thread Ted Harding
On 10-Nov-05 Antje Döring wrote:
 Hi there,
 
 could somebody help me to convert a decimal number into a hexadecimal
 number? I know that there is the function sprintf, but the numbers I
 want to convert consist of  20 or more numbers. Spintf is not able to
 convert these big numbers.

If I understand aright, you have decimal integers with 20 or more
digits (and you want to get these as hexadecimal).

You are probably out of luck for a direct approach, since
10^20  2^64 (indeed  2^66), so you will have overflowed a 64-bit
integer. However, I'm not sure what the limitations on integer
types are in R on all platforms.

If, however, all you need is to do these conversions, and you
do not really need to use R (how off-topic can I get ... ?),
then (at any rate on Linux/Unix systems where the program is
installed by default) you can use the aribitrary-precision
calculator 'bc'.

Session:

$ bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 
obase=16

1234567898765432123456789
1056E0F555A18EBDA7D15

123456789876543212345678987654321
6163E6712EBBAA4E3D62B41F4B1

12345678987654321234567898765432123456789876543212345678987654321
1E02BC221DC9369C8981C6F859501BD313D339F09180862B41F4B1

quit


Und so weiter ... and of course you can go in the opposite
direction by ibase=16 (to set hex as the input base) and
obase=10 (to set decimal as the output base).

'bc' is a classic Unix tool, and features as an illoustration
of complex programming in C, with lex and yacc and all, in
The Unix Programming Environment (as I recall) by Kernighan
and Ritchie.

I don't need it often, but when you need it it's very handy
(e.g. now).

Hoping this helps,
Ted.

PS:

$ bc -l
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 
scale=1000
pi=4*a(1)
pi
3.141592653589793238462643383279502884197169399375105820974944592307\
81640628620899862803482534211706798214808651328230664709384460955058\
22317253594081284811174502841027019385211055596446229489549303819644\
28810975665933446128475648233786783165271201909145648566923460348610\
..
08302642522308253344685035261931188171010003137838752886587533208381\
42061717766914730359825349042875546873115956286388235378759375195778\
18577805321712268066130019278766111959092164201988

(last digit wrong because of truncation)



E-Mail: (Ted Harding) [EMAIL PROTECTED]
Fax-to-email: +44 (0)870 094 0861
Date: 10-Nov-05   Time: 17:28:05
-- XFMail --

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 32, Issue 26

2005-10-26 Thread Alan Cobo-Lewis
r-help@stat.math.ethz.ch on Wednesday, October 26, 2005 at 6:00 AM -0500 wrote:

Ronaldo,
Try Harold's suggestion. The df still won't agree, because lmer (at least in 
its current version) just puts an upper bound on the df. But that should be OK, 
because all those t tests are approximations anyways, and you can get better 
confidence
intervals (credible intervals, whatever) by using the mcmcsamp() function that 
works with lmer()
alan


Doran, Harold [EMAIL PROTECTED] responded:


There is an issue with implicit nesting in lmer. In your lme() model you nest
block/irrigation/density/fertilizer. In lmer you need to do something like
(I dind't include all of your variables, but I think the makes the point)

lmer(yield~irrigation*density*fertilizer+(1|fertilizer:density)+(1|density), 
data)

Which notes that fertilizer is nested in density. 

Try this and then compare the results. 

Ronaldo Reis-Jr. [EMAIL PROTECTED], wrote:

I make the correct model with aov, lme do compare with lmer.

But I cant make a correct model in lmer. Look that the aov and lme results are
similars, but very different from lmer. In aov and lme is used the correct DF
for each variable, in lmer it use a same DF for all? Denom=54.


--
Alan B. Cobo-Lewis, Ph.D.   (207) 581-3840 tel
Department of Psychology(207) 581-6128 fax
University of Maine
Orono, ME 04469-5742[EMAIL PROTECTED]

http://www.umaine.edu/visualperception

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 32, Issue 26

2005-10-26 Thread Doran, Harold
In addition to the response below, Doug Bates has talked about this on
this list previously. I did

 RSiteSearch('bates degrees of freedom lmer')

The first one that came up has Doug's response to this question as well

Harold
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alan Cobo-Lewis
Sent: Wednesday, October 26, 2005 8:53 AM
To: r-help@stat.math.ethz.ch
Subject: Re: [R] R-help Digest, Vol 32, Issue 26

r-help@stat.math.ethz.ch on Wednesday, October 26, 2005 at 6:00 AM -0500
wrote:

Ronaldo,
Try Harold's suggestion. The df still won't agree, because lmer (at
least in its current version) just puts an upper bound on the df. But
that should be OK, because all those t tests are approximations anyways,
and you can get better confidence intervals (credible intervals,
whatever) by using the mcmcsamp() function that works with lmer() alan


Doran, Harold [EMAIL PROTECTED] responded:


There is an issue with implicit nesting in lmer. In your lme() model 
you nest block/irrigation/density/fertilizer. In lmer you need to do 
something like (I dind't include all of your variables, but I think 
the makes the point)

lmer(yield~irrigation*density*fertilizer+(1|fertilizer:density)+(1|den
sity), data)

Which notes that fertilizer is nested in density. 

Try this and then compare the results. 

Ronaldo Reis-Jr. [EMAIL PROTECTED], wrote:

I make the correct model with aov, lme do compare with lmer.

But I cant make a correct model in lmer. Look that the aov and lme 
results are similars, but very different from lmer. In aov and lme is 
used the correct DF for each variable, in lmer it use a same DF for
all? Denom=54.


--
Alan B. Cobo-Lewis, Ph.D.   (207) 581-3840 tel
Department of Psychology(207) 581-6128 fax
University of Maine
Orono, ME 04469-5742[EMAIL PROTECTED]

http://www.umaine.edu/visualperception

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 31, Issue 30

2005-09-30 Thread John Maindonald
With lme4, use of mcmcsamp can be insightful.  (Douglas Bates
drew my attention to this function in a private exchange of emails.)
The distributions of random effects are simulated on a log scale,
where the distributions are much closer to symmetry than on the
scale of the random effects themselves.  As far as I can see, this is
a straightforward use of MCMC to estimate model parameters; it is
not clear to me the results from the lmer() fit are used.
John Maindonald.


On 30 Sep 2005, at 8:00 PM, [EMAIL PROTECTED] wrote:

 From: Roel de Jong [EMAIL PROTECTED]
 Date: 29 September 2005 11:19:38 PM
 To: r-help@stat.math.ethz.ch
 Subject: [R] standard error of variances and covariances of the  
 randomeffects with LME


 Hello,

 how do I obtain standard errors of variances and covariances of the  
 random effects with LME comparable to those of for example MlWin? I  
 know you shouldn't use them because the distribution of the  
 estimator isn't symmetric blablabla, but I need a measure of the  
 variance of those estimates for pooling my multiple imputation  
 results.

 Regards,
   Roel.

John Maindonald email: [EMAIL PROTECTED]
phone : +61 2 (6125)3473fax  : +61 2(6125)5549
Centre for Bioinformation Science, Room 1194,
John Dedman Mathematical Sciences Building (Building 27)
Australian National University, Canberra ACT 0200.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 31, Issue 9

2005-09-10 Thread Wuming Gong
?summary.lm and check the Value section.

Wuming

On 9/10/05, Ping Yao [EMAIL PROTECTED] wrote:
 Hi:
 I use lm (linear model) to analyze 47 variables , 8 responses
 So I use loop to finish it .
 I want the program to show the results that P-value is less than 0.05.
 How can I cite the P-valus from lm result ?
 
 Ping
 
 The code:
 
 
 #using LM to model general fati
 for (j in 48:52) {
 for (i in 3:46){
 gen.fat-y_x[,j]
 gen.fat-as.numeric(gen.fat)
 
 snp_marker-y_x[,i]
 
 x-colnames(y_x)
 
 #snp_marker-as.matrix(snp_marker)
 #mode(snp_marker)
 cat(phenotype is = ,x[j] , \n)
 cat(snp marker is = ,x[i] , \n)
 
 zz-summary(lm.D9 - lm(gen.fat~snp_marker))
 
 print(zz)
 
 return
 }
 }
 
 [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 31, Issue 9

2005-09-10 Thread Wuming Gong
Hi Ping, 

You can use zz$coefficients[,4] to get the p values for each estimated
coefficients in your context.

Wuming 

On 9/11/05, Ping Yao [EMAIL PROTECTED] wrote:
 Wuming:
 Thanks for your help.
I use the fuction:
call(fstatistic,zz)
   call(p-value,zz)
  
  I can get each variable P-values,but I can't  get P-value of the model.
  How can I do ?
   
one of the results is following :
  
  Call:
  lm(formula = gen.fat ~ snp_marker)
  
  Residuals:
   Min   1Q   Median   3Q  Max 
  -10.5455  -3.0481   0.4545   3.9519   6.9519 
  
  Coefficients:
Estimate Std. Error t value Pr(|t|)
  (Intercept)13.0481 0.4518  28.881   2e-16 ***
  snp_markerallele2   0.5107 0.9102   0.561   0.5753
  snp_markerBoth  1.4974 0.6927   2.162   0.0318 *  
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
  
  Residual standard error: 4.607 on 212 degrees of freedom
  Multiple R-Squared: 0.02166,Adjusted R-squared: 0.01244 
  F-statistic: 2.347 on 2 and 212 DF,  p-value: 0.0981 
  
  I use the code :
  
  zz-summary(lm.D9 - lm(gen.fat~snp_marker))
coe-coef(lm.D9)# the bare coefficients
  if (coe[2]=.05||coe[3]=.05||coe[4]=.05||coe[5]=.05) {
  cat(phenotype is  = ,x[j] , \n)
  cat(snp marker is  = ,x[i] , \n)
 sign-call(fstatistic,zz)
   call(p-value,zz)
 
#print(coe)
print(zz)
 
  }
  
  
  
  
  
 
 On 9/10/05, Wuming Gong [EMAIL PROTECTED] wrote:
  ?summary.lm and check the Value section.
  
  Wuming
  
  On 9/10/05, Ping Yao [EMAIL PROTECTED] wrote:
   Hi:
   I use lm (linear model) to analyze 47 variables , 8 responses 
   So I use loop to finish it .
   I want the program to show the results that P-value is less than 0.05.
   How can I cite the P-valus from lm result ?
  
   Ping
  
   The code:
   
  
   #using LM to model general fati
   for (j in 48:52) {
   for (i in 3:46){
   gen.fat-y_x[,j]
   gen.fat-as.numeric(gen.fat)
  
   snp_marker-y_x[,i]
  
   x-colnames(y_x) 
  
   #snp_marker-as.matrix(snp_marker)
   #mode(snp_marker)
   cat(phenotype is = ,x[j] , \n)
   cat(snp marker is = ,x[i] , \n)
  
   zz-summary( lm.D9 - lm(gen.fat~snp_marker))
  
   print(zz)
  
   return
   }
   }
  
   [[alternative HTML version deleted]]
  
   __ 
   R-help@stat.math.ethz.ch mailing list
   https://stat.ethz.ch/mailman/listinfo/r-help
   PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html
  
  
 


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 31, Issue 9

2005-09-09 Thread Ping Yao
Hi:
I use lm (linear model) to analyze 47 variables , 8 responses 
So I use loop to finish it .
I want the program to show the results that P-value is less than 0.05.
How can I cite the P-valus from lm result ?

Ping

The code:


#using LM to model general fati
for (j in 48:52) {
for (i in 3:46){
gen.fat-y_x[,j]
gen.fat-as.numeric(gen.fat)

snp_marker-y_x[,i]

x-colnames(y_x)

#snp_marker-as.matrix(snp_marker)
#mode(snp_marker)
cat(phenotype is = ,x[j] , \n)
cat(snp marker is = ,x[i] , \n)

zz-summary(lm.D9 - lm(gen.fat~snp_marker))

print(zz)

return
}
}

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 30, Issue 26

2005-08-26 Thread Jean-Marc Ottorini
Dear R helpers,

   For me ( i.e. R 2.1.1 on Mac OS X), using  trellis.device 
(postscript, onefile = F, etc ...  with the lattice library within a R 
function works fine to obtain the desired graph as an EPS file , 
provided that :

1) the command dev.off() is not included in this function

2) and it is  issued at the  command level after the function has 
been exited

I would like to know if there is a way to close the EPS file within the 
function itself, freeing the user to issue the closing command (I 
already  tried trellis.device (), and trellis.device (null) without any 
success).

Regards,

J.-M.

  
Jean-Marc Ottorini   LERFoB, UMR INRA-ENGREF 1092
  email  [EMAIL PROTECTED]  INRA - Centre de Nancy
  voice  +33-0383-394046F54280 - Champenoux
  fax+33-0383-394034 France

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help

2005-08-22 Thread Mike Waters
Diego,

Have you checked out the home site for nls2? Specifically the system
requirements page?

http://www.inra.fr/miaj/public/AB/nls2/available.html

That says that nls2 requires a Unix-like operating system. Basically, the
script for building the library is for such systems only, it also depends
upon a lex (flex) library being available.

Regards,

Mike

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of HM Diego Hernán
 Sent: 22 August 2005 18:47
 To: r-help@stat.math.ethz.ch
 Subject: [R] R-help
 
 Hello
 
 I need help with the way to install nls2 library for windows, 
 or the script that can be used for install the nls2 library.
 
 Do you know if this library works in windows?
 
 Best regards.
 
 Diego Rojas
 Cali-Colombia
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 30, Issue 6

2005-08-08 Thread David Duffy
On Fri, 5 Aug 2005 Julia Reid  wrote:

 Subject: [R] GAP pointer

 I am trying to do a simple segregation analysis using the GAP package. I
 have the documentation for pointer but I desperately need an example so
 that I can see how to format the datfile and the jobfile. For each
 individual, I have FamilyId, SubjectId, FatherId, MotherId, and
 AffectedStatus (0/1). I would like to obtain the likelihood ratio
 statistic for transmission.
 I would greatly appreciate any help on this subject.
 Best to all,
 Julia Reid

I wouldn't use Pointer myself (there are lots of more recent packages*),
but look at the examples in
http://cedar.genetics.soton.ac.uk/pub/PROGRAMS/pointer/pointer.tar.Z
and the manual, which is in the book:

Morton N.E., Rao D.C  Lalouel J-M (1983).
Methods in Genetic Epidemiology. Karger
PO Box, CH-4009 Basel (Switzerland).
ISBN 3-8055-3668-2

which you will find in many academic libraries.

David Duffy.


* Don't you use Pap or JPap at Myriad?

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 28, Issue 28

2005-06-28 Thread A. Mani
On Tuesday 28 June 2005 15:30, [EMAIL PROTECTED] wrote:
Re :   37. Re: A. Mani : colours in Silhouette (Mulholland, Tom)
   
 Message: 37
 Date: Tue, 28 Jun 2005 09:08:24 +0800
 From: Mulholland, Tom [EMAIL PROTECTED]
 Subject: Re: [R] A. Mani : colours in Silhouette
 To: [EMAIL PROTECTED], r-help@stat.math.ethz.ch
 Message-ID:
  [EMAIL PROTECTED]
 Content-Type: text/plain; charset=iso-8859-1

 It's not so much a problem, as not working the way you expected.
 cluster:::plot.partition is used to do the plotting. If you look at the
 code for this you can see the difficulty in putting every possible
 permutation into the code. If for example you want the silhouette plot to
 be red using col = red is not intuitive as the cluster plot (which comes
 up first) has more than one colour. If you have a look at methods(plot)
 (assuming that you have loaded the cluster package) you will see that there
 is a specific piece of code in the form of plot.silhouette. It has an
 asterisk next to it so you need to use cluster:::plot.silhouette to see the
 code. It has what you need.

 args(cluster:::plot.silhouette)

  function (x, nmax.lab = 40, max.strlen = 5, main = NULL, sub = NULL,

 xlab = expression(Silhouette width  * s[i]), col = gray,
 do.col.sort = length(col)  1, border = 0, cex.names = par(cex.axis),
 do.n.k = TRUE, do.clus.stat = TRUE, ...)


  data(ruspini)
   pr4 - pam(ruspini, 4)
   si - silhouette(pr4)
   plot(si,col = red)

I tried that before with many more options and got a blank image. It must have 
been due to the options.
 The issue is that whenever code is written there is always a choice as to
 what functionality is put in place. Just because something can be done,
 does not mean it will or in some cases should be done. In this case the
 help for plot.partition notes that For more flexibility, use
 'plot(silhouette(x), ...)', see 'plot.silhouette'.

 Tom

 Thanks for that I found out something I will find useful in the future.

  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] Behalf Of A. Mani
  Sent: Tuesday, 28 June 2005 4:30 AM
  To: r-help@stat.math.ethz.ch
  Subject: [R] A. Mani : colours in Silhouette
 
 
  Hello,
 In cluster analysis with cluster, how does one colour
  the silhouette
  plots ? For example in using pam. There seems to be some
  problem there.
  Everything else can be coloured.
 
  Thanks,
 

 A. Mani
 Member, Cal. Math. Soc

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] r-help

2005-06-25 Thread Uwe Ligges
Sotdikov Mansor wrote:

 There is a function 'simMD()' in 'popgen' library which

package, not library.



 simulates a sample of genotype data as follows:
 
library(popgen)
x - simMD(20, 2, 2, p = NULL, c(0.09, 0.05), ac = 2, beta = 1)
x
 
   , , 1
 
   [,1] [,2]
  [1,]11
  [2,]11
   ...
 [37,]12
 [38,]22
 [39,]22
 [40,]22
 
 , , 2
 
   [,1] [,2]
  [1,]22
  [2,]12
  [3,]12
   ...
 [38,]21
 [39,]12
 [40,]12
 
 How can I repeat this function, for example, 1000 times to generate 1000
 samples and assign each output to distinct 'vector' Xi, where i=1,2,...,1000

The above does not look like a vector (even if internally represented as 
such).


 The goal is to generate a large number of samples using this function and
 then use them in further analysis.

I'd write them into a list by
replicate(1000, YourCall)

If you really want objects X1, ..., Xn, you should read the FAQ and ?assign.

Uwe Ligges




 Any suggestions would be appreciated
 Sitdikov Mansor
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] r-help

2005-06-25 Thread Peter Dalgaard
Sotdikov Mansor [EMAIL PROTECTED] writes:

 There is a function 'simMD()' in 'popgen' library which
 simulates a sample of genotype data as follows:
  library(popgen)
  x - simMD(20, 2, 2, p = NULL, c(0.09, 0.05), ac = 2, beta = 1)
  x
...
 
 How can I repeat this function, for example, 1000 times to generate 1000
 samples and assign each output to distinct 'vector' Xi, where i=1,2,...,1000
 The goal is to generate a large number of samples using this function and
 then use them in further analysis.
 Any suggestions would be appreciated
 Sitdikov Mansor

replicate(5, list(simMD(20, 2, 2, p = NULL, c(0.09, 0.05), 
   ac = 2, beta = 1)))

for larger values of 5 ;-)

The list() is there to prevent dimensions from getting lost.


-- 
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help

2005-06-21 Thread Gabor Grothendieck
On 6/21/05, McClatchie, Sam (PIRSA-SARDI)
[EMAIL PROTECTED] wrote:
 Background:
 OS: Linux Mandrake 10.1
 release: R 2.0.0
 editor: GNU Emacs 21.3.2
 front-end: ESS 5.2.3
 -
 Colleagues
 
 Is there a function in R that is an equivalent of zoom in matlab? This is
 very useful for being able to magnify details in a plot.
 
 I have searched the help for zoom, interactive zooming, and magnify.
 The R search engine (reached from help.start() )  keywords by topic entry
 for dynamic graphics seems to have no content, unless I made a mistake.

From within R try:

   RSiteSearch(zoom)

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help

2005-06-21 Thread Francisco J. Zagmutt

Try RSiteSearch(zoom plot).  There are some good suggestions there.

Cheers

Francisco


From: McClatchie, Sam (PIRSA-SARDI) [EMAIL PROTECTED]
To: R-Help-Request (E-mail) r-help@stat.math.ethz.ch
Subject: [R] R-help
Date: Wed, 22 Jun 2005 09:05:05 +0930

Background:
OS: Linux Mandrake 10.1
release: R 2.0.0
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3
-
Colleagues

Is there a function in R that is an equivalent of zoom in matlab? This is
very useful for being able to magnify details in a plot.

I have searched the help for zoom, interactive zooming, and magnify.
The R search engine (reached from help.start() )  keywords by topic entry
for dynamic graphics seems to have no content, unless I made a mistake.

Here is the matlab function description:
---
zoom

Zoom in and out on a 2-D plot

Syntax

zoom on
zoom off
zoom out
zoom reset
zoom
zoom xon
zoom yon
zoom(factor)
zoom(fig, option)

Description

zoom on turns on interactive zooming. When interactive zooming is enabled 
in

a figure, pressing a mouse button while your cursor is within an axes zooms
into the point or out from the point beneath the mouse. Zooming changes the
axes limits.


*   For a single-button mouse, zoom in by pressing the mouse button and
zoom out by simultaneously pressing Shift and the mouse button.
*
*   For a two- or three-button mouse, zoom in by pressing the left mouse
button and zoom out by pressing the right mouse button.

Clicking and dragging over an axes when interactive zooming is enabled 
draws

a rubber-band box. When the mouse button is released, the axes zoom in to
the region enclosed by the rubber-band box.

Double-clicking over an axes returns the axes to its initial zoom setting.

zoom off turns interactive zooming off.

zoom out returns the plot to its initial zoom setting.

zoom reset remembers the current zoom setting as the initial zoom setting.
Later calls to zoom out, or double-clicks when interactive zoom mode is
enabled, will return to this zoom level.

zoom toggles the interactive zoom status.

zoom xon and zoom yon set zoom on for the x- and y-axis, respectively.

zoom(factor) zooms in or out by the specified zoom factor, without 
affecting

the interactive zoom mode. Values greater than 1 zoom in by that amount,
while numbers greater than 0 and less than 1 zoom out by 1/factor.

zoom(fig, option) Any of the above options can be specified on a figure
other than the current figure using this syntax.

Remarks

zoom changes the axes limits by a factor of two (in or out) each time you
press the mouse button while the cursor is within an axes. You can also
click and drag the mouse to define a zoom area, or double-click to return 
to

the initial zoom level.


Best fishes

Sam

Sam McClatchie,
Biological oceanography
South Australian Aquatic Sciences Centre
PO Box 120, Henley Beach 5022
Adelaide, South Australia
email [EMAIL PROTECTED]
Telephone: (61-8) 8207 5448
FAX: (61-8) 8207 5481
Research home page http://www.members.iinet.net.au/~s.mcclatchie/

   /\
  ...xX(°
 
   °)Xx
  /  \\
(((°
  (((°   ...xX(°O°)Xx

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] R-help Digest, Vol 28, Issue 11

2005-06-11 Thread dwfu
Dear all,
I'm new using R and in (geo)statistics. I have a problem with solving
my homework questions. We are working with variograms and trying to
write down basic  equations for different models (spherical,
exponential, Gaussian). I tried to use the 'gstat' and 'geoR' packages
to solve the questions but as I said before I'm new in R and always
encountered with some syntax errors (I can send some specific examples
later). If one of you used this packages and could help me,  I will be
very glad.
Best Wishes,
Emre Duran

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest, Vol 28, Issue 11

2005-06-11 Thread Uwe Ligges
dwfu wrote:
 Dear all,
 I'm new using R and in (geo)statistics. I have a problem with solving
 my homework questions. We are working with variograms and trying to
 write down basic  equations for different models (spherical,
 exponential, Gaussian). I tried to use the 'gstat' and 'geoR' packages
 to solve the questions but as I said before I'm new in R and always
 encountered with some syntax errors (I can send some specific examples
 later). If one of you used this packages and could help me,  I will be
 very glad.

Please read the posting guide which tells you:
  - Use an informative subject line.
  - Basic statistics and classroom homework: R-help is not intended for 
these.
  - Provide small reproducible examples.

Uwe Ligges

 Best Wishes,
 Emre Duran
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help,

2005-05-19 Thread Sean Davis
On May 19, 2005, at 7:01 AM, Jean Eid wrote:
I do not fully understand your example but if you need to act on the
columns of a dataframe why don't you just call its columns the title 
you
want. something like
X-matrix(rnorm(1000), ncol=4)
colnames(X)-c(foo, foo1, foo2, foo3)
X-as.data.frame(X)
par(mfrow=c(2,2))
lapply(colnames(X), function(x) plot(X[,x], ylab=y, xlab=x, 
main=x))

Taking this back a bit to the original question:
par(mfrow=c(4,3),mar=c(2, 4, 2, 1) + 0.1)
sapply(names(my.list) , function(x)
{
plot(colnames(my.list[[x]]) , apply(my.list[[x]],2,mean),  type=o, 
pch = 16, ylab = Index
, xlab = ,main=x)
}
)


HTH
Jean
On Thu, 19 May 2005, Luis Ridao Cruz wrote:
R-help,
I usually call lapply to plot some dat frames structures.Something 
like
this:

par(mfrow=c(4,3),mar=c(2, 4, 2, 1) + 0.1)
lapply(my.list , function(x)
{
plot(colnames(x) , apply(x,2,mean),  type=o, pch = 16, ylab = 
Index
, xlab = )
}
)

But it is difficult for me to put a title on every plot according to
the list names.
I guess the re other ways to do it but the structure above is so handy
to me that I want to stick to it.
Any suggestions?
I run on Windows XP machine
version
 _
platform i386-pc-mingw32
arch i386
os   mingw32
system   i386, mingw32
status
major2
minor1.0
year 2005
month04
day  18
language R
Thanks in advance
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Digest

2005-05-06 Thread Prof Brian Ripley
On Fri, 6 May 2005, Sebastian Schoenherr wrote:
Hi folks,
I have to create my own time series, Is it possible to generate ARIMA time
series, where i can define the range of the values in the y axis. (e.g: Values
only between 0 and 1)
No.
Take a look at the definition of an ARIMA process.  Suppose e.g. you have 
an AR(1) process.  Then if innovations are positive and the coefficient is 
positive the value can be arbitrarily large.  You can construct all sorts 
of similar counter-examples.

This isn't a real problem is it?
--
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] [R-help] install problem

2005-03-22 Thread Brian D Ripley
On Mon, 21 Mar 2005, Tae-Young Goo wrote:

 Hello.

 I've tried to install R to IBM AIX(v.5.1) machine.
 I've used compile options indicated by R-admin.

There are several sets there, so which exactly?

 Then, I met following error messages.

 /home/local/R_2.0.1/lib/R/bin/exec/R is unchanged
 /home/local/R_2.0.1/lib/R/modules/R_X11.so is unchanged
 /home/local/R_2.0.1/lib/R/modules/internet.so is unchanged

Those are not error messages.

 cp: lapack.so: file was not found.

So there were some earlier error messages about that.

 This error has broken out at the last stage of make install
 Please let me know what is wrong.

Please let us know what you did.  In particular AIX is tricky, and you
need to follow the instructions in the R-admin.html manual very
carefully.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Time Series

2005-02-26 Thread Prof Brian Ripley
I think
1) You have the units wrong: these appear to be the figures quoted for KB 
of compressed files, and the compression is nothing like 1024:1.

2) This is not `a series' unless you add a time base, e.g. via a call 
to ts().

Surely subscribers are aware that they do not get many MB/day and that 
extrapolation to that level is just speculation.

On Sat, 26 Feb 2005 [EMAIL PROTECTED] wrote:
Hi Folks,
While I was browsing in the R-help archives yesterday,
I got curious about the time series of the sizes of
the monthly archives in MB.
This turned out to have an unexpected feature or two,
which I leave to readers to explore for themselves.
I'm now wondering at what point in time we might expect
to be receiving 1000MB/month (30+MB/day). It's not that
far away, it seems, but there are a couple of interesting
modelling questions behind it.
In particular, I wonder by what mechanism the numbers
grow, according to the law which the data seem to indicate.
Over to you.
(just my 0.001 MB worth ... excluding headers)
Ted
To save you the trouble, the following sets up the series:
MB-c(55,19,19,18,19,17,35,27,47,
55,32,50,55,41,49,50,28,53,42,81,54,
99,60,84,80,76,75,78,61,83,97,141,122,
96,144,173,153,226,202,131,165,183,175,168,187,
240,272,262,195,236,244,285,249,326,345,392,268,
455,320,418,453,468,422,447,400,323,516,478,327,
450,487,535,658,573,606,659,543,655,722,677,567,
519,703,886,793,719,816,812,730,698,831,969,736,
855)
April 1997 -- January 2005

E-Mail: (Ted Harding) [EMAIL PROTECTED]
Fax-to-email: +44 (0)870 094 0861
Date: 26-Feb-05   Time: 10:31:05
-- XFMail --
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
--
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Time Series

2005-02-26 Thread Ted Harding
On 26-Feb-05 Prof Brian Ripley wrote:
 I think
 
 1) You have the units wrong: these appear to be the figures
 quoted for KB of compressed files, and the compression is
 nothing like 1024:1.

Sorry, yes, you are correct: it is KB and not MB (a slip of the
eye on my part).

 2) This is not `a series' unless you add a time base, e.g. via
 a call to ts().

Well, in R terms that is strictly correct; but a sequence of
data corresponding to successive regular time points is usually
described as a time series!

 Surely subscribers are aware that they do not get many MB/day
 and that extrapolation to that level is just speculation.

Granted (see above). But anyway, this sort of thing is not
the real point, which is that (regardless of units) this
'sequence' of data has interesting features (which prompted
me to submit my somewhat tongue-in-cheek posting).

The original (quoted below) now suitably amended.

 On Sat, 26 Feb 2005 [EMAIL PROTECTED] wrote:
 
 Hi Folks,

 While I was browsing in the R-help archives yesterday,
 I got curious about the time series of the sizes of
 the monthly archives in KB [was MB].

 This turned out to have an unexpected feature or two,
 which I leave to readers to explore for themselves.

 I'm now wondering at what point in time we might expect
 to be receiving 1000KB/month (30+KB/day) [was MB]. It's
 not that far away, it seems, but there are a couple of
 interesting modelling questions behind it.

 In particular, I wonder by what mechanism the numbers
 grow, according to the law which the data seem to indicate.

 Over to you.

 (just my 0.001 MB worth ... excluding headers)

 Ted

 To save you the trouble, the following sets up the
 sequence [was series; and MB]:

 KB-c(55,19,19,18,19,17,35,27,47,
 55,32,50,55,41,49,50,28,53,42,81,54,
 99,60,84,80,76,75,78,61,83,97,141,122,
 96,144,173,153,226,202,131,165,183,175,168,187,
 240,272,262,195,236,244,285,249,326,345,392,268,
 455,320,418,453,468,422,447,400,323,516,478,327,
 450,487,535,658,573,606,659,543,655,722,677,567,
 519,703,886,793,719,816,812,730,698,831,969,736,
 855)

 April 1997 -- January 2005

 
 E-Mail: (Ted Harding) [EMAIL PROTECTED]
 Fax-to-email: +44 (0)870 094 0861
 Date: 26-Feb-05   Time: 10:31:05
 -- XFMail --

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html

 
 -- 
 Brian D. Ripley,  [EMAIL PROTECTED]
 Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
 University of Oxford, Tel:  +44 1865 272861 (self)
 1 South Parks Road, +44 1865 272866 (PA)
 Oxford OX1 3TG, UKFax:  +44 1865 272595



E-Mail: (Ted Harding) [EMAIL PROTECTED]
Fax-to-email: +44 (0)870 094 0861
Date: 26-Feb-05   Time: 12:06:29
-- XFMail --

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Time Series

2005-02-26 Thread Gabor Grothendieck
 Ted.Harding at nessie.mcc.ac.uk writes:

: 
: Hi Folks,
: 
: While I was browsing in the R-help archives yesterday,
: I got curious about the time series of the sizes of
: the monthly archives in MB.
: 
: This turned out to have an unexpected feature or two,
: which I leave to readers to explore for themselves.
: 
: I'm now wondering at what point in time we might expect
: to be receiving 1000MB/month (30+MB/day). It's not that
: far away, it seems, but there are a couple of interesting
: modelling questions behind it.
: 
: In particular, I wonder by what mechanism the numbers
: grow, according to the law which the data seem to indicate.
: 
: Over to you.
: 
: (just my 0.001 MB worth ... excluding headers)
: 
: Ted
: 
: To save you the trouble, the following sets up the series:
: 
: MB-c(55,19,19,18,19,17,35,27,47,
: 55,32,50,55,41,49,50,28,53,42,81,54,
: 99,60,84,80,76,75,78,61,83,97,141,122,
: 96,144,173,153,226,202,131,165,183,175,168,187,
: 240,272,262,195,236,244,285,249,326,345,392,268,
: 455,320,418,453,468,422,447,400,323,516,478,327,
: 450,487,535,658,573,606,659,543,655,722,677,567,
: 519,703,886,793,719,816,812,730,698,831,969,736,
: 855)
: 
: April 1997 -- January 2005


There were some discussions on this about a year ago:

http://tolstoy.newcastle.edu.au/R/help/04/04/1071.html

http://tolstoy.newcastle.edu.au/R/help/04/04/1095.html

http://tolstoy.newcastle.edu.au/R/help/04/04/1109.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Time Series

2005-02-26 Thread Uwe Ligges
Prof Brian Ripley wrote:
I think
1) You have the units wrong: these appear to be the figures quoted for 
KB of compressed files, and the compression is nothing like 1024:1.

2) This is not `a series' unless you add a time base, e.g. via a call to 
ts().

Surely subscribers are aware that they do not get many MB/day and that 
extrapolation to that level is just speculation.

So let's be immensely unfair and do some speculation ...
Assuming 1000MB/month means a compressed archive file of (very) 
*roughly* 250MB.

Looking at the data with linear models,
   lm(sqrt(MB) ~ monthindex)
seems not to be the worst model (removing the first observation, perhaps).
So a very *rough* extrapolation shows us that we will get
1000MB/month around 2142.
I hope I'll get a better machine in 137 years to handle all the expected 
traffic. ;-)

Best,
Uwe

On Sat, 26 Feb 2005 [EMAIL PROTECTED] wrote:
Hi Folks,
While I was browsing in the R-help archives yesterday,
I got curious about the time series of the sizes of
the monthly archives in MB.
This turned out to have an unexpected feature or two,
which I leave to readers to explore for themselves.
I'm now wondering at what point in time we might expect
to be receiving 1000MB/month (30+MB/day). It's not that
far away, it seems, but there are a couple of interesting
modelling questions behind it.
In particular, I wonder by what mechanism the numbers
grow, according to the law which the data seem to indicate.
Over to you.
(just my 0.001 MB worth ... excluding headers)
Ted
To save you the trouble, the following sets up the series:
MB-c(55,19,19,18,19,17,35,27,47,
55,32,50,55,41,49,50,28,53,42,81,54,
99,60,84,80,76,75,78,61,83,97,141,122,
96,144,173,153,226,202,131,165,183,175,168,187,
240,272,262,195,236,244,285,249,326,345,392,268,
455,320,418,453,468,422,447,400,323,516,478,327,
450,487,535,658,573,606,659,543,655,722,677,567,
519,703,886,793,719,816,812,730,698,831,969,736,
855)
April 1997 -- January 2005

E-Mail: (Ted Harding) [EMAIL PROTECTED]
Fax-to-email: +44 (0)870 094 0861
Date: 26-Feb-05   Time: 10:31:05
-- XFMail --
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help Time Series

2005-02-26 Thread Ted Harding
On 26-Feb-05 Uwe Ligges wrote:
 So let's be immensely unfair and do some speculation ...
 
 Assuming 1000MB/month means a compressed archive file of (very) 
 *roughly* 250MB.
 
 Looking at the data with linear models,
 lm(sqrt(MB) ~ monthindex)
 seems not to be the worst model (removing the first observation,
 perhaps).

Well, Uwe, disregarding the confusion over units, your model
(and caveat) coincides with mine, leading to

  KB = (2.448731+0.282701*T + noise)^2

where T is in months and the first observation is at T=1.

(Actually, I think the initial burn-in might be a bit longer,
say over 3-4 months, and there is a slight suggestion that the
growth has been slightly flattening out recently).

And what intrigued me is the question: what mechanism might
lead to a quadratic growth law?

One possible interpretation is the following:

Suppose that the number of postings is proportional to the
number of R users. A quadratic has first difference linear in T.
So the average number of additional postings per month can be
seen as a sum of two components:

a) a constant kernel
b) a component proportional to the increment in postings
   in the previous month.

Interpreting this as number of users, it could suggest that
recruitment to R could be due to two causes: recruitment by
a core of fixed size, and recruitment by recent recruits!

Of course this is far from the only possibility. Another might
be that postings to R-help reflect the number of issues that
users are concerned to get help or information on.

This might reflect:

a) a core of die-hard FAQs asked by more and more people;
b) a growing corpus of packages which more and more people
   need guidance with.

And so on. An essential missing piece of data (where I'm
concerned) is the sequence of numbers of subscribers to
R-help.

Ted.



E-Mail: (Ted Harding) [EMAIL PROTECTED]
Fax-to-email: +44 (0)870 094 0861
Date: 26-Feb-05   Time: 14:00:46
-- XFMail --

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] R-help

2005-02-22 Thread abunn
This is what you are trying to get at I think:

dev.off()   ## start with a new graphics device
# X11() or postscript()
#par(mar = c(3,3,1,3), oma = c(0,0,0,0), mgp = c(2, 1, 0), bg = white)
par(mar = rep(5,4))
plot(x-rnorm(100),y-rnorm(100), ylab = This is y, xlab = This is x)
z-rnorm(100)*250
par(new=T)   ## Tell R not to reinitialize graphic device
 ## for subsequent plots
plot(x,z,col='blue',axes=F, xlab=, ylab=)
axis(side=4,col.axis='blue', labels = T)
mtext(This is z, 4, 2, col = blue)
par(new=F)


HTH, Andy




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Luis Ridao Cruz
 Sent: Tuesday, February 22, 2005 9:29 AM
 To: r-help@stat.math.ethz.ch
 Subject: [R] R-help
 
 
 R-help,
 
 I am tring to create a plot with two  y-axis.
 I found an example which is fine but the problem is that the range of
 the second y-axes appears in the first y-axes causing confusion.
 The example I refer to is :
 
 ##
 dev.off()   ## start with a new graphics device
 # X11() or postscript()
 plot(x-rnorm(100),y-rnorm(100))
 z-rnorm(100)*250
 par(new=T)   ## Tell R not to reinitialize graphic device
  ## for subsequent plots
 plot(x,z,col='blue',axes=F)
 axis(side=4,col.axis='blue')
 
 par(new=F)
 ##
 
 which can be found at :
 
 http://www.demog.berkeley.edu/faq/node21.html 
 
 I also have a home made-example with exactly the same problem (pretty
 much the same as above)
 
 Any solution?
 
 Thanks in advance.
 
  version
  _  
 platform i386-pc-mingw32
 arch i386   
 os   mingw32
 system   i386, mingw32  
 status  
 major2  
 minor0.1
 year 2004   
 month11 
 day  15 
 language R
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] R-Help : running MIX package

2005-01-28 Thread Ted Harding
On 28-Jan-05 Jeanhee Hong wrote:
 Hello all. I am inexperienced with  R and am clumsily trying to work
 through it for specific multiple imputations Id like to run for my
 thesis.In running the MIX package, I keep getting an error message
 regarding the use of the prelim.mix command. 
  
 Error in as.integer.default(list(alcohol = c(1, 1, 1, 1, 1, 1, 1, 1, 1,
: 
 (list) object cannot be coerced to integer
  
 I cannot find the source of this error. I am assuming its somewhere in
 the format of my data but cant quite seem to figure it out. I have
 followed the procedures in the manual in terms of listing categorical
 variables first and making sure they take positive integer values...Has
 anyone encountered this same error? Any help would be appreciated.Thank
 you.

I have not seen such an error message myself, but the occurrence
of list in it is ominous! According to the R code of prelim.mix,
this should not be introduced by prelim.mix itself and so is likely
to be somehow present in the data you submit to the function (which
cannot be checked without looking at how you define your data).

Please try the following. The function call prelim.mix(x,p)
assumes that x is a *matrix* whose first p columns are the values
of the p categorical variables (coded, as you note, as positive
integers).

So make sure that x is indeed a *matrix* and not some other R
structure (which may, e.g. a data-frame, look like a matrix but
isn't one). 'matrix' is a very specific data structure in R,
and is not to be confused with other structures which may look
like matrices.

One way to ensure this could be to use

  x-as.matrix(your.data.frame)

(assuming that your.data.frame already has its columns satisfying
the requisite conditions). Another (which is what I've mainly
used) is to construct x by using 'cbind': I've tended to find
that for the sort of data one often gets, some preliminary
manipulation of the categorical variables (at least) is required
so as to get them into the required form, and this is best done
separately. So, once you have established your p categorical
variables cat1,...,catp and your k continuous variables
cont1,...,contk, something like

  x - cbind(cat1,cat2,...,catp,cont1,cont2,...,contk)

would create a matrix called x.

Hoping this helps,
Ted.



E-Mail: (Ted Harding) [EMAIL PROTECTED]
Fax-to-email: +44 (0)870 094 0861  [NB: New number!]
Date: 28-Jan-05   Time: 09:52:02
-- XFMail --

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] R-Help : running MIX package

2005-01-28 Thread Ted Harding
On 28-Jan-05 Ted Harding wrote:
 On 28-Jan-05 Jeanhee Hong wrote:
 Hello all. I am inexperienced with  R and am clumsily trying to work
 through it for specific multiple imputations Id like to run for my
 thesis.In running the MIX package, I keep getting an error message
 regarding the use of the prelim.mix command. 
  
 Error in as.integer.default(list(alcohol = c(1, 1, 1, 1, 1, 1, 1, 1,
 1,
: 
 (list) object cannot be coerced to integer
 [...]
 [...]
 So make sure that x is indeed a *matrix* and not some other R
 structure (which may, e.g. a data-frame, look like a matrix but
 isn't one). 'matrix' is a very specific data structure in R,
 and is not to be confused with other structures which may look
 like matrices.
 [...]

By experiment I have confirmed my guess: with X a dataframe
(30 rows, 4 cols of which the first two categorical) I get
exactly the same error message as you with

  prelim.mix(X,2)

whereas, after

  x - as.matrix(X)
  prelim.mix(x,2)

everything is fine . Note that both

  X

and

  x

give outputs which look exactly the same, though they are not
the same kind of object. Only 'x' will do for prelim.mix!

Cheers,
Ted.



E-Mail: (Ted Harding) [EMAIL PROTECTED]
Fax-to-email: +44 (0)870 094 0861  [NB: New number!]
Date: 28-Jan-05   Time: 12:13:03
-- XFMail --

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R help search and Java(tm)?

2005-01-04 Thread Peter Dalgaard
Dan Bolser [EMAIL PROTECTED] writes:

 I found this great search 
 
 source(http://www.statslab.cam.ac.uk/~djw1005/Stats/Interests/search.R;)
 
 helpHTML()

 Has (or will) this become the standard search method?

I think it got superseded by Jon Baron's RSiteSearch() function which
is finding its way into r-devel.
 
 Is R 'Free Software'? The dependence on Java seems a bit of a pain for
 'freeness'. 

A pain yes, but free software can rely on non-free compilers and OS's
if need be. It's just more convenient to build on tools that everyone
can get hold of. 

 Did the above make it into CRAN?

Well, you could check... It doesn't look like there is enough of the
ancillary matter (help pages etc.) for a CRAN package.

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R help

2004-11-16 Thread Spencer Graves
 I don't understand your question. PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html;. In particular, have you 
read the R Data Import / Export documentation that some with R 
[available, from www.r-project.org - Manuals or R - help.start()]? 
Have you tried read.spss in library(foreign)? [help(package=foreign) 
provides additional documentation.] If you've tried all these without 
satisfaction, please explain what you've tried, the error message, the 
version of R, operating system, etc., as requested in the posting guide.

hope this helps.
spencer graves
gauri wrote:
Hi,
I was wondering as to how I could convert SPSS data imported to R into tabular 
form. In the sense, direct usage of read.table( ) doesnt help.
Thanks

-
Meet the all-new My Yahoo!  Try it today! 
	[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 

--
Spencer Graves, PhD, Senior Development Engineer
O:  (408)938-4420;  mobile:  (408)655-4567
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help

2004-09-13 Thread Spencer Graves
 Did you do a search at www.r-project.org - R site search?  
Searching for .dbf there just now exposed a read.shape function in 
the maptools package. 

 hope this helps. 
p.s.  Did you read the posting guide! 
http://www.R-project.org/posting-guide.html;?  Tips provided there may 
help you answer questions like this for yourself.  Failing that, they 
may also help you formulate your questions so you are more likely to get 
useful replies.  Buena suerte.

Fuensanta Saura Igual wrote:
Dear all,
Does anyone know how to read files with .dbf extension?
Thanks for your time.
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 

--
Spencer Graves, PhD, Senior Development Engineer
O:  (408)938-4420;  mobile:  (408)655-4567
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help

2004-09-13 Thread Prof Brian Ripley
I believe .dbf files are more commonly DBase files, in which case see 
package RODBC.

On Mon, 13 Sep 2004, Spencer Graves wrote:

   Did you do a search at www.r-project.org - R site search?  
 Searching for .dbf there just now exposed a read.shape function in 
 the maptools package. 
 
   hope this helps. 
 p.s.  Did you read the posting guide! 
 http://www.R-project.org/posting-guide.html;?  Tips provided there may 
 help you answer questions like this for yourself.  Failing that, they 
 may also help you formulate your questions so you are more likely to get 
 useful replies.  Buena suerte.
 
 Fuensanta Saura Igual wrote:
 
 Dear all,
 Does anyone know how to read files with .dbf extension?
 
 Thanks for your time.
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
   
 
 
 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help

2004-08-25 Thread Dimitris Rizopoulos
Hi Jim,

you could try this:

mat - matrix(sample(1:25), 5, 5)
mat
row(mat)[mat==max(mat)]
col(mat)[mat==max(mat)]

I hope it helps.

Best,
Dimitris


Dimitris Rizopoulos
Doctoral Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/396887
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
 http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm


- Original Message - 
From: Jim Gustafsson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 11:07 AM
Subject: [R] R-help



 Dear R users,

 I have just start working with R and would need some help.

 If you have a matrix as:


[,1][,2]   [,3]
 [1,]   11   24   11
 [2,]   16   29   16
 [3,]215 2

 and you want the position where you can find the maximum value, in
this
 case row 2 and column 2.
 How could you get the position?

 The values in the matrix is likelihood function values, and  each
row and
 column represent values from two parameters. So the idea is to seek
which
 parameter values maximise the likelihood and therefore I need boot
row and
 column position.

 Regards Jim


 
--
 This e-mail and any attachment may be confidential and may also be
privileged.
 If you are not the intended recipient, please notify us immediately
and then
 delete this e-mail and any attachment without retaining copies or
disclosing
 the contents thereof to any other person.
 Thank you.
 
--
 [[alternative HTML version deleted]]

 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R help in Firefox on Windows XP

2004-06-18 Thread Erich Neuwirth
Thank you Brian,
Installing 0.8 first and then upgrading solved the problem.
I noticed that installing 0.9 from scratch creates a registry key
[HKEY_LOCAL_MACHINE\SOFTWARE\mozilla.org\Mozilla]
CurrentVersion=1.7
Installing 0.8 creates
[HKEY_LOCAL_MACHINE\SOFTWARE\mozilla.org\Mozilla]
CurrentVersion=1.6
and upgrading to 0.9 afterwards does not change this entry.
This might be the reason.

Prof Brian Ripley wrote:
Works for me.  Did it work with Firefox 0.8?  (I upgraded from 0.8.)
I would try 0.8 and then upgrade.
On Thu, 17 Jun 2004, Erich Neuwirth wrote:
 

I had to reinstall my machine, so I installed Firefox 0.9 as browser
I am using WinXP and R 1.9.1 beta.
Now search in R html help does not work.
I checked that the Java VM is working correctlt, Sun's test site says
my installation is OK.
Firefoxalso tells me that
Applet Searchengine loaded
Applet Searchengine started
it just does not find anything.
Does anybody know how to solve this?
  

 


Prof Brian Ripley wrote:
Works for me.  Did it work with Firefox 0.8?  (I upgraded from 0.8.)
I would try 0.8 and then upgrade.
On Thu, 17 Jun 2004, Erich Neuwirth wrote:
 

I had to reinstall my machine, so I installed Firefox 0.9 as browser
I am using WinXP and R 1.9.1 beta.
Now search in R html help does not work.
I checked that the Java VM is working correctlt, Sun's test site says
my installation is OK.
Firefoxalso tells me that
Applet Searchengine loaded
Applet Searchengine started
it just does not find anything.
Does anybody know how to solve this?
   

 

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R help in Firefox on Windows XP

2004-06-17 Thread Marc Schwartz
On Thu, 2004-06-17 at 12:06, Erich Neuwirth wrote:
 I had to reinstall my machine, so I installed Firefox 0.9 as browser
 I am using WinXP and R 1.9.1 beta.
 Now search in R html help does not work.
 I checked that the Java VM is working correctlt, Sun's test site says
 my installation is OK.
 Firefoxalso tells me that
 
 Applet Searchengine loaded
 Applet Searchengine started
 
 it just does not find anything.
 Does anybody know how to solve this?
 
 Erich

Erich,

Do you also have JavaScript enabled in the Firefox Tools - Options
settings?

Both Java and JavaScript need to be enabled for the help.start() search
engine to function properly.

I reviewed the release notes at
http://www.mozilla.org/products/firefox/releases/ and did not see
anything relating to Java there, as had been the case with prior
releases. The message that you are getting on the status line suggests
that the R search applet is being found and properly enabled, which is
typically the primary source of problems.

Check the above and let us know.

Marc Schwartz

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R help in Firefox on Windows XP

2004-06-17 Thread Damon Wischik

Erich Neuwirth wrote: 
 I had to reinstall my machine, so I installed Firefox 0.9 as browser I
 am using WinXP and R 1.9.1 beta.  Now search in R html help does not
 work.

A workaround (which is slow, provisional, and as yet untested on your
configuration) is to use a different help engine, namely

 source(http://www.statslab.cam.ac.uk/~djw1005/Stats/Interests/search.R;)
 helpHTML()

Damon.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R help in Firefox on Windows XP

2004-06-17 Thread James MacDonald
Works for me with Firefox 0.8.



James W. MacDonald
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623

 Prof Brian Ripley [EMAIL PROTECTED] 06/17/04 02:10PM 
Works for me.  Did it work with Firefox 0.8?  (I upgraded from 0.8.)
I would try 0.8 and then upgrade.

On Thu, 17 Jun 2004, Erich Neuwirth wrote:

 I had to reinstall my machine, so I installed Firefox 0.9 as browser
 I am using WinXP and R 1.9.1 beta.
 Now search in R html help does not work.
 I checked that the Java VM is working correctlt, Sun's test site
says
 my installation is OK.
 Firefoxalso tells me that
 
 Applet Searchengine loaded
 Applet Searchengine started
 
 it just does not find anything.
 Does anybody know how to solve this?

-- 
Brian D. Ripley,  [EMAIL PROTECTED] 
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/ 
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help 
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help

2004-05-14 Thread Gabor Grothendieck

If you want pairwise correlations for the cols of matrix x and N
is some parameter to your routine that does not vary throughout
the calculation then:

apply(x,2,function(a)apply(x,2,function(b)Transmer.cor(a,b,N)))

Replace both occurrences of 2 with 1 if you want rows.

Ruedi Epple ruedi.epple at bluewin.ch writes:

: 
: Hi,
: I have begun to use R some months ago. I have solved many problems, but now
: I do not reach my aim.
: I have written a function ?Tranmer.cor? with the parameters x, y and N, which
: calculates weighted correlation coefficients. It works, when I define the
: parameters each time I want to run it. But I cannot tell ?Tranmer.cor? that
: it works trough a whole matrix, so that I get a correlation matrix with all
: the combinations of variables I have in my data.frame.
: There must be a little thing that I have not checked yet.
: Thanks for your advice.
: Ruedi Epple
: 
: 
: Dr. Ruedi Epple
: Stebligerweg 4
: CH-4450 Sissach
: 061/971 67 15
: ruedi.epple at bluewin.ch
: ruedi.epple at bfs.admin.ch
:

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help

2004-02-12 Thread Rolf Turner

Jim Gustafsson [EMAIL PROTECTED] wrote:

 I have a problem.

Boy, do you ever.

 I would like to put my SAS-code into R.
 Could I do that, if yes, how?

Right.  I have a couple of questions for you too.

(1) How long is a piece of string?

(2) How do I bring peace, prosperity, and universal
brotherhood to the world?

Finally, let me draw your attention to the addendum which is appended
to all r-help postings these days:

PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

cheers,

Rolf Turner
[EMAIL PROTECTED]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


  1   2   >