[R] paste and path ?

Troels Ring
Sun, 27 Jun 1999 18:56:51 -0000

Dear friends. I have trobpe with path.
Below I have tried to paste a path and file name but it will not work

> path <- "D:/rw0641/own/own/procedures/GFR_TIME"
> path
[1] "D:/rw0641/own/own/procedures/GFR_TIME"
> path1 <- paste(path,"gfr.txt",sep="/")
> path1
[1] "D:/rw0641/own/own/procedures/GFR_TIME/gfr.txt"
-- this is good enough
> data <-
read.table("D:/rw0641/own/own/procedures/GFR_TIME/grf.txt",h=T)
> dat1 <- read.table(path1,h=T)
Error: "scan" can't open file
but doesn't work
> path1
[1] "D:/rw0641/own/own/procedures/GFR_TIME/gfr.txt" although the path
is OK
- the unpasted variant is of course ok. What happened ?

> data
  day month year crea
1  12     3   94  140
2  25     9   95  144
3   3     7   96  167
4   5    12   96  174
5  12     3   97  187
6  14     6   97  188
7  23     9   97  201

Troels Ring, MD
Department of Nephrology
Aalborg Hospital
Aalborg Denmark