[R] system(mysql... Does not recognize < as passing an attribute (No HTML)

2007-01-16 Thread Lapointe, Pierre
Hi, 

This is my command line request: mysql -u root -ppassword -D quant
 system(paste('mysql -u root -ppassword -D quant
 version
   _   
platform   i386-pc-mingw32 
arch   i386
os mingw32 
system i386, mingw32   
status 
major  2   
minor  4.1 
year   2006
month  12  
day18  
svn rev40228   
language   R   
version.string R version 2.4.1 (2006-12-18)

**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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.


[R] system(mysql... Does not recognize < as passing an attribute

2007-01-16 Thread Lapointe, Pierre
Hi, 

This is my command line request: mysql -u root -ppassword -D quant
 system(paste('mysql -u root -ppassword -D quant
 version
   _   
platform   i386-pc-mingw32 
arch   i386
os mingw32 
system i386, mingw32   
status 
major  2   
minor  4.1 
year   2006
month  12  
day18  
svn rev40228   
language   R   
version.string R version 2.4.1 (2006-12-18)


**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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.


[R] Gregexpr - extract results with lapply

2006-11-07 Thread Lapointe, Pierre
Gregexpr - extract results with lapply

Hello,

I need to extract sequences of three upper case letters in a string. In
other words, in this string:

str <-c("ABC", "this WOUld be gOOD")

The result I'm looking for is ABC WOU OOD.

With gregexpr, I can get the position and length of the sequences

gregexpr('[A-Z]{3}',str,perl=TRUE)

[[1]]
[1] 1
attr(,"match.length")
[1] 3

[[2]]
[1]  6 16
attr(,"match.length")
[1] 3 3

and with substr, I can extract  the data.  (I use 1 and 3 as start and stop
in this example, since I haven't figured out how to use the gregexpr
results.

substr(str,1,3)

My problem is linking it all together.  I know the answer is probably with
lapply

lapply(str,substr,1,3)

but I don't know how to specify the right start and stop positions from the
gregexpr results.


**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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.


[R] grep searching for sequence of 3 consecutive upper case letters

2006-11-06 Thread Lapointe, Pierre
Hello,

I need to identify all elements which have a sequence of 3 consecutive upper
case letters, anywhere in the string.

I tested my grep expression on this site: http://regexlib.com/RETester.aspx

But when I try it in R, it does not filter anything.

str <-c("AGH", "this WOUld be good", "Not Good at All")
str[grep('[A-Z]{3}',str)] #looking for a sequence of 3 consecutive upper
case letters

[1] "AGH""this WOUld be good" "Not Good at All"   

Any idea?

Pierre

**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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.


[R] How would you export a 3-dimensional array to an SQL database?

2006-07-19 Thread Lapointe, Pierre
Hello,

How would you export a 3-dimensional array to an SQL database?

a<-array(1:24, 2:4)

Is there an open source DB that would be more adequate for this type of
operation?

Is there a way to reshape/flatten a 3-dimensional array?

Regards,

Pierre Lapointe

**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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] sqlSave() and rownames=TRUE makes my Rgui crash

2006-06-09 Thread Lapointe, Pierre

On 6/9/2006 9:42 AM, Lapointe, Pierre wrote:
> On 6/9/2006 8:51 AM, Lapointe, Pierre wrote:
>> Hello,
>> 
>> I created a table in MySQL with this command
>> 
>> CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk),
>> id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30))
>> 
>> ### In R, I can connect to this table:
>> 
>> library(DBI)
>> library(RODBC)
>> chan <- odbcConnect("MySQL51", uid="root", pwd="xxx")
>> first <- sqlQuery(chan, "select * from example")
>> close(chan)
>> First
>> #[1] pk   id   col1 col2
>> #<0 rows> (or 0-length row.names)
>> 
>> ### This is the table I'm trying to save:
>> dframe <-data.frame(matrix(1:6,2,3))
>> colnames(dframe)=c("id","col1","col2")
>> dframe
>> #  id col1 col2
>> #1  135
>> #2  246
>> 
>> ### But this makes Rgui crash and close
>> chan <- odbcConnect("MySQL51", uid="root", pwd="xxx") sqlSave(chan, 
>> dframe, tablename="example", rownames = FALSE, append=T)
>> close(chan)
>> 
>> ### With rownames = T and safer=F, it works, but I loose the
>> autoincrementing PK in MySQL chan <- odbcConnect("MySQL51", 
>> uid="root", pwd="momie")  #default database=fbn
>> sqlSave(chan, dframe, tablename="example", rownames = T,
>> addPK=T,append=T,safer=F)
>> close(chan)
>> 
>> Any idea?
>> 
>> I'm on win2K, MySQL version 5.0.21-community-nt
> 
>>>I don't know why you're using DBI; perhaps it interferes with RODBC
> somehow.
> 
> **It still crashes without DBI
> 
>>>If that's not it, then you might want to try lower level methods than
>>>sqlSave:  perhaps use sqlQuery to send an INSERT command to the 
>>>database.  Build up from there.
> 
> **Good suggestion, however, I'm not sure how to pass a table through 
> an sql statement. From this archived doc, 
> http://finzi.psych.upenn.edu/R/Rhelp02a/archive/10073.html I tried 
> this using a dataframe instead of a single number.

You can't.  You can only insert one record at a time this way in 
general, but MySQL allows multiple inserts on one line.  So it's a lot 
of work, but you might figure out what's causing your crash.


> 
> But I get this error:
> 
> #test
> chan <- odbcConnect("MySQL51", uid="root", pwd="momie")  #default 
> database=fbn query <- paste("INSERT INTO example VALUES 
> ('",dframe,"')",sep="")
> sqlQuery(chan,query)
> close(chan)

You'd want something like

inserts <- with(dframe, paste("('", id, "','", col1, "','", col2, "')", 
sep="", collapse=",")
query <- paste("INSERT INTO example(id, col1, col2) VALUES", inserts)
sqlQuery(chan, query)

(This isn't even tested to see if I got the syntax right, and it's 
probably not legal syntax on other databases.  For those you could put
together multiple  INSERT statements.)

Nice workaround, but I'd be reluctant to use it for the same reason I'd
prefer not to use RMySQL: I'd like my R code to be easily adaptable in case
I port my DB to let's say PostgreSQL.  Using RODBC, I would probably only
have to change the DSN to make it work.

Pierre Lapointe

**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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


Re: [R] sqlSave() and rownames=TRUE makes my Rgui crash

2006-06-09 Thread Lapointe, Pierre

On 6/9/2006 8:51 AM, Lapointe, Pierre wrote:
> Hello,
> 
> I created a table in MySQL with this command
> 
> CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk),  
> id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30))
> 
> ### In R, I can connect to this table:
> 
> library(DBI)
> library(RODBC)
> chan <- odbcConnect("MySQL51", uid="root", pwd="xxx")
> first <- sqlQuery(chan, "select * from example")
> close(chan)
> First
> #[1] pk   id   col1 col2
> #<0 rows> (or 0-length row.names)
> 
> ### This is the table I'm trying to save:
> dframe <-data.frame(matrix(1:6,2,3))
> colnames(dframe)=c("id","col1","col2")
> dframe
> #  id col1 col2
> #1  135
> #2  246
> 
> ### But this makes Rgui crash and close
> chan <- odbcConnect("MySQL51", uid="root", pwd="xxx")
> sqlSave(chan, dframe, tablename="example", rownames = FALSE, append=T)
> close(chan)
> 
> ### With rownames = T and safer=F, it works, but I loose the 
> autoincrementing PK in MySQL chan <- odbcConnect("MySQL51", 
> uid="root", pwd="momie")  #default database=fbn
> sqlSave(chan, dframe, tablename="example", rownames = T,
> addPK=T,append=T,safer=F)
> close(chan)
> 
> Any idea?
> 
> I'm on win2K, MySQL version 5.0.21-community-nt

>>I don't know why you're using DBI; perhaps it interferes with RODBC
somehow.

**It still crashes without DBI

>>If that's not it, then you might want to try lower level methods than 
>>sqlSave:  perhaps use sqlQuery to send an INSERT command to the 
>>database.  Build up from there.

**Good suggestion, however, I'm not sure how to pass a table through an sql
statement. From this archived doc,
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/10073.html I tried this
using a dataframe instead of a single number.

But I get this error:

#test
chan <- odbcConnect("MySQL51", uid="root", pwd="momie")  #default
database=fbn
query <- paste("INSERT INTO example VALUES ('",dframe,"')",sep="") 
sqlQuery(chan,query) 
close(chan)

[1] "[RODBC] ERROR: Could not SQLExecDirect"

[2] "S1T00 1136 [MySQL][ODBC 3.51 Driver][mysqld-5.0.21-community-nt]Column
count doesn't match value count at row 1"

>>You might also want to look at the thread "Fast update of a lot of 
>>records in a database?" from around May 20, though it was talking about 
>>updates rather than insertions.

Duncan Murdoch

**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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


[R] sqlSave() and rownames=TRUE makes my Rgui crash

2006-06-09 Thread Lapointe, Pierre
Hello,

I created a table in MySQL with this command

CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk),
 id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30))

### In R, I can connect to this table:

library(DBI)
library(RODBC)
chan <- odbcConnect("MySQL51", uid="root", pwd="xxx") 
first <- sqlQuery(chan, "select * from example")
close(chan)
First
#[1] pk   id   col1 col2
#<0 rows> (or 0-length row.names)

### This is the table I'm trying to save:
dframe <-data.frame(matrix(1:6,2,3))
colnames(dframe)=c("id","col1","col2")
dframe
#  id col1 col2
#1  135
#2  246

### But this makes Rgui crash and close
chan <- odbcConnect("MySQL51", uid="root", pwd="xxx")  
sqlSave(chan, dframe, tablename="example", rownames = FALSE, append=T)
close(chan)

### With rownames = T and safer=F, it works, but I loose the
autoincrementing PK in MySQL
chan <- odbcConnect("MySQL51", uid="root", pwd="momie")  #default
database=fbn
sqlSave(chan, dframe, tablename="example", rownames = T,
addPK=T,append=T,safer=F)
close(chan)

Any idea?

I'm on win2K, MySQL version 5.0.21-community-nt
> version
   _
platform   i386-pc-mingw32  
arch   i386 
os mingw32  
system i386, mingw32
status Patched  
major  2
minor  3.0  
year   2006 
month  05   
day11   
svn rev38024
language   R
version.string Version 2.3.0 Patched (2006-05-11 r38024)

Pierre Lapointe


**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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


[R] Change the language of the labels in a graph

2006-04-24 Thread Lapointe, Pierre
Hello,

How do you change the language of the labels in a graph.  In this example, I
want to get French labels by changing Sys.putenv.  I should get "Mai"
instead of "May".

Sys.putenv(LANGUAGE="fr")
x <- as.Date(c("1jan1960", "2jan1960", "31mar1960", "30jul1960"), "%d%b%Y")
y <-1:4
plot(x,y)


Regards,

Pierre Lapointe


**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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


[R] gsub in data frame

2006-04-05 Thread Lapointe, Pierre
Hello,

I have this data frame:

### begin

d <-data.frame(matrix(c("1","--","bla",2),2,2))
d

# I want to replace the "--" by "\N" and still get a data frame.

# I tried: 

out <-gsub("--","N",as.matrix(d)) #using as.matrix to get rid of factors
out
cat(out)

# But I lost my data frame

### end

Any idea?

Regards,

Pierre Lapointe

**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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


[R] Data assimilation / inverse modeling in R

2006-03-29 Thread Lapointe, Pierre
Hello, 

I'm trying to find out if something has been written in R regarding data
assimilation and inverse modeling.

These searches do not return anything that look like Kalman filter
variations (EK, SEEK, ROEK, etc.)

help.search("assimilation")
help.search("inverse model")

Regards,



**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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


Re: [R] Multi-line paste function

2006-03-14 Thread Lapointe, Pierre
Hello Phillipe

1-You are right that for a simple example as the one I provided, paste and
gsub give the same result.
2-For a more complex case, where let's say, I'd like to include a variable
in my SQL statement, the multi.line.paste command is essential.

variable <-1.9
multi.line.paste("
SELECT * 
FROM estimates3 a, newtable b 
WHERE a.Ticker=b.Ticker 
AND a.Fiscal_Year=b.Fiscal_Year
AND a.EPS<>b.EPS 
AND a.Date_Last_change_or_conf-",variable,">b.Date_Last_change_or_conf
",sep="")

Regards,

Pierre 

**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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


[R] Multi-line paste function

2006-03-14 Thread Lapointe, Pierre
Here's my contribution to R.

When R interacts with external programs (MySQL, cURL, etc.), it often
requires a pasted string that is sent to these programs. For readability
reasons, it is often preferable to have complex commands (SQL for example)
spread on several lines. However, the normal paste function requires to add
additional ' ", ' at the end of each line and another ' " ' at the beginning
of each new line.  It becomes fastidious for long commands.

Multi-line paste function:

multi.line.paste <-function (..., sep = " ", collapse = NULL) 
{
args <- list(...)
if (length(args) == 0) 
if (length(collapse) == 0) 
character(0)
else ""
else {
for (i in seq(along = args)) args[[i]] <-
gsub("\n","",as.character(args[[i]]))
.Internal(paste(args, sep, collapse))
}
}

Example with a SQL command on multiple lines:

multi.line.paste("
SELECT * 
FROM estimates a, newtable b 
WHERE a.Ticker=b.Ticker 
AND a.Fiscal_Year=b.Fiscal_Year 
AND a.EPS<>b.EPS 
AND a.Date_Last_change-1.9>b.Date_Last_change
")

Regards,

Pierre


**
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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


[R] XML Request in R: Pointers/examples needed

2006-01-26 Thread Lapointe, Pierre
Hello R-helpers,

I'm new to XML. I have been using an application for some time, but now I
wish to automate my downloads with R. When I use the web interface of their
XML application, I'm able to read the response in R with the XML package.

My problem now is to send the requests directly from R.  Here below are two
XML request scripts that come from the applicaton help file.  My questions
are:

1-  What type of scripts are those (first one is xml, but I'm
not sure about the second one)
2-  How do I get them to work in R?  I'm a loss with the first
one.  As for the second one, I suspect I would have to use the rcom or
R(D)COM packages but I do not understand what I should do once I have
established the COM object.

(example:   library(rcom)
comCreateObject("MSXML2.XMLHTTP.3.0")

Any pointers/examples would be appreciated.

 Script #1 Logon Request# 


http://product.datastream.com/zappy/dsxml_1_0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://product.datastream.com/zappy/dsxml_1_0
http://product.datastream.com/zappy/dsxml_1_0.xsd";>

myusername
mypassword



 Script #2 Request in HTTP Header




#   

Thank you

Pierre Lapointe


*
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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


[R] Solve for x in Ax=B with vectors, not matrices

2006-01-22 Thread Lapointe, Pierre
Hello R-helpers,

What I have: I am working with vectors not matrice:

#Basic equations
A <-c(-20,-9,-2)
x <-c(0.17,0.22,0.61)
B <- crossprod(A,x)

# R matrix multiplication works with vectors
A%*%x==B# Is true...

Question: If x is unknown and A and B are known, how do I solve for x in R?
solve(A,B) won't work because A is not a square matrix 

solve(A,B)
Error in solve.default(A, B) : 'A' (3 x 1) must be square

I understand that I might have many solutions but note that the sum of x is
1 and all x are positive (x are weightings in % of the total).

Regards,

Pierre Lapointe



*
AVIS DE NON-RESPONSABILITE: Ce document transmis par courrie...{{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


[R] Matrix stability problem

2005-06-14 Thread Lapointe, Pierre
Hello, 

This is not a problem with R, the calculated results are mathematically
correct. This a matrix stability problem. Because of measuring errors, my
matrix solution is a bit off.

Here is what my equations look like:
A11 x11+A12 x12 +A13 x13 = b1  
A21 x21+A22 x21 +A23 x23 = b2  
A31 x31+A32 x31 +A33 x33 = b3 
A is a reading, X is a measured weight, and b is total. The 3 experiments
give slightly different X values because of measurement errors.
For reproducibility, here's my A, x and b matrices and vectors
A <-matrix(
c(0.03,0.02,0.04,0.01,0.015,0.03,-0.01,-0.02,0.03),3,3,byrow=TRUE)
x <-matrix( c(0.2,0.3,0.5,0.205,0.305,0.49,0.19,0.29,0.52),3,3,byrow=TRUE)
b <-matrix( c(0.032,0.021325,0.0079),3,1)
As expected, rowSums(A*x) = b
Problem: Let's now assume I don't know x. I'd like to solve for x in Ax=b. I
am aware that my x is a matrix and solve(A,b) will give me a vector.
However, looking at the x matrix, one can easily see that the real x[,1]
(without measurement error) is close to 0.2, x[,2] is close to 0.3 and x[,3]
is close to 0.5
> x
  [,1]  [,2] [,3]
[1,] 0.200 0.300 0.50
[2,] 0.205 0.305 0.49
[3,] 0.190 0.290 0.52 
However, solve(A,b) gives me a vector that is not close to the expected
solution: > solve(A,b)
  [,1]
[1,] 0.214
[2,] 0.2612857 # Far from 0.2
[3,] 0.5088571
Do you know any function/package in R that could help me get a result closer
to the expected one?

Regards,

Pierre Lapointe


***
 
AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{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


[R] RODBC question: problem importing series with blank cells

2005-06-08 Thread Lapointe, Pierre
Hello, 

I have an excel file that I load through RODBC. Some of my columns are
blank.  They are equity  time series and the stocks did not exist at the
earlier dates.  My problem is that the whole column becomes  even though
there are numbers at later dates.

Here's my excel file 

http://www.tradebit.com/download.php/35699
 

And here's the code I use:

library(RODBC)
chan <- odbcConnectExcel("C:/book54.xls") #load data
ts<- sqlFetch(chan, "Sheet1")
close(chan)
ts<-ts[-1,]

str(ts)
head(ts)
tail(ts)



Regards,

Pierre Lapointe
Assistant Market Strategist
National Bank Financial


***
 
AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{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


[R] Useful tip: Use Google to find R scripts

2005-05-25 Thread Lapointe, Pierre
Hello,

Ever wondered how people use a particular function in their programs?  Use
Google to find actual scripts:

filetype:R boxplot

will return real R scripts using the boxplot function.

Regards,

Pierre Lapointe
Assistant Market Strategist



***
 
AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{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


[R] Plot: Distance between tick and tick label on y-axis

2005-05-25 Thread Lapointe, Pierre
Hello,

I want to reduce the distance between my ticks and their labels.   I managed
to do it for the x-axis, but the y-axis puzzles me.  Here's an example where
there is no space between the x-asix ticks and labels.

par(las=1)
plot(runif(50), type="l",xaxt="n",yaxt="n",ylab="", bty="l")
axis(2)
axis(1,padj=-1.5)

#However, 
axis(2,padj=-1.5) #does not work

I understand from ?axis that padj will take its direction from the par(las).
In this case, padj will move labels up and down for both x-axis and y-axis.
I want my y-axis labels to be horizontal.

I can I reduce the distance between y-axis ticks and labels? 


Regards,

Pierre Lapointe
Assistant Market Strategist



***
 
AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{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


[R] Calling R from R and specifying "wait until script is finished"

2005-05-21 Thread Lapointe, Pierre
Hello,

Let's say I have 50 R scripts to run.  What would be the most efficient way
to run them?

I thought I could do multiple Rterms in a DOS batch file:

Ex:
Rterm <1.R> 1.txt 
Rterm <2.R> 2.txt 
...
Rterm <50.R> 50.txt 

However, I'm afraid they will all open at the same time.   I know I could
pause the batch file with something like: 

PING 1.1.1.1 -n 1 -w 6 >NUL  (to delay 60 seconds)

But that would require that I know how long each of my scripts take.

Is there an easier way?  Something like calling R from R and specifying that
the script has to be finished before continuing.

Thanks

Pierre Lapointe



***
 
AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{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


[R] Arranging Plots

2005-05-19 Thread Lapointe, Pierre
Try this:

layout(matrix(c(1,0,2,0,3,0),2,3,byrow=TRUE))
plot(runif(10),main="P1")
plot(runif(10),main="P2")
plot(runif(10),main="P3")


Regards,

Pierre Lapointe
Assistant Market Strategist
National Bank Financial



***
 
AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{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


RE: [R] Why can't I download "window binary" zip packages

2005-05-18 Thread Lapointe, Pierre
You did not mention your specs, but here's how I do it on my Win2K machine,
behind a firewall, behind a proxy.

1-
If you're behind a proxy, load R through a batch file that loads
internet2.dll.  To do so, open a notepad document.  Write:

PATH C:\Program Files\R\rw2010\bin
START Rgui --internet2

Save your file as "r.cmd" in your C:\Program Files\R\rw2010\bin directory

FYI, internet2.dll makes R access the internet the same way your internet
explorer does.

2-
Here's the code I use to download and extract a zip file from the net. 

download.file("http://www.cftc.gov/files/dea/history/deacot2005.zip";,
"c:/tmp/monthly/deacot2005.zip", 
"internal", quiet = FALSE, mode = "wb",cacheOK = TRUE)
unzipped<-zip.file.extract("c:/tmp/monthly/annual.txt", zipname =
"deacot2005.zip")


Regards,

Pierre Lapointe
Assistant Market Strategist
National Bank Financial



***
 
AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{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


[R] Bry & Boschan routines in R

2005-05-18 Thread Lapointe, Pierre
Hello,

Does anyone of you know if someone has programmed the Bry & Boschan routines
in R?  It's also known as the NBER method for identifying economic cycles
peaks and troughs. Or do you know any method in R for indentifying peaks and
troughs for times series. I tried turnpoints(), but I get too many
turnpoints...

It's a long shot, but I had to ask before programming it myself.

Regards,

Pierre Lapointe
Assistant Market Strategist



***
 
AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{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


[R] Turnpoints (pastecs): How to specify a limit on the number of tur npoints?

2005-05-16 Thread Lapointe, Pierre
Hello,

I'm trying to get a few turnpoints for a financial time series.  There is a
function in pastecs that does that.  However, I get a large number of
turnpoints:

library(pastecs)
data(EuStockMarkets)
dax <-EuStockMarkets[,1]
plot(dax)
turnp <-turnpoints(dax)  
summary(turnp) #gives 925 peaks/pits!!!

How can specify to get only 30 turnpoints?

Second question: the extract function 

extract(turnp,30)

gives me this: 

> extract(turnp,30)
 [1]  0  0 -1  1  0 -1  0  1 -1  0  1  0  0 -1  0  0  1  0  0 -1  0  0  0  1
-1
[26]  1 -1  1 -1  1
Warning message:
arguments after the first two are ignored in: UseMethod("extract", e, n,
...) 
>

Any odea what caused this error?

I'm on win2k,

> version
 _  
platform i386-pc-mingw32
arch i386   
os   mingw32
system   i386, mingw32  
status   Patched
major2  
minor1.0
year 2005   
month05 
day  09 
language R  
>



Regards,

Pierre Lapointe
Assistant Market Strategist



***
 
AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{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


[R] Centered overall title with layout()

2005-05-15 Thread Lapointe, Pierre
Hello,

I would like to have a centered overall title for a graphics page using the
layout() function.

Example, using this function:

z <- layout(matrix(c(1:6), 3,2, byrow = TRUE))
layout.show(6)

I'd like to get this:


  Centered Overall Title

|   |   |
|   |   |
|   |   |
|   |   |
|   |   |

|   |   |
|   |   |
|   |   |
|   |   |
|   |   |

|   |   |
|   |   |
|   |   |
|   |   |
|   |   |


I really want to use layout(), not par(mfrow())

Thanks


Pierre Lapointe



***
 
AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{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


[R] Lowest data level since DateX

2005-05-13 Thread Lapointe, Pierre
Hello,

I'm dealing with financial time series.  I'm trying to find out X in this
sentence:
The most recent close is the lowest level since X(date).

Here's an example of what I'm looking for:

library(fBasics)
data(DowJones30)
tail(DowJones30[,1:5],n=10)

I need to come up with a vector that would look like this

AA AXP  T...
2000-12-21 2000-12-20   2000-12-29

i.e. the last date at which the stocks were trading at a lower level than
the most recent closing.

I know it has to do with min/max, pmin/pmax, cummin/cummax or rev(), but I
can't figure it out.

Any help?



Regards,

Pierre Lapointe
Assistant Market Strategist



***
 
AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{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


[R] Batch mode problem: figure margins too large (code corrected for word wrap)

2005-05-12 Thread Lapointe, Pierre
First of all, I apologize for the triple post, but I did not see that the
word wrap on the r-help list site would render my code unusable. So here it
is again.  Hoping that this time it will work if you cut and paste it in
your Rgui.

I have a program that works well in Rgui but that does not work in a batch
file (Execution halted).

Here's the code (it will work on your R, but you need internet access
through R as it will download a table from a US gov site).

#Code Start
download.file("http://www.cftc.gov/files/dea/history/deacot2005.zip";,
"c:/deacot2005.zip", "internal", quiet = FALSE, mode = "wb",cacheOK = TRUE)
unzipped<-zip.file.extract("c:/annual.txt", zipname = "deacot2005.zip")
#Unzip
data <-read.table(unzipped, header=TRUE, sep=',')
windows(height=11,width=8.5)
z <- layout(matrix(c(1:8), 4,2, byrow = TRUE))
for (i in 1:8) {  #loop to fill layout
tbonds<-data[data$'Market.and.Exchange.Names'==
"U.S. TREASURY BONDS - CHICAGO BOARD OF TRADE ",] #choose only T-Bonds
ordered<-tbonds[order(tbonds[,3]),]#order by date
longb<-ordered[,c(3,9)]
longb[,1]<-as.Date(longb[,1],format="%Y%m%d") #to transform to date format
par(mar=c(2.5, 3.5, 2, 4.5)) #need this par for mtext
plot(longb,type="l",las=1,xlab="",ylab="",bty="l",cex.axis=0.9)
end<-(longb)[nrow(ordered),]  #mtext text
end0<-(longb)[nrow(ordered)-1,]   #mtext text
now<- paste(' Last:',end[,2],"\n",'Prev:',end0[,2])#mtext text
mtext(now,side=4, las=2,adj=0,padj=0.5,cex=0.5) #mtext text
}
dev.print(pdf, file="c:/CFTC.pdf",height=10,width=8,paper="letter")
#Code end

As you can see, I need a special par(mar) to make room for the margin text
(mtext).

When I run this program through a batch file I get this message :

...
+ longb<-ordered[,c(3,9)]
+ longb[,1]<-as.Date(longb[,1],format="%Y%m%d") #to transform to date format
+ par(mar=c(2.5, 3.5, 2, 4.5)) #need this par for mtext
+ plot(longb,type="l",las=1,xlab="",ylab="",bty="l",cex.axis=0.9)
+ end<-(longb)[nrow(ordered),]  #mtext text
+ end0<-(longb)[nrow(ordered)-1,]   #mtext text
+ now<- paste(' Last:',end[,2],"\n",'Prev:',end0[,2])#mtext text
+ mtext(now,side=4, las=2,adj=0,padj=0.5,cex=0.5) #mtext text
+ }
Error in plot.new() : figure margins too large
Execution halted

I tried to remove the windows(height=11,width=8.5) as I don't need it in
batch mode, but it prevented the PDF creation as it  " can only print from
screen device".

dev.print(pdf, file="c:/CFTC.pdf",height=10,width=8,paper="letter")
Error in dev.print(pdf, file = "c:/CFTC.pdf", height = 10, width = 8,  : 
can only print from screen device
Execution halted

Here's what I have in my windows batch file

Set TZ=GMT
PATH C:\Program Files\R\rw2010\bin
Rterm --internet2 --no-restore --no-save  result.txt 2>&1

I'm on win2k,

> version
 _  
platform i386-pc-mingw32
arch i386   
os   mingw32
system   i386, mingw32  
status   Patched
major2  
minor1.0
year 2005   
month05 
day  09 
language R

Be nice with me.  I've been a R user for only 2 weeks.

Regards,

Pierre Lapointe
Assistant Market Strategist
National Bank Financial




***
 
AVIS DE NON-RESPONSABILITE: 
Ce document transmis par courrier electronique est destine uniquement a la 
personne ou a l'entite a qui il est adresse et peut contenir des 
renseignements confidentiels et assujettis au secret professionnel. La 
confidentialite et le secret professionnel demeurent malgre l'envoi de ce 
document a la mauvaise adresse electronique. Si vous n'etes pas le 
destinataire vise ou la personne chargee de remettre ce document a son 
destinataire, veuillez nous en informer sans delai et detruire ce document 
ainsi que toute copie qui en aurait ete faite.Toute distribution, reproduction 
ou autre utilisation de ce document est 
strictement interdite. De plus, le Groupe Financiere Banque Nationale et ses 
filiales ne peuvent pas etre tenus responsables des dommages pouvant etre 
causes par des virus ou des erreurs de transmission. 

DISCLAIMER:\ This documentation transmitted by electronic ma...{{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


[R] RE: Batch mode problem: figure margins too large (aligned R code to the left)

2005-05-12 Thread Lapointe, Pierre
> Hello, I have a program that works well in Rgui but that does not work in
> a batch file (Execution halted)
> 
> Here's the code (it will work on you side, but you need internet access
> through R as it will download a table from a US gov site)
> 
> download.file("http://www.cftc.gov/files/dea/history/deacot2005.zip";,
> "c:/deacot2005.zip",
> "internal", quiet = FALSE, mode = "wb",cacheOK = TRUE)
> unzipped<-zip.file.extract("c:/annual.txt", zipname = "deacot2005.zip")
> #Unzip
> data <-read.table(unzipped, header=TRUE, sep=',')
> #windows(height=11,width=8.5)
> z <- layout(matrix(c(1:8), 4,2, byrow = TRUE))
> for (i in 1:8) {  #loop to fill layout
> tbonds<-data[data$'Market.and.Exchange.Names'=="U.S. TREASURY BONDS -
> CHICAGO BOARD OF TRADE ",] #choose only T-Bonds
> ordered<-tbonds[order(tbonds[,3]),]#order by date
> longb<-ordered[,c(3,9)]
> longb[,1]<-as.Date(longb[,1],format="%Y%m%d") #to transform to date format
> par(mar=c(2.5, 3.5, 2, 4.5)) #need this par for mtext
> plot(longb,type="l",las=1,xlab="",ylab="",bty="l",cex.axis=0.9)
> end<-(longb)[nrow(ordered),]  #mtext text
> end0<-(longb)[nrow(ordered)-1,]   #mtext text
> now<- paste(' Last:',end[,2],"\n",'Prev:',end0[,2])#mtext text
> mtext(now,side=4, las=2,adj=0,padj=0.5,cex=0.5) #mtext text
> }
> dev.print(pdf, file="c:/CFTC.pdf",height=10,width=8,paper="letter")
> 
> As you can see, I need a special par(mar) to make room for the margin text
> (mtext)
> 
> When I run this program through a batch file I get this message :
> 
> ...
> > unzipped<-zip.file.extract("c:/annual.txt", zipname = "deacot2005.zip")
> #Unzip
> > data <-read.table(unzipped, header=TRUE, sep=',')
> > 
> > windows(height=11,width=8.5)
> > z <- layout(matrix(c(1:8), 4,2, byrow = TRUE))
> > 
> > for (i in 1:8) {  #loop to fill layout
> + 
> + tbonds<-data[data$'Market.and.Exchange.Names'=="U.S. TREASURY BONDS -
> CHICAGO BOARD OF TRADE ",] #choose only T-Bonds
> + ordered<-tbonds[order(tbonds[,3]),]#order by date
> + longb<-ordered[,c(3,9)]
> + longb[,1]<-as.Date(longb[,1],format="%Y%m%d") #to transform to date
> format
> + par(mar=c(2.5, 3.5, 2, 4.5)) #need this par for mtext
> + plot(longb,type="l",las=1,xlab="",ylab="",bty="l",cex.axis=0.9)
> + end<-(longb)[nrow(ordered),]  #mtext text
> + end0<-(longb)[nrow(ordered)-1,]   #mtext text
> + now<- paste(' Last:',end[,2],"\n",'Prev:',end0[,2])#mtext text
> + mtext(now,side=4, las=2,adj=0,padj=0.5,cex=0.5) #mtext text
> + }
> Error in plot.new() : figure margins too large
> Execution halted
> 
> I tried to remove the windows(height=11,width=8.5) as I don't need it in
> batch mode, but it prevented the PDF creation as it  " can only print from
> screen device".
> 
> dev.print(pdf, file="c:/CFTC.pdf",height=10,width=8,paper="letter")
> Error in dev.print(pdf, file = "c:/CFTC.pdf", height = 10, width = 8,  : 
>   can only print from screen device
> Execution halted
> 
> Here's what I have in my windows batch file
> 
> Set TZ=GMT
> PATH C:\Program Files\R\rw2010\bin
> Rterm --internet2 --no-restore --no-save  result.txt 2>&1
> 
> I'm on win2k,
> 
> > version
>  _  
> platform i386-pc-mingw32
> arch i386   
> os   mingw32
> system   i386, mingw32  
> status   Patched
> major2  
> minor1.0
> year 2005   
> month05 
> day  09 
> language R
> 
> Be nice with me.  I've been a R user for only 2 weeks.
> 
> Regards,
> 
> Pierre Lapointe
> Assistant Market Strategist
> National Bank Financial
> 1155 Metcalfe Street, 5th Floor
> Montreal (Qc)
> H3B 4S9
> (514) 879-2378
> 


***
 
AVIS DE NON-RESPONSABILITE: 
Ce document transmis par courrier electronique est destine uniquement a la 
personne ou a l'entite a qui il est adresse et peut contenir des 
renseignements confidentiels et assujettis au secret professionnel. La 
confidentialite et le secret professionnel demeurent malgre l'envoi de ce 
document a la mauvaise adresse electronique. Si vous n'etes pas le 
destinataire vise ou la personne chargee de remettre ce document a son 
destinataire, veuillez nous en informer sans delai et detruire ce document 
ainsi que toute copie qui en aurait ete faite.Toute distribution, reproduction 
ou autre utilisation de ce document est 
strictement interdite. De plus, le Groupe Financiere Banque Nationale et ses 
filiales ne peuvent pas etre tenus responsables des dommages pouvant etre 
causes par des virus ou des erreurs de transmission. 

DISCLAIMER:\ This documentation transmitted by electronic ma...{{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


[R] Batch mode problem: figure margins too large

2005-05-12 Thread Lapointe, Pierre
Hello, I have a program that works well in Rgui but that does not work in a
batch file (Execution halted)

Here's the code (it will work on you side, but you need internet access
through R as it will download a table from a US gov site)


download.file("http://www.cftc.gov/files/dea/history/deacot2005.zip";,
"c:/deacot2005.zip",
"internal", quiet = FALSE, mode = "wb",cacheOK = TRUE)
unzipped<-zip.file.extract("c:/annual.txt", zipname =
"deacot2005.zip")  #Unzip
data <-read.table(unzipped, header=TRUE, sep=',')
#windows(height=11,width=8.5)
z <- layout(matrix(c(1:8), 4,2, byrow = TRUE))
for (i in 1:8) {  #loop to fill layout
tbonds<-data[data$'Market.and.Exchange.Names'=="U.S.
TREASURY BONDS - CHICAGO BOARD OF TRADE ",] #choose only T-Bonds
ordered<-tbonds[order(tbonds[,3]),]#order by date
longb<-ordered[,c(3,9)]
longb[,1]<-as.Date(longb[,1],format="%Y%m%d") #to transform
to date format
par(mar=c(2.5, 3.5, 2, 4.5)) #need this par for mtext

plot(longb,type="l",las=1,xlab="",ylab="",bty="l",cex.axis=0.9)
end<-(longb)[nrow(ordered),]  #mtext text
end0<-(longb)[nrow(ordered)-1,]   #mtext text
now<- paste(' Last:',end[,2],"\n",'Prev:',end0[,2])
#mtext text
mtext(now,side=4, las=2,adj=0,padj=0.5,cex=0.5) #mtext text
}
dev.print(pdf,
file="c:/CFTC.pdf",height=10,width=8,paper="letter")

As you can see, I need a special par(mar) to make room for the margin text
(mtext)

When I run this program through a batch file I get this message :

...
> unzipped<-zip.file.extract("c:/annual.txt", zipname =
"deacot2005.zip")  #Unzip
> data <-read.table(unzipped, header=TRUE, sep=',')
> 
> windows(height=11,width=8.5)
> z <- layout(matrix(c(1:8), 4,2, byrow = TRUE))
> 
> for (i in 1:8) {  #loop to fill layout
+ 
+ tbonds<-data[data$'Market.and.Exchange.Names'=="U.S.
TREASURY BONDS - CHICAGO BOARD OF TRADE ",] #choose only T-Bonds
+ ordered<-tbonds[order(tbonds[,3]),]#order by date
+ longb<-ordered[,c(3,9)]
+ longb[,1]<-as.Date(longb[,1],format="%Y%m%d") #to
transform to date format
+ par(mar=c(2.5, 3.5, 2, 4.5)) #need this par for mtext
+
plot(longb,type="l",las=1,xlab="",ylab="",bty="l",cex.axis=0.9)
+ end<-(longb)[nrow(ordered),]  #mtext text
+ end0<-(longb)[nrow(ordered)-1,]   #mtext text
+ now<- paste(' Last:',end[,2],"\n",'Prev:',end0[,2])
#mtext text
+ mtext(now,side=4, las=2,adj=0,padj=0.5,cex=0.5) #mtext
text
+ }
Error in plot.new() : figure margins too large
Execution halted

I tried to remove the windows(height=11,width=8.5) as I don't need it in
batch mode, but it prevented the PDF creation as it  " can only print from
screen device".

dev.print(pdf,
file="c:/CFTC.pdf",height=10,width=8,paper="letter")
Error in dev.print(pdf, file = "c:/CFTC.pdf", height = 10,
width = 8,  : 
can only print from screen device
Execution halted

Here's what I have in my windows batch file

Set TZ=GMT
PATH C:\Program Files\R\rw2010\bin
Rterm --internet2 --no-restore --no-save 
result.txt 2>&1

I'm on win2k,

> version
 _  
platform i386-pc-mingw32
arch i386   
os   mingw32
system   i386, mingw32  
status   Patched
major2  
minor1.0
year 2005   
month05 
day  09 
language R

Be nice with me.  I've been a R user for only 2 weeks.

Regards,

Pierre Lapointe
Assistant Market Strategist
National Bank Financial
1155 Metcalfe Street, 5th Floor
Montreal (Qc)
H3B 4S9
(514) 879-2378



***
 
AVIS DE NON-RESPONSABILITE: 
Ce document transmis par courrier electronique est destine uniquement a la 
personne ou a l'entite a qui il est adresse et peut contenir des 
renseignements confidentiels et assujettis au secret professionnel. La 
confidentialite et le secret professionnel demeurent malgre l'envoi de ce 
document a la mauvaise adresse electronique. Si vous n'etes pas le 
destinataire vise ou la personne chargee de remettre ce document a son 
destinataire, veuillez nous en informer sans delai et detruire ce document 
ainsi que toute copie qui en aurait ete faite.Toute distribution, reproduction 
ou autre utilisation de ce document est 
strictement interdite. De plus, le Groupe Financiere Banque Nationale

[R] Does R have a command for sending emails?

2005-05-10 Thread Lapointe, Pierre
This is excellent. It works great even though I'm on Win2k and behind a
firewall.

I just have one question though, I don't use a function because I sometimes
need to add people to my distribtion list. In R, my system(paste()) string
is very long and when I try put an  so it fits in my Rgui screen, the
function does not work properly.  Everything that is after the  is
not considered by blat.

I don't know if I am being clear.  To clarify, here's my actual code: 

system(paste('
blat c:/tmp/monthly/deacot2005.zip -to [EMAIL PROTECTED] -f
[EMAIL PROTECTED]  -s "My title is long long long long.   Very long." -server
smtp.host.com -base64'))

In R, if everything beginning with blat is not on the same line, the command
does not work properly and everthing on the second line is not considered
even thought he paste command ends with a ")"

Thanks

If you're still trying to figure out how to e-mail with R, here's what I did
in details.

1- Download blat from
http://sourceforge.net/project/showfiles.php?group_id=81910
 
2- unzip blat.exe in your base directory (the one with Rgui.exe in it).  I
put it in my C:\Program Files\R\rw2010\bin directory.  You do not need the
other files in the zip file.
3- if you don't know your smtp, use this
http://www.dirfile.com/smtp_diagnostic_tool.htm
  .  Put in your e-mail
address and leave blank the SMTP.  Press start.
4- In R, 
Write this code and change what you want
system(paste('
blat c:/tmp/monthly/deacot2005.zip -to [EMAIL PROTECTED] -f
[EMAIL PROTECTED]  -s "My title is long long long long.   Very long." -server
smtp.host.com -base64')) #everything beginning with "blat" has to be on the
same line
5- read the example.txt in the blast zip file for examples of how to modify
the blat request
6- note:  the "-base64" statement is there to specify that the attached file
is binary



***
 
AVIS DE NON-RESPONSABILITE: 
Ce document transmis par courrier electronique est destine uniquement a la 
personne ou a l'entite a qui il est adresse et peut contenir des 
renseignements confidentiels et assujettis au secret professionnel. La 
confidentialite et le secret professionnel demeurent malgre l'envoi de ce 
document a la mauvaise adresse electronique. Si vous n'etes pas le 
destinataire vise ou la personne chargee de remettre ce document a son 
destinataire, veuillez nous en informer sans delai et detruire ce document 
ainsi que toute copie qui en aurait ete faite.Toute distribution, reproduction 
ou autre utilisation de ce document est 
strictement interdite. De plus, le Groupe Financiere Banque Nationale et ses 
filiales ne peuvent pas etre tenus responsables des dommages pouvant etre 
causes par des virus ou des erreurs de transmission. 

DISCLAIMER:\ This documentation transmitted by electronic ma...{{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