<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><span>Olá pessoal,</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>Digamos que eu tenha uma lista com os nomes de vários arquivos:</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="background-color: transparent;">i <- c("./maize-yield.csv", "./rice-yield.csv",
 "./soybean-yield.csv", "./sugarcane-yield.csv", "./wheat-yield.csv")<br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><span style="font-size: 12pt;">e eu precise extrair os caracteres após a barra ("/") e antes do hífen ("-") , ou seja, o nome das culturas.</span><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><span style="font-size: 12pt;"><br></span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><span style="font-size:
 12pt;">Qual comando ou combinação de comandos eu devo usar para chegar ao seguinte resultado?</span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><span style="font-size: 12pt;"><br></span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><span style="font-size: 12pt;">> ii</span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; font-style: normal;"><span style="font-size: 12pt;">[1] "maize" "rice" "soybean" "sugarcane" "wheat"</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size:
 12pt;">Agradece desde já,<br>--<br>Thiago V. dos Santos<br>PhD student<br>Land and Atmospheric Science<br>University of Minnesota<br>http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm<br>Phone: (612) 323 9898</div></div></body></html>