Re: [R] how to make this sequence: 1,2,3,4,5,4,3,2,1

2010-03-05 Thread baptiste auguie
c(x - 1:5, rev(x[-length(x)])) On 5 March 2010 07:04, kensuguro magronb...@gmail.com wrote: I'm just beginning R, with book Using R for Introductory Statistics, and one of the early questions has me baffled.  The question is, create the sequence: 1,2,3,4,5,4,3,2,1 using seq() and rep().

Re: [R] how to make this sequence: 1,2,3,4,5,4,3,2,1

2010-03-05 Thread Ted Harding
On 05-Mar-10 06:04:51, kensuguro wrote: I'm just beginning R, with book Using R for Introductory Statistics, and one of the early questions has me baffled. The question is, create the sequence: 1,2,3,4,5,4,3,2,1 using seq() and rep(). Now, as a programmer, I am punching myself to not be

Re: [R] how to make this sequence: 1,2,3,4,5,4,3,2,1

2010-03-05 Thread Dimitris Rizopoulos
try this: 5 - abs(-4:4) I hope it helps. Best, Dimitris On 3/5/2010 7:04 AM, kensuguro wrote: I'm just beginning R, with book Using R for Introductory Statistics, and one of the early questions has me baffled. The question is, create the sequence: 1,2,3,4,5,4,3,2,1 using seq() and rep().

[R] Neural Network

2010-03-05 Thread Francis_Statistics
Hi, We are trying to implement a early stopping rule with validation set on a neural network. We’re using the AMORE package (http://rwiki.sciviews.org/doku.php?id=packages:cran:amore) of R and when you train the network you have to specify following variables: Pval Tval What do we have to put

[R] Odp: Plot help

2010-03-05 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.03.2010 19:24:13: Is there an easy way to do two things: I have a dataframe with headers and 18 columns I want to plot all the columns on same y axis plot(df) does this. No. If df is data frame you shall get pairs plot. BUT 1. There

Re: [R] adonis(), design

2010-03-05 Thread Gavin Simpson
On Thu, 2010-03-04 at 01:30 -0800, Kay Cichini wrote: inclusion of repeated measures of course should gain power, but here I guess one would have to restrict permutations and that's what may reduce power drastically if sample size is small, at least that's how I understood it. I have also

Re: [R] running R from Notepad++ in Windows 7

2010-03-05 Thread Robert Kinley
hi Andrew Many thanks for the suggestion. I gave it a try , but still get the same issue - a fresh Rgui window (just one) opens, with an empty .RData, when I submit a script ( Ctrl F8 ). I also tried running things as administrator, but it made no difference. Apparently windows 7 is selling

[R] Local dependence term in poLCA

2010-03-05 Thread 千早 ケンジ
Hello all, I am new in this list, my name is Guilherme Kenji and I am writing from Japan. I would like to know if it is possible to include local dependence terms (i.e.: allow for association between variables X and Y within a latent class) in poLCA and how to do it. If someone knows about

Re: [R] ifthen() question

2010-03-05 Thread Matthew Dowle
This post breaks the posting guide in multiple ways. Please read it again (and then again) - in particular the first 3 paragraphs. You will help yourself by following it. The solution is right there in the help page for ?data.frame and other places including Introduction to R. I think its

[R] looking into function body without package installation

2010-03-05 Thread Olga Lyashevska
Dear all, I was wondering if there is a way to explore a syntax of particular function without package installation? I am trying to write my own functions, and I would like to see how other people approached similar problems. If every time I have to install/load package to be able to

Re: [R] which coefficients for a gam(mgcv) model equation?

2010-03-05 Thread Gavin Simpson
On Thu, 2010-03-04 at 14:49 -0800, doon75 wrote: Dear users, I am trying to show the equation (including coefficients from the model estimates) for a gam model but do not understand how to. Slide 7 from one of the authors presentations (gam-theory.pdf URL:

Re: [R] looking into function body without package installation

2010-03-05 Thread Duncan Murdoch
Olga Lyashevska wrote: Dear all, I was wondering if there is a way to explore a syntax of particular function without package installation? I am trying to write my own functions, and I would like to see how other people approached similar problems. If every time I have to install/load

[R] question on maximum of each row of the matrix

2010-03-05 Thread khazaei
Hi, I used the apply()function to compute the maximum of the each row of the matrix, but in my application sometime the matrix has just one row, and the apply() dosen't work. Could you please give me some hints? thank you khazaei __

[R] Two-way multivariate analysis of variance (single group of subjects)

2010-03-05 Thread Tobias Werner
Hello, I have ratings of a single group (10 subjects) for 16 audio samples on a semantic differential with 14 items. The audio samples are varied by two factors: circuit and content - each with 4 levels. I want to do an exploratory analysis of variance to find out if there are different mean

Re: [R] question on maximum of each row of the matrix

2010-03-05 Thread Dennis Murphy
Hi: Turn it into a matrix: x - 1:10 x - matrix(x, nrow = 1) class(x) [1] matrix apply(x, 1, max) [1] 10 HTH, Dennis On Fri, Mar 5, 2010 at 4:30 AM, khaz...@ceremade.dauphine.fr wrote: Hi, I used the apply()function to compute the maximum of the each row of the matrix, but in my

Re: [R] What does Odp mean?

2010-03-05 Thread Prof. John C Nash
Though I've been on the list for quite a while, I've not yet figured out what the Odp: entry in subject lines means. Is it important information? JN __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] What does Odp mean?

2010-03-05 Thread Petr PIKAL
Hi It is the same as Re:. Normal mail clients put Re: but I have to use Lotus Notes and as it is set to local language where Odp is abbreviation for Odpoved which means Response it put Odp to each of my outgoing mails. Sorry for confusion but to get rid of it our IT guys wold need to make

[R] Nonparametric generalization of ANOVA

2010-03-05 Thread blue sky
My interpretation of the relation between 1-way ANOVA and Wilcoxon's test (wilcox.test() in R) is the following. 1-way ANOVA is to test if two or multiple distributions are the same, assuming all the distributions are normal and have equal variances. Wilcoxon's test is to test two distributions

Re: [R] question on maximum of each row of the matrix

2010-03-05 Thread David Winsemius
On Mar 5, 2010, at 7:30 AM, khaz...@ceremade.dauphine.fr wrote: Hi, I used the apply()function to compute the maximum of the each row of the matrix, but in my application sometime the matrix has just one row, and the apply() dosen't work. Could you please give me some hints? If your

[R] How to compute contrast between more than 2 cells? (in contrast package)

2010-03-05 Thread blue sky
I have contacted the author of the contrast package, but received no reply. Could somebody that I have the experience on this package give me some hint. In the vignette of the package, I only see example to compute contrasts between 2 cells. Is there a way to compute the contrast between more

[R] About the interaction A:B

2010-03-05 Thread blue sky
Suppose, 'fr' is data.frame with columns 'Y', 'A' and 'B'. 'A' has levels 'Aa' 'Ab' and 'Ac', and 'B' has levels 'Ba', 'Bb', 'Bc' and 'Bd'. 'Y' columns are numbers. I tried the following three sets of commands. I understand that A*B is equivalent to A+B+A:B. However, A:B in A+B+A:B is different

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread David Winsemius
On Mar 5, 2010, at 8:19 AM, blue sky wrote: My interpretation of the relation between 1-way ANOVA and Wilcoxon's test (wilcox.test() in R) is the following. 1-way ANOVA is to test if two or multiple distributions are the same, assuming all the distributions are normal and have equal

Re: [R] Running script with double-click

2010-03-05 Thread Matt Asher
Thanks Steve. This is working except for plots not showing up. I'll see if I can fix that. Do you know how to target the output to an R Console that will stay open (Rgui would be best)? Cheers, Matt Steve Taylor wrote: You can create a right-mouse menu command to run an R program as

Re: [R] Three most useful R package

2010-03-05 Thread Peter Ehlers
I don't know if this is too long for a fortune, but it sure seems to be that it should be one. Anyway, thanks for the chuckle, Greg. -Peter Ehlers On 2010-03-04 13:29, Greg Snow wrote: Well, the HeadSlap package would of course require the esp package so that it could tell the difference

[R] Operating System Variable

2010-03-05 Thread Rob Helpert
Hi. Is there an easy way (analogous to the $^O variable in perl) to find out what operating system R is currently using? Thanks. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] About the interaction A:B

2010-03-05 Thread Gabor Grothendieck
The way to understand this is to look at the output of model.matrix: model.matrix(fo, fr) for each formula you tried. If your data is large you will have to use a subset not to be overwhelmed with output. On Fri, Mar 5, 2010 at 9:08 AM, blue sky bluesky...@gmail.com wrote: Suppose, 'fr' is

Re: [R] Operating System Variable

2010-03-05 Thread Henrique Dallazuanna
Try: .Platform$OS.type On Fri, Mar 5, 2010 at 11:45 AM, Rob Helpert rhelp...@gmail.com wrote: Hi. Is there an easy way (analogous to the $^O variable in perl) to find out what operating system R is currently using? Thanks. __

[R] Error in inherits(x, data.frame) : subscript out of bounds

2010-03-05 Thread kloytyno
Hi, I have a list p with different size dataframes and length of over 8000. I'm trying to calculate correlations between the rows of dataframes of this list and columns of another dataset (type data.frame also) so that first column is correlated with all the rows in the list dataframe. Some

[R] Data frame query

2010-03-05 Thread ManInMoon
I have created a large dataframe (d) by getting data from file using read.table I now have 79 columns and 3 million rows. How can I plot the 6th column? I tried plot(d[,6]) but it doesn't look right. When I try to do just d[,6] the console gets some odd levels message I don't understand Moon --

[R] install rJava in linux

2010-03-05 Thread Grześ
Hi I'm a problem with installing rJava in Linux I have got in my system : java-sun, java-sun-tools, java-sun-jre but if I wont install rJava I got a problem like this: install.packages(rJava, dependencies = TRUE) --- Please select a CRAN mirror for use in this session --- trying URL

[R] I can't find rpart help (linux)

2010-03-05 Thread Grześ
Hi I have installed rpart in my Linux (PLD) but I don't know how I may find help conect this package? Here is my instalaction: install.packages(rpart,dependencies=TRUE) --- Please select a CRAN mirror for use in this session --- trying URL

[R] Data frame column

2010-03-05 Thread ManInMoon
I have a big data frame and I have extracted a bit by doing: y-d[1:10,6] y [1] Headings 0-49 -98 -49 -41 -120 -155 -204 -169 92329 Levels: -0 -1 -10 -100 -1000 -1 -10001 -10002 -10003 -10004 -10005 -10006 -10007 -10008 -10009 -1001 -10010 -10011

[R] for help on building a R package with several R function and a bunch of c, c++

2010-03-05 Thread alex46015
Hope I can get quick help from here, I have a bunch of c, c++ included main function and makefile. It works well on both UNIX and windows. I tried to build R package which include this C++ program and several other R functions. R function here are independent c++ code. I prefer to define one

Re: [R] how to make this sequence: 1,2,3,4,5,4,3,2,1

2010-03-05 Thread kensuguro
so basically, it's impossible to do with just seq() and rep().. Doesn't seem like a good question for chapter 1... Also, problem 1.13 is even more crazy.. it asks you to build the fibonacci sequence. Now I'm a programmer, and so went way ahead in the book to see how functions were written,

[R] hier.part

2010-03-05 Thread Marco Jorge
Hi everyone, A beguinner question. - How shall i import 9 different ascii (created from a gis layer (arcmap grid)) into R to create a single dataframe for using in hier.part? Should i use read.table, then turn each created object into a single vector using unlist and finally use data.frame to

Re: [R] Operating System Variable

2010-03-05 Thread Rob Helpert
Excellent! Thank you. On Fri, Mar 5, 2010 at 9:52 AM, Henrique Dallazuanna www...@gmail.com wrote: Try: .Platform$OS.type On Fri, Mar 5, 2010 at 11:45 AM, Rob Helpert rhelp...@gmail.com wrote: Hi. Is there an easy way (analogous to the $^O variable in perl) to find out what operating

Re: [R] Operating System Variable

2010-03-05 Thread Duncan Murdoch
On 05/03/2010 9:45 AM, Rob Helpert wrote: Hi. Is there an easy way (analogous to the $^O variable in perl) to find out what operating system R is currently using? .Platform is probably what you want. R.version gives related information. I don't think there's anything built in to determine

Re: [R] Operating System Variable

2010-03-05 Thread Prof Brian Ripley
See ?R.version ?Sys.info ?.Platform On Windows, ?win.version It all depends what you mean by 'Operating System'. On Fri, 5 Mar 2010, Rob Helpert wrote: Hi. Is there an easy way (analogous to the $^O variable in perl) to find That's a pretty basic description. Even R.version$os often

Re: [R] Data frame query

2010-03-05 Thread David Winsemius
On Mar 5, 2010, at 7:40 AM, ManInMoon wrote: I have created a large dataframe (d) by getting data from file using read.table I now have 79 columns and 3 million rows. How can I plot the 6th column? I tried plot(d[,6]) but it doesn't look right. When I try to do just d[,6] the console

Re: [R] Data frame column

2010-03-05 Thread David Winsemius
On Mar 5, 2010, at 8:26 AM, ManInMoon wrote: I have a big data frame and I have extracted a bit by doing: y-d[1:10,6] y [1] Headings 0-49 -98 -49 -41 -120 -155 -204 -169 92329 Levels: -0 -1 -10 -100 -1000 -1 -10001 -10002 -10003 -10004 -10005

[R] Improved Nelder-Mead algorithm and Matlab's fminsearch. Was: Hi

2010-03-05 Thread Ravi Varadhan
The `fminsearch' in Matlab uses a version of the Nelder-Mead simplex search algorithm, which is a derivative-free search technique. The Nelder-Mead is also the default algorithm in optim(). Therefore, you can simply call optim() to get your job done. However, I would like to mentiion that

Re: [R] install rJava in linux

2010-03-05 Thread Ista Zahn
On Fri, Mar 5, 2010 at 4:41 AM, Grześ gregori...@gmail.com wrote: Hi I'm a problem with installing rJava in Linux I have got in my system : java-sun, java-sun-tools, java-sun-jre but if I wont install rJava I got a problem like this:  install.packages(rJava, dependencies = TRUE) ---

Re: [R] hier.part

2010-03-05 Thread David Winsemius
On Mar 5, 2010, at 9:52 AM, Marco Jorge wrote: Hi everyone, A beguinner question. - How shall i import 9 different ascii (created from a gis layer (arcmap grid)) into R to create a single dataframe for using in hier.part? Should i use read.table, then turn each created object into a

Re: [R] for help on building a R package with several R function and a bunch of c, c++

2010-03-05 Thread Whit Armstrong
Pick up Rcpp, make your life easier. http://dirk.eddelbuettel.com/code/rcpp.html -Whit On Fri, Mar 5, 2010 at 9:19 AM, alex46...@yahoo.com wrote: Hope I can get quick help from here, I have a bunch of c, c++ included main function and makefile. It works well on both UNIX and windows. I

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Matthias Gondan
This is your first of three postings in the last hour and they are all in a category that could well be described as requests for tutoring in basic statistical topics. I am of the impression you have been requested not to engage in such behavior on this list. For this question for instance

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread David Winsemius
On Mar 5, 2010, at 10:34 AM, Matthias Gondan wrote: This is your first of three postings in the last hour and they are all in a category that could well be described as requests for tutoring in basic statistical topics. I am of the impression you have been requested not to engage in such

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Ravi Varadhan
David, I agree with your sentiments. I also think that it is bad posting etiquette not to sign one's genuine name and affiliation when asking for help, which blue sky seems to do a lot. Bert Gunter has already raised this issue, and I completely agree with him. I would also like to urge the

Re: [R] Running script with double-click

2010-03-05 Thread Gabor Grothendieck
Note that if you use Rterm.bat in http://batchfiles.googlecode.com in place of Rterm.exe then you won't have to adjust the Run action when you upgrade R. Rterm.bat is a single self contained Windows batch file that you simply place on your Windows path. On Thu, Mar 4, 2010 at 8:51 PM, Steve

[R] Still on poLCA

2010-03-05 Thread 千早 ケンジ
Dear all, I have just sent a message asking about poLCA but I thought of another question I wanted to ask. I get the G^2 statistic in my output and want to test for its significance. I get that the degrees of freedom for the test are (S-1-p) where S is the number of different patterns observed

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Gabor Grothendieck
I am happy to answer posts to r-help regardless of the name and email address of the poster but would draw the line at someone excessively posting without a reasonable effort to find the answer first or using it for homework since such requests could flood the list making it useless for everyone.

Re: [R] Is it possible to recursively update a function?

2010-03-05 Thread Uwe Ligges
On 05.03.2010 01:40, Carl Witthoft wrote: My foolish move for this week: I'm going to go way out on a limb and guess what the OP wanted was something like this. i=1, foo = x*exp(-x) i=2, foo= x^2*exp(-x) i=3, foo = x^3*exp(-x) . . . In which case he really should create a vector

Re: [R] I can't find rpart help (linux)

2010-03-05 Thread Uwe Ligges
On 05.03.2010 10:51, Grześ wrote: Hi I have installed rpart in my Linux (PLD) but I don't know how I may find help conect this package? Here is my instalaction: install.packages(rpart,dependencies=TRUE) --- Please select a CRAN mirror for use in this session --- trying URL

[R] Cross tabulation with fixed dimensions

2010-03-05 Thread Tarmo Remmel
Hello, This is a seemingly simple task, but it has been frustrating me for too long, so I am turning to this list for some help. I have two vectors of factors which are quite long; two simple examples are shown here: a - c(1,2,3,4,5) b - c(1,2,5,5,6) If I produce a cross-tabulation of these

[R] Changing the Prompt for browser()

2010-03-05 Thread Andrew Redd
Is there a way that I can change the prompt for within a browser() call. I often use use code like with(obj1,browser()) Browse[1] Is there a way that I can set it so that I can get something like with(obj1,browser(prompt=obj1)) obj1[1] I know that prompt is not a valid option for browser,

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Jeremy Miles
Two links for you which will get your answer much quicker than a mailing list: http://lmgtfy.com/?q=non-parametric+anova+R or http://www.justfuckinggoogleit.com/search.pl?query=non+parametric+anova+R Jeremy On 5 March 2010 05:19, blue sky bluesky...@gmail.com wrote: My interpretation of the

Re: [R] Cross tabulation with fixed dimensions

2010-03-05 Thread Gabor Grothendieck
Those are numerical, not factors. If they were factors all levels would be represented. a - factor(c(1,2,3,4,5), levels = 1:5) b - factor(c(1,2,5,5,6), levels = 1:6) table(a, b) b a 1 2 3 4 5 6 1 1 0 0 0 0 0 2 0 1 0 0 0 0 3 0 0 0 0 1 0 4 0 0 0 0 1 0 5 0 0 0 0 0 1 On Fri, Mar

Re: [R] Cross tabulation with fixed dimensions

2010-03-05 Thread David Winsemius
On Mar 5, 2010, at 11:43 AM, Tarmo Remmel wrote: Hello, This is a seemingly simple task, but it has been frustrating me for too long, so I am turning to this list for some help. I have two vectors of factors which are quite long; two simple examples are shown here: No, those are not

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Frank E Harrell Jr
Gabor Grothendieck wrote: I am happy to answer posts to r-help regardless of the name and email address of the poster but would draw the line at someone excessively posting without a reasonable effort to find the answer first or using it for homework since such requests could flood the list

Re: [R] About the interaction A:B

2010-03-05 Thread blue sky
The following is the code for the model.matrix. But it still doesn't answer why A:B is interpreted differently in Y~A+B+A:B and Y~A:B. By 'why', I mean how R internally does it and what is the rational behind the way of doing it? And it didn't answer why in the model.matrix of Y~A, there are a-1

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread blue sky
On Fri, Mar 5, 2010 at 9:42 AM, David Winsemius dwinsem...@comcast.net wrote: On Mar 5, 2010, at 10:34 AM, Matthias Gondan wrote: This is your first of three postings in the last hour and they are all in a category that could well be described as requests for tutoring in basic statistical

Re: [R] About the interaction A:B

2010-03-05 Thread Frank E Harrell Jr
You neglected to state your name and affiliation, and your question demonstrates an allergy to R documentation. Frank blue sky wrote: The following is the code for the model.matrix. But it still doesn't answer why A:B is interpreted differently in Y~A+B+A:B and Y~A:B. By 'why', I mean how R

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread blue sky
I don't see which a link has the GENERAL and COMPLETE MATHEMATICAL description of nonparametric ANOVA for ARBITRARY MODEL. Would you please be specific which one does so? On Fri, Mar 5, 2010 at 10:52 AM, Jeremy Miles jeremy.mi...@gmail.com wrote: Two links for you which will get your answer much

Re: [R] Running complete R script from Java

2010-03-05 Thread Romain Francois
You can source the script, e.g run the command : eval( source( ' + script + ') ) ; Questions about rJava/JRI are better on the stats-rosuda-devel mailing list: http://mailman.rz.uni-augsburg.de/mailman/listinfo/stats-rosuda-devel Romain On 03/05/2010 03:51 AM, Ralf B wrote: Is it

Re: [R] About the interaction A:B

2010-03-05 Thread Jeff Laake
On 3/5/2010 9:19 AM, Frank E Harrell Jr wrote: You neglected to state your name and affiliation, and your question demonstrates an allergy to R documentation. Frank I agree with Frank but will try to answer some of your questions as I understand it. First, model.matrix uses the

[R] How to match vector with a list ?

2010-03-05 Thread Carlos Petti
Dear list, I have a vector of characters and a list of two named elements : i - c(a,a,b,b,b,c,c,d) j - list(j1 = c(a,c), j2 = c(b,d)) I'm looking for a fast way to obtain a vector with names, as follows : [1] j1 j1 j2 j2 j2 j1 j1 j2 I used : match - lapply(j, function (x) {which(i %in% x)})

[R] Sweave and optional document sections

2010-03-05 Thread Aleksey Naumov
Dear R and Sweave users, Is there a way to have optional sections in a Sweave-generated report document, complete with section header(s), text and code chunks? In other words, I'd like for my report to include or omit certain sections based on the data itself. For example, If I examine the input

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Matthew Dowle
Frank, I respect your views but I agree with Gabor. The posting guide does not support your views. It is not any of our views that are important but we are following the posting guide. It covers affiliation. It says only that some consider it good manners to include a concise signature

Re: [R] Sweave and optional document sections

2010-03-05 Thread Gabor Grothendieck
Its possible to do that using latex if/then/else macros which you can find in latex package ifthen; however, once you are getting to that level of complexity, Sweave is more of a hindrence than a help and is probably no longer the appropriate tool for the job. On Fri, Mar 5, 2010 at 12:55 PM,

Re: [R] About the interaction A:B

2010-03-05 Thread RICHARD M. HEIBERGER
On Fri, Mar 5, 2010 at 12:41 PM, Jeff Laake jeff.la...@noaa.gov wrote: On 3/5/2010 9:19 AM, Frank E Harrell Jr wrote: You neglected to state your name and affiliation, and your question demonstrates an allergy to R documentation. A:B indicates a two-level naming scheme. The naming is

Re: [R] About the interaction A:B

2010-03-05 Thread blue sky
On Fri, Mar 5, 2010 at 11:41 AM, Jeff Laake jeff.la...@noaa.gov wrote: On 3/5/2010 9:19 AM, Frank E Harrell Jr wrote: You neglected to state your name and affiliation, and your question demonstrates an allergy to R documentation. Frank I agree with Frank but will try to answer some of your

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Gabor Grothendieck
On Fri, Mar 5, 2010 at 12:58 PM, Matthew Dowle mdo...@mdowle.plus.com wrote: As far as I know you are wrong that there is no moderator.  There are in fact an uncountable number of people who are empowered to moderate i.e. all of us. In other words its up to the responders to moderate.  The

Re: [R] [Rd] Changing the Prompt for browser()

2010-03-05 Thread Prof Brian Ripley
On Fri, 5 Mar 2010, Andrew Redd wrote: Is there a way that I can change the prompt for within a browser() call. I often use use code like with(obj1,browser()) Browse[1] Is there a way that I can set it so that I can get something like with(obj1,browser(prompt=obj1)) obj1[1] I know that

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread John Sorkin
The sad part of this interchanges is that Blue Sky does not seem to be amiable to suggestion. He, or she, has not taken note, or responded to the fact that a number of people believe it is good manners to give a real name and affiliation. My mother taught me that when two people tell you that

Re: [R] How to match vector with a list ?

2010-03-05 Thread jim holtman
try this: i - c(a,a,b,b,b,c,c,d) j - list(j1 = c(a,c), j2 = c(b,d)) # create a matrix for mapping map - do.call(rbind, lapply(names(j), function(x) cbind(x, j[[x]]))) # generate your output map[match(i, map[,2]),1] [1] j1 j1 j2 j2 j2 j1 j1 j2 On Fri, Mar 5, 2010 at 12:42 PM, Carlos

Re: [R] How to match vector with a list ?

2010-03-05 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Carlos Petti Sent: Friday, March 05, 2010 9:43 AM To: r-help@r-project.org Subject: [R] How to match vector with a list ? Dear list, I have a vector of characters and a

Re: [R] About the interaction A:B

2010-03-05 Thread Jeff Laake
You are correct that you need to use ~-1+A:B. I use that all the time and just spaced it out when I was writing the response. Using ~A:B will produce one too many columns. Didn't follow your other question. You can always look at the result of model.matrix to see if it is correct or dig

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Matthew Dowle
John, So you want BlueSky to change their name to Paul Smith at New York University, just to give a totally random, false name, example, and then you will be happy ? I just picked a popular, real name at a real, big place. Are you, or is anyone else, going to check its real ? We want

Re: [R] Sweave and optional document sections

2010-03-05 Thread Max Kuhn
That isn't hard to do with Sweave. Within you if branch, you can have your code write out any markup you choose (including \section). For figures, I would suggest writing the image file manually (i.e with the code chunk option fig = FALSE) and also write out the \includegraphics statements too.

[R] Breadt-first-search algorithm

2010-03-05 Thread Thomas Jensen
Dear R-list, does anyone of you know whether there exist a breadth-first-search algorithm for R? Best, Thomas Jensen __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] zoo Package Question

2010-03-05 Thread testuser
I want to use the zoo package to convert an irregular time series to a regular one at every 15 min. interval. I would like to read in the csv file as a zoo object. When trying to do a seq(from,to,by), how can I specify the from to be the first time element in the zoo object and to to be the last

Re: [R] Is it possible to recursively update a function?

2010-03-05 Thread Ming Zhong
I was trying to replicate one CRM simulation. The following code works but seems redundant so I want to create a loop. O'Quigley CRM example 1# f1-function(x) exp(-x) dose-c(-1.47,-1.1,-.69,-.42,0.0,.42) p-c(0.05,0.1,0.2,0.3,0.5,0.7) y-c(0,0,1,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,1,1)

Re: [R] Is it possible to recursively update a function?

2010-03-05 Thread Seeker
Thanks for your suggestion, Carl. Actually I am looking for a series of functions like these exp(-x)*.5^x exp(-x)*.5^x*(1-.4^x) exp(-x)*.5^x*(1-.4^x)*(1-.3^x) where(.5,.4,.3...) are from the coming results. I am not sure how to construct such an irregular fucntion vector. On Mar 4, 6:40 pm,

Re: [R] install rJava in linux

2010-03-05 Thread Grześ
Thank you vary much! =^D -- View this message in context: http://n4.nabble.com/install-rJava-in-linux-tp1579395p1579852.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] I can't find rpart help (linux)

2010-03-05 Thread Grześ
Thank you very much! :) -- View this message in context: http://n4.nabble.com/I-can-t-find-rpart-help-linux-tp1579403p1579846.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] End of line marker?

2010-03-05 Thread jonas garcia
Jim, Duncan and David, Thanks to you guys I manage to solve the problem and I have learnt a lot. Best regards J On Fri, Mar 5, 2010 at 4:55 AM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 04/03/2010 11:40 PM, David Winsemius wrote: On Mar 4, 2010, at 10:58 PM, Duncan Murdoch wrote: On

[R] Assistance with pointers to code for B-spline derivatives (S-plus related).

2010-03-05 Thread Jeffrey Racine
Hi. I have been using the splines package for my work, in particular, the bs() function and associated predict() method. I now find myself in need of the derivatives of this beast. In the man page for predict.bSpline I found `predict(object, x, nseg=50, deriv=0, ...)' but alas this is not

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Ted Harding
Again, I have the same attitude as Gabor. I don't need to know the real identity of a poster, if they ask a sensible question (which may well be elementary). As a contribution to the discussion, may I point out that many people use different email addresses for different purposes, so that any

[R] how can I look at .Internal(model.matrix(t, data))?

2010-03-05 Thread Werner W.
Hi, I would like to see how model.matrix expands factor column to a set of dummy columns. I think that is done int .Internal(model.matrix(t, data)) which is called from model.matrix.default. But I have not idea how I can look at this function. How can I get to such internal functions? Thanks

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Frank E Harrell Jr
Matthew Dowle wrote: John, So you want BlueSky to change their name to Paul Smith at New York University, just to give a totally random, false name, example, and then you will be happy ? I just picked a popular, real name at a real, big place. Are you, or is anyone else, going to

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Robert A LaBudde
A search on bluesky...@gmail.com shows the user is in Norfolk, VA, USA. At 01:26 PM 3/5/2010, John Sorkin wrote: The sad part of this interchanges is that Blue Sky does not seem to be amiable to suggestion. He, or she, has not taken note, or responded to the fact that a number of people

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Ben Bolker
blue sky bluesky315 at gmail.com writes: I almost certainly shouldn't feed the trolls, but: 1. ?kruskal.test (listed in see also in ?wilcox.test) 2. One of the disadvantages of nonparametric tests is that it is in general difficult to generalize them to analogues of arbitrarily complex

[R] REvolutions blog: February Roundup

2010-03-05 Thread David M Smith
I write about R every weekday at the Revolutions blog: http://blog.revolution-computing.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. http://bit.ly/9GoTVd announced the availability on YouTube of What is R, a 4-part video

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Douglas Bates
On Fri, Mar 5, 2010 at 12:16 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Fri, Mar 5, 2010 at 12:58 PM, Matthew Dowle mdo...@mdowle.plus.com wrote: As far as I know you are wrong that there is no moderator.  There are in fact an uncountable number of people who are empowered to

Re: [R] Is it possible to recursively update a function?

2010-03-05 Thread David Winsemius
On Mar 5, 2010, at 11:06 AM, Seeker wrote: Thanks for your suggestion, Carl. Actually I am looking for a series of functions like these exp(-x)*.5^x exp(-x)*.5^x*(1-.4^x) exp(-x)*.5^x*(1-.4^x)*(1-.3^x) where(.5,.4,.3...) are from the coming results. Those are not really functions but rather

Re: [R] zoo Package Question

2010-03-05 Thread Gabor Grothendieck
If your series is nearly regular, that is it is regularly spaced except for a few missing points then as.ts(z) will convert it to a regular ts series and as.zoo(as.ts(z)) does that and converts it back. You may need to add back the class. For example see:

Re: [R] conditioning variable in panel.xyplot?

2010-03-05 Thread Seth W Bigelow
I'm stumped after an hour or so reading about subscripts in panel.xyplot. Apparently the panel function is executed for each subset of data in the main dataset (specified by the conditioning variable, 'site' in my example), and the 'subscripts' keyword passes a vector of the corresponding row

Re: [R] Sweave and optional document sections

2010-03-05 Thread Max Kuhn
I haven't used windows for a while... when I did I used MikTex and TeXnicCenter. Max On Fri, Mar 5, 2010 at 2:27 PM, Aleksey Naumov anau...@gmail.com wrote: Max, Thank you very much! I'll give LaTeX a go (haven't used it in a while). Is there a recommended distribution of LaTeX for Windows?

[R] How to assign week numbers to a time-series

2010-03-05 Thread Hosack, Michael
Hello everyone, My progress has stalled on finding a way of creating a somewhat complicated variable to add to my existing dataframe and I am hoping one of you could help me out. The dataframe below contains only a fraction of the data of my complete dataframe, but all of the variables. What I

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Dylan Beaudette
On Friday 05 March 2010, Ted Harding wrote: Again, I have the same attitude as Gabor. I don't need to know the real identity of a poster, if they ask a sensible question (which may well be elementary). As a contribution to the discussion, may I point out that many people use different email

Re: [R] How to assign week numbers to a time-series

2010-03-05 Thread David Winsemius
On Mar 5, 2010, at 4:23 PM, Hosack, Michael wrote: Hello everyone, My progress has stalled on finding a way of creating a somewhat complicated variable to add to my existing dataframe and I am hoping one of you could help me out. The dataframe below contains only a fraction of the data

  1   2   >