Hi all
 I am trying t extract  a variable from a column

      ASk/20005-01-45/90

     Alldatk/25-17-4567/990

I want to assign  a variable to the numbers coming the first"-"

x=01 for the first and
x=17  for teh second

I tried using gsub but did not work

x=gsub("-")

any help?

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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