Re: [R] command line interface

2004-07-08 Thread Uwe Ligges
Lana Schaffer wrote: How can plots (histograms) be implemented with the command line interface to R? I don't understand this question. There's a chance that you are looking for the function hist(). Please read the posting guides beeing added at the end of your posting. Uwe Ligges Lana Schaffer

Re: [R] text editor for R - summary on R-WinEdt

2004-07-08 Thread Uwe Ligges
Dear all, let me try to summarize this thread's R-WinEdt related messages and give a few comments: Murray Jorgensen wrote: I tried R-WinEdt a few years ago, but as I remember it interfered with my usual use of WinEdt which is as a front end to MiKTeX. Is there a way to use WinEdt both ways?

[R] Importing an Excel file

2004-07-08 Thread Vito Ricci
I use very much Excel in my job and often I've to read Excel data in R. Usually I save Excel file as a .txt file and then I read it in R with read.table(). I find really interesting the suggest of using the function read.xls() in the 'gregmisc' package. I work also with R in Excel sheets by

[R] Problem with the grep function

2004-07-08 Thread [EMAIL PROTECTED]
Let me present to you my problem : I have a character vector x and I would like to obtain the indices of the elements of this vector that yielded exactly a match. For example, x=nom, pattern=b, I would to obtain 2 because b is on the second position. First program : nom - c(a,b,ab)

Re: [R] read.frame

2004-07-08 Thread Alec Stephenson
For E: e - e[,1] ; uni - union(c[,1],union(s[,1],h[,1])) Then e[!match(e, uni, 0)] should get you there. Alec Alec Stephenson Department of Statistics Macquarie University NSW 2109, Australia S Peri [EMAIL PROTECTED] 07/08/04 02:41pm Dear Alec,

Re: [R] Problem with the grep function

2004-07-08 Thread Wolski
Hi! For exact matches you can use == or is.element. To get the indices use which. e.g. == x-c(a,b,ab) x==a [1] TRUE FALSE FALSE which((x==a)==T) [1] 1 or e.g. is.element is.element(x,a) [1] TRUE FALSE FALSE which(is.element(x,a)==TRUE) [1] 1 Sincerely Eryk *** REPLY

Re: [R] Problem with the grep function

2004-07-08 Thread Alec Stephenson
grep(^b$,nom) will match b only. Alec Alec Stephenson Department of Statistics Macquarie University NSW 2109, Australia [EMAIL PROTECTED] [EMAIL PROTECTED] 07/08/04 05:20pm Let me present to you my problem : I have a character vector x and I

Re: [R] Problem with the grep function

2004-07-08 Thread [EMAIL PROTECTED]
Hi Christian, It works better now. Thanks a lot. Julie At 09:32 08/07/2004 +0200, you wrote: Hi Julie, as I understand your question you only want indices for exact matches to b. This can be achieved using regular expressions (see ?regex) nom - c(a,b,ab) grep(^b$,nom) I hope this helps? Christian

[R] Importing an Excel file

2004-07-08 Thread Vito Ricci
Hi, I'm trying to use read.xls() function to import Excel data, but I've this error: Error in system(cmd, intern = !verbose) : perl not found R is running under Win2000; This function works translating the named Microsoft Excel file into a temporary .csv file, using Greg Warnes' xls2csv perl

Re: [R] Problem with the grep function

2004-07-08 Thread Jan_Svatos
Hi Julie, match is not exactly what you need, as it works with regular expressions and takes anything what includes a letter b. For your case, there is perfectly suitable which(nom==b) nom - c(a,b,ab, b) which(nom==b) [1] 2 4 Jan - - - Original message: - - - From: [EMAIL PROTECTED] Send:

Re: [R] Problem with the grep function

2004-07-08 Thread Wolski
Or you must mark the word beginning with ^ and the end $ if you like to use grep. grep(^b$,nom) Sincerely Eryk *** REPLY SEPARATOR *** On 7/8/2004 at 9:20 AM [EMAIL PROTECTED] wrote: Let me present to you my problem : I have a character vector x and I would like to

Re: [R] Problem with the grep function

2004-07-08 Thread Uwe Ligges
Wolski wrote: Hi! For exact matches you can use == or is.element. To get the indices use which. e.g. == x-c(a,b,ab) x==a [1] TRUE FALSE FALSE which((x==a)==T) Note, the ==T part is superflously (same below). In grep()'s regular expression, you can also use: grep(^b$, nom) or similar stuff.

Re: [R] Importing an Excel file

