Displaying 2 results from an estimated 2 matches for "files_rwl".
Did you mean:
file_srl
2008 Jun 27
2
NA value
...1996 1.15 0.92 1.50 0.97 0.60 NA
1997 NA NA NA NA NA NA
1998 NA NA NA NA NA NA
1999 NA NA NA NA NA NA
2000 NA NA NA NA NA NA
> files_rwl <- ls(pattern="_rwl$")
> files_rwl
[1] "cimfasy_rwl" "rocquce_rwl"
> for (i in files_rwl) assign(i,i[is.na(i)] <- 0)
> ls()
[1] "cimfasy_rwl" "files_rwl" "files.rwl" "i" "rocquce_rwl"
>
&...
2008 Jun 25
1
a loop....
...NA NA NA NA NA NA
1999 NA NA NA NA NA NA
2000 NA NA NA NA NA NA
>
OK.... the loop work...
Now I want to replace the NA with 0 in the data.frame (cimfasy_rwl,
rocquce_rwl, ecc...)
> files_rwl <- ls(pattern="_rwl$")
> files_rwl
[1] "cimfasy_rwl" "rocquce_rwl"
> for (i in files_rwl) assign(gsub("\\_rwl$", "", i), i[is.na(i) ] <- 0)
> ls()
[1] "cimfasy" "cimfasy_rwl" "files_rwl" "files...