Dear R-help members, I'm quite new to R and I apologize for my basic question, but I haven't been able to find a solution yet.
I try to interpret vector entries as a binary code, but unfortunately every first digit which is zero disappears. So how can I set any number (e.g. x = 10110) to a 8-digit zero fill-up (x = 00010110) in order to address digit indices? Or other way round, how can I make the 'substr' function to count from the right hand side? Thank you. With kind regards, Jonas Jägermeyr Department of Geography Humboldt-University of Berlin jonas.jaegerm...@geo.hu-berlin.de ______________________________________________ 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.