2004-07-08 Thread Kevin Wang
Hi, On Thu, 8 Jul 2004, [iso-8859-1] Vito Ricci wrote: Hi, I'm trying to use read.xls() function to import Excel data, but I've this error: Error in system(cmd, intern = !verbose) : perl not found What happens? It means it cannot find Perl. You need Perl installed (and in your Path) in

Re: [R] Importing an Excel file

2004-07-08 Thread Uwe Ligges
Vito Ricci wrote: Hi, I'm trying to use read.xls() function to import Excel data, but I've this error: Error in system(cmd, intern = !verbose) : perl not found R is running under Win2000; This function works translating the named Microsoft Excel file into a temporary .csv file, using Greg Warnes'

[R] How to pass strings to functions?

2004-07-08 Thread Gijs
__ [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] How to pass strings to functions?

2004-07-08 Thread Kevin Wang
Please do not use the subject to ask a question without clarifying it! So what exactly do you want? Can you give some more descriptions? Kev Ko-Kang Kevin Wang PhD Student Centre for Mathematics and its Applications Building 27, Room 1004 Mathematical Sciences

Re: [R] lost messages

2004-07-08 Thread Martin Maechler
Aaron == Aaron J Mackey [EMAIL PROTECTED] on Wed, 7 Jul 2004 16:31:25 -0400 writes: Aaron The second two resends did go through (I checked on Aaron the web archive), but the first did not; Aaron additionally, the second two resends both came Aaron through with the exact same

[R] How to pass strings to functions? [once more, now With content I hope...]

2004-07-08 Thread Gijs Plomp
__ [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

[R] building packages with NAMESPACE

2004-07-08 Thread Meinhard Ploner
hi! I tried to build a very simple package with NAMESPACE file, such that datasets are loaded only dynamically. a2 - function(x=a1) x+4 a1 - 1:10 package.skeleton(aaa, list=c(a1, a2)) Then I modified the help files and added the file NAMESPACE with these 2 lines: useDynLib(aaa) export(a1, a2)

[R] loding *.o file in windows environment

2004-07-08 Thread Utsav Boobna
Hi, Assuming that I dont have the source C file, is it anyhow possible for me to load the object file (*.o) in R under windows environment. I tried using dyn.load(), but obviously it didnt worked. Thanks, Utsav __ [EMAIL PROTECTED] mailing list

[R] Getting elements of a matrix by a vector of column indices

2004-07-08 Thread Wolfram Fischer
I have e.g. t - matrix( nrow=2, ncol=3, byrow=TRUE, c('a1','a2','a3','b1','b2','b3') ) and i - c( 3, 2) Is it possible to formulate a simple expression that gets c( t[ 1, i[1] ], t[ 2, i[2] ] ) (and so on for longer matrices)? The result would be: [1] a3 b2 Thanks - Wolfram

[R] How to pass strings to functions? [once once more, now With content I hope...]

2004-07-08 Thread Gijs Plomp
Dear expeRts, I fail to succesfully pass strings to functions. It comes down to the observation that plot(someVariable,anotherVariable) works fine, but x - someVariable y - anotherVariable plot(x,y) does not. Does this have something to do with the returned value of x being /someVariable/

Re: [R] loding *.o file in windows environment

2004-07-08 Thread Uwe Ligges
Utsav Boobna wrote: Hi, Assuming that I dont have the source C file, is it anyhow possible for me to load the object file (*.o) Well, the sources must be compiled under Windows (or at least cross-compiled on another platform). Most probably, an .o file has been compiled under Unix-alikes. You

[R] Statistics::R

2004-07-08 Thread michael watson (IAH-C)
Hello I am looking (possibly in vain!) for the Author of the Statistics::R perl package - I believe he announced the package on this mailing list some months ago. The name is Graciliano Monteiro Passos, and his e-mail address, [EMAIL PROTECTED], is giving permanent errors. Can anyone help?

Re: [R] How to pass strings to functions? [once once more, now With content I hope...]

2004-07-08 Thread Uwe Ligges
Gijs Plomp wrote: Dear expeRts, I fail to succesfully pass strings to functions. It comes down to the observation that plot(someVariable,anotherVariable) works fine, but x - someVariable y - anotherVariable plot(x,y) Do you mean x - someVariable y - anotherVariable plot(x,y) Why are

Re: [R] How to pass strings to functions? [once once more, now With content I hope...]

2004-07-08 Thread Matthias . Kohl
Dear expeRts, I fail to succesfully pass strings to functions. It comes down to the observation that plot(someVariable,anotherVariable) works fine, but x - someVariable y - anotherVariable plot(x,y) does not. Does this have something to do with the returned value of x being

Re: [R] Getting elements of a matrix by a vector of column indices

2004-07-08 Thread Uwe Ligges
Wolfram Fischer wrote: I have e.g. t - matrix( nrow=2, ncol=3, byrow=TRUE, c('a1','a2','a3','b1','b2','b3') ) and i - c( 3, 2) Is it possible to formulate a simple expression that gets c( t[ 1, i[1] ], t[ 2, i[2] ] ) (and so on for longer matrices)? The result would be: [1] a3 b2

RE: [R] Getting elements of a matrix by a vector of column indice s

2004-07-08 Thread Liaw, Andy
See if the following helps: m - outer(letters[1:5], 1:4, paste, sep=) m [,1] [,2] [,3] [,4] [1,] a1 a2 a3 a4 [2,] b1 b2 b3 b4 [3,] c1 c2 c3 c4 [4,] d1 d2 d3 d4 [5,] e1 e2 e3 e4 idx - c(2, 1, 3, 4, 2) m[cbind(1:5, idx)] [1] a2 b1 c3 d4 e2 Andy From: Wolfram Fischer I have e.g.

Re: [R] Problem with the grep function

2004-07-08 Thread Petr Pikal
Hi You can use %in% nom%in%b [1] FALSE TRUE FALSE which gives you a logical vector of exact matches (1:3)[nom%in%b] [1] 2 or charmatch charmatch(b,nom) [1] 2 charmatch(ab,nom) [1] 3 if you expect only one exact match. But I expect someone can give you better answer. Cheers Petr On

Re: [R] Importing an Excel file

2004-07-08 Thread Petr Pikal
Hi If you do not have complicated items with spaces and special characters and you want some easy copiing on fly just issue in R read.delim(clipboard) after selecting an area in Excel file and pressing Ctrl-C Cheers Petr On 8 Jul 2004 at 9:15, Vito Ricci wrote: I use very much Excel in my

Re: [R] building packages with NAMESPACE

2004-07-08 Thread Uwe Ligges
Meinhard Ploner wrote: hi! I tried to build a very simple package with NAMESPACE file, such that datasets are loaded only dynamically. a2 - function(x=a1) x+4 a1 - 1:10 package.skeleton(aaa, list=c(a1, a2)) Then I modified the help files and added the file NAMESPACE with these 2 lines:

[R] Replies for Importing Excel File

2004-07-08 Thread Park, Kyong H Mr. RDECOM
I really appreciate all the helpful answers from Richard Müller, Marc Schwartz, Adaikalavan Ramasamy, Vito Ricci. I tried Marc's simple suggestion which was to copy only the data area and paste to a new excel sheet, and that solved my problem. I'll try other suggestions while I'm learning more

[R] parallel mle/optim and instability

2004-07-08 Thread Aaron J. Mackey
I have a MLE task that for a small number of parameters finishes in a reasonable amount of time, but for my real case (with 17 parameters to be estimated) either takes far too long (over a day), or fails with computationally singular errors. So a) are there any parallel implementations of

Re: [R] Importing an Excel file

2004-07-08 Thread Arin Basu
Hi Vito: You may consider obtaining ActivePerl from the following site and install it in Windows: http://www.activestate.com/Products/ActivePerl/ and then retry. HTH, Arin On Thu, 08 Jul 2004 Vito Ricci wrote : Hi, I'm trying to use read.xls() function to import Excel data, but I've this

Re: [R] Parsing protein sequences

2004-07-08 Thread S Peri
Dear All, I have two files with peptide sequences. These two have peptide sequences(obtained from tryptic and semi-tryptic digestion using Mass spec analysis). There are two columns :peptide sequence and protein name. File 2 has both tryptic and semi-tryptic peptides and File 1 has only

[R] Predicting X from Y in four-parameter fit (SSfpl)

2004-07-08 Thread Klaus Jensen
While analyzing titration-data using four parameter fit, I need to predict single values from the model: I need to predict both ways (ie: X-Y Y-X): Example: library(nls) cramp-c(33,100,300,900,2700,8100,24300,72900) myo-c(2.7130,2.6790,1.5255,0.7675,0.3670,0.2150,0.1575,0.1400)

[R] [R-pkgs] randomForest 4.3-0 released

2004-07-08 Thread Liaw, Andy
Dear all, Version 4.3-0 of the randomForest package is now available on CRAN (in source; binaries will follow in due course). There are some interface changes and a few new features, as well as bug fixes. For those who had used previous versions, the important things to note are: 1. there's a

Re: [R] Creating Binary Outcomes from a continuous variable

2004-07-08 Thread Douglas Bates
Marc Schwartz wrote: On Wed, 2004-07-07 at 07:57, Doran, Harold wrote: Dear List: I have searched the archives and my R books and cannot find a method to transform a continuous variable into a binary variable. For example, I have test score data along a continuous scale. I want to create a new

[R] Code OK - Predicting X from Y in four-parameter fit (SSfpl) -

2004-07-08 Thread Klaus Jensen
[Sorry for any inconvenience - Code is OK now] While analyzing titration-data using four parameter fit, I need to predict single values from the model: I need to predict both ways (ie: X-Y Y-X): Example: library(nls) cramp-c(33,100,300,900,2700,8100,24300,72900)

Re: [R] Getting elements of a matrix by a vector of column indice s

2004-07-08 Thread Wolfram Fischer
Thanks for you answer! It works. m - outer(letters[1:5], 1:4, paste, sep=) The following works with the help of your proposition: rowidx.n - c( 2, 3, 4) colidx.n - c( 1, 3, 2) idx.n - cbind( rowidx.n, colidx.n ) m[idx.n] [1] b1 c3 d2 In my real data there was

Re: [R] Re: errors in randomization test

2004-07-08 Thread CR Bleay, School Biological Sciences
Dear Rolf, I tried using you code, however i have found that the whole routine is still stopped by the call to GLM.nb fro certain datasets before it enters the if statement. is there anyway to ensure that this does not occur. cheers, colin --On Tuesday, July 6, 2004 9:23 am -0300 Rolf Turner

RE: [R] Getting elements of a matrix by a vector of column indice s

2004-07-08 Thread Liaw, Andy
This should work: idx - cbind(match(rowidx, rownames(m)), match(colidx, colnames(m))) m[idx] [1] b1 c3 d2 Andy From: Wolfram Fischer Thanks for you answer! It works. m - outer(letters[1:5], 1:4, paste, sep=) The following works with the help of your proposition: rowidx.n

[R] k nearest neighbor prediction

2004-07-08 Thread Wayne Jones
Hi there fellow R-users, Does anyone know if there is a package for k nearest neighbours prediction as opposed to classification? I have found the package knncat but can't see a way to adjust it to predict a continuous variable. Any help would be great, Regards Wayne Jones KSS Ltd

Re: [R] Statistics::R

2004-07-08 Thread Paul Roebuck
On Thu, 8 Jul 2004, michael watson (IAH-C) wrote: I am looking (possibly in vain!) for the Author of the Statistics::R perl package - I believe he announced the package on this mailing list some months ago. The name is Graciliano Monteiro Passos, and his e-mail address, [EMAIL PROTECTED], is

Re: [R] parallel mle/optim and instability

2004-07-08 Thread Spencer Graves
Does optim give you computationally singular errors? I've had similar problems with nls, but optim have given me answers even in such cases. Do your numbers have substantially different orders of magnitude? Is it feasible to rescale everything to mean 0, standard deviation of 1,

[R] New user

2004-07-08 Thread Rodrigo Sala
Hi all R users. I'm just starting to use R, and I'm still a little lost. I'd like to analyse some data following the path analysis aproach. I'd like to know if there is some package for implement this kind of analysis. Many thanks Rodrigo Sala Posgrado en Producción Vegetal E.E.A. INTA

Re: [R] New user

2004-07-08 Thread Spencer Graves
Have you considered sem = structural equation models, which you may know is another name for path analysis? hope this helps. spencer graves p.s. PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html. It might help you answer questions like this yourself.

Re: [R] lme: extract variance estimate

2004-07-08 Thread Douglas Bates
I'm actually replying to Stephen's message but I had already deleted it before I read Spencer's message. (I'm on a slow connection and I am simultaneously downloading a big file so I am trying to optimize bandwidth, sometimes with unfortunate results.) In the previous message the author

Re: [R] How to pass strings to functions? [once once more, now With content I hope...]

2004-07-08 Thread Thomas Lumley
On Thu, 8 Jul 2004, Gijs Plomp wrote: Dear expeRts, I fail to succesfully pass strings to functions. It comes down to the observation that plot(someVariable,anotherVariable) works fine, but x - someVariable y - anotherVariable plot(x,y) does not. Does this have something