[R] Combining elements of vectors

2009-06-08 Thread Marie Sivertsen
Dear list, I have a vector of elements which I want to combined each with each, but none with itself. For example, v - c(a, b, c) and I need a function 'combine' such that combine(v) [[1]] [1] a b [[2]] [1] a b [[3]] [1] b c I am not very interested in the orders of the output items for

Re: [R] Combining elements of vectors

2009-06-08 Thread Marie Sivertsen
) I hope it helps. Best, Dimitris Marie Sivertsen wrote: Dear list, I have a vector of elements which I want to combined each with each, but none with itself. For example, v - c(a, b, c) and I need a function 'combine' such that combine(v) [[1]] [1] a b [[2]] [1] a b [[3

Re: [R] Combining elements of vectors

2009-06-08 Thread Marie Sivertsen
On Mon, Jun 8, 2009 at 3:04 PM, baptiste auguie baptiste.aug...@gmail.comwrote: Marie Sivertsen wrote: Dear list, I have a vector of elements which I want to combined each with each, but none with itself. For example, v - c(a, b, c) and I need a function 'combine

[R] Parsing configuration files

2009-05-18 Thread Marie Sivertsen
Dear list, Is there any functionality in R that would allow me to parse config files? I have trie ??config and apropos('config') without succes, and also search the R package site. Mvh. Marie [[alternative HTML version deleted]] __

Re: [R] How to find the path or the current file?

2009-03-25 Thread Marie Sivertsen
: See: https://stat.ethz.ch/pipermail/r-help/2009-January/184745.html On Tue, Mar 24, 2009 at 7:16 AM, Marie Sivertsen mariesiv...@gmail.com wrote: Dear useRs, I have a collection of source file and some of these call others. The files are distribute among a number

[R] How to find the path or the current file?

2009-03-24 Thread Marie Sivertsen
Dear useRs, I have a collection of source file and some of these call others. The files are distribute among a number of directories, and to know how to call some other file they need to know what file is currently executed. As example, I have a file 'search.R' located in directory 'bin' which

Re: [R] How to find the path or the current file?

2009-03-24 Thread Marie Sivertsen
Thank you Gabor and Duncan for your replys. Mvh. Marie On Tue, Mar 24, 2009 at 1:00 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: See: https://stat.ethz.ch/pipermail/r-help/2009-January/184745.html On Tue, Mar 24, 2009 at 7:16 AM, Marie Sivertsen mariesiv...@gmail.com wrote

[R] Problems with ARIMA models?

2009-02-25 Thread Marie Sivertsen
Dear R, I have find a website where they report problem with ARIMA models in R. I run the examples there and they give result as shown on the website. Does this mean that nothing has corrected in R? Maybe you not have seen the page, but the author said he contacted you. Here is the URL:

[R] Problem with plotting data from within a function

2009-02-05 Thread Marie Sivertsen
Dear List, I try to develop code where plotting functions are embeded in my own functions. The following is simplified example: test - function() { data - data.frame(x=rep(1:2, each=50), y=rnorm(100)) library(lattice) attach(data) xyplot(y~x) detach() } test() As far as I

Re: [R] eval and as.name

2009-02-05 Thread Marie Sivertsen
Hi, Why do you use the equals sign for assignment instead of the arrow, is this equal? Mvh. Marie On Thu, Feb 5, 2009 at 11:59 PM, Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no wrote: you may want to avoid this sort of indirection by using lists with named components: d =

Re: [R] tab characters

2009-01-30 Thread Marie Sivertsen
I see 'The R Inferno' being refered quiet often recently. But it was now pointed by Duncan Murdoch that for example the statement concerning variables in a for loop is not correct in there (page 62). As I can not find any information about the book been reviewed by anyone I have a question: is

Re: [R] tab characters

2009-01-30 Thread Marie Sivertsen
Thank you both Peter and Duncan for explanations. 'The R Inferno' is indeed not so much introduction but I find it useful to know about how I can go wrong in simple things before I do. Mvh. Marie On Fri, Jan 30, 2009 at 3:03 PM, Peter Dalgaard p.dalga...@biostat.ku.dkwrote: Marie Sivertsen

Re: [R] Unexpected behaviour of the as.Date (was: Error as.Date on Invalid Dates)

2009-01-23 Thread Marie Sivertsen
Thank you Greg for your explanations. I think you explained the problem clearly now. Mvh. Marie On Thu, Jan 22, 2009 at 10:24 PM, Greg Snow greg.s...@imail.org wrote: Comments interspersed below From: Marie Sivertsen [mailto:mariesiv...@gmail.com] Sent: Thursday, January 22, 2009 1:17 PM

Re: [R] Error as.Date on Invalid Dates

2009-01-22 Thread Marie Sivertsen
I am relatively new to R, so maybe I am miss something, but I now tried the as.Date now and have problems understanding how it works (or don't work as it seem). Brian D Ripley wrote: On Thu, 22 Jan 2009, Terry Therneau wrote: One idea is to use the as.date function, for the older (and less

[R] Unexpected behaviour of the as.Date (was: Error as.Date on Invalid Dates)

2009-01-22 Thread Marie Sivertsen
...@stats.ox.ac.ukwrote: You've hijacked a thread here. On Thu, 22 Jan 2009, Marie Sivertsen wrote: I am relatively new to R, so maybe I am miss something, but I now tried the a s.Date now and have problems understanding how it works (or don't work as it seem). Brian D Ripley wrote: On Thu

Re: [R] Unexpected behaviour of the as.Date (was: Error as.Date on Invalid Dates)

2009-01-22 Thread Marie Sivertsen
Thank you Greg and Gabor for explanations. I have some further question below. On Thu, Jan 22, 2009 at 8:16 PM, Greg Snow greg.s...@imail.org wrote: I believe the original thread was about whether the function returns NA or stops with an error when given an invalid date (such as Feb 29 in a