Dear all,

regmatches works.

And, since this has been asked here before:

SignifStellen<-function(x){
    strx=as.character(x)
    nchar(regmatches(strx, regexpr("[1-9][0-9]*\\.[0-9]*[1-9]",strx)))-1
}

returns the significant figures of a number. Perhaps this can help someone.

Thanks & best regards
H. van Lishaut

______________________________________________
R-help@r-project.org 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.

Reply via email to