ot;)
df <- read.dbf(dbf)
dbfname<-basename(dbf)
name<-file_path_sans_ext(dbfname) # get the name of the file like
agra_ward
write.csv( df, file = paste0("csvpath",name,"csv"))
print(path)
}
--
Thanks & Regards,
Shubhasmita Sahani
[[altern
t;)
>
> Following the comments above would lead to code such as
>
> de <- data.frame(d,e,stringsAsFactors=FALSE)
> de$f <- de$d
> de$f[ de$d %in% c("-","dnr","post") ] <- 0
>
> HTH,
> Eric
>
>
>
>
>
>
> On Wed,
)
de<- as.data.frame(cbind(d,e))
de$f<-ifelse (de$d=="-"|de$d=="dnr"|de$d=="post",0,de$d)
head(de)
d e f
1 1 2 2
2 2 2 4
3 3 3 5
4 - 4 0
5 dnr 5 0
6 post 6 0
why the values are changing in with if else condition
--
Thanks & R
3 matches
Mail list logo