提取特定的字符串
我已经从各种床单中加载了R中的数据,在下面您可以看到床单的名称。您可以在下面看到数据和代码:
df<-data.frame(
Tables=c("Export_A1.xlsx","Export_A2.xlsx","Export_A10.xlsx"))
所以现在我想提取特定名称,换句话说,我想删除文本“ export_”和“ .xlsx”。下面您可以看到一个示例
那么有人可以帮助我如何解决这个问题吗?
I have already loaded the data in R from various sheets, below you can see the names of the sheets. Below you can see the data and code:
df<-data.frame(
Tables=c("Export_A1.xlsx","Export_A2.xlsx","Export_A10.xlsx"))
So now I want to extract specific names, or in other words, I want to remove the text "Export_" and ".xlsx". Below you can see an example
So can anybody help me how to solve this problem ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用以下代码:
输出:
You can use the following code:
Output: