How to split strings in R?

0 votes
Hi. I am trying to split an email ID string. I want only to get the username out of the whole string. How can I do that?
Mar 29 in Data Analytics by Tyrion anex
• 8,280 points
11 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You can use the  strsplit method to do this. I have shown an example below:

> email <- "abc@gmail.com"
> strsplit (email, "@") 
answered Mar 29 by Sophie may
• 9,050 points

Related Questions In Data Analytics

0 votes
1 answer

How to change y axis max in time series using R?

The axis limits are being set using ...READ MORE

answered Apr 3, 2018 in Data Analytics by darklord
• 6,140 points
41 views
0 votes
2 answers

In data frame how to spilt strings into values?

You can do this using dplyr and ...READ MORE

answered Dec 4, 2018 in Data Analytics by Kalgi
• 35,720 points
21 views
0 votes
1 answer
0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,700 points
60 views
0 votes
1 answer

Error saying "vector size cannot be NA" when using R with data mining

You can use the removesparseterm function.  Removes sparse ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,000 points
185 views
+1 vote
2 answers
0 votes
1 answer

Trying to find frequent itemsets of a data set using arules package

Try replacing ID <- c("A123","A123","A123","A123","B456","B456","B456") item <- c("bread", "butter", "milk", ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,000 points
16 views
0 votes
1 answer

Error saying "Error in df$item : object of type 'closure' is not subsettable" when trying to use arules package

Try replacing ID <- c("A123","A123","A123","A123","B456","B456","B456") item <- c("bread", "butter", ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,000 points
51 views
0 votes
1 answer

How to convert JSON into CSV in R programming?

Use the jsonlite::fromJSON to read the data into ...READ MORE

answered Jan 24 in Data Analytics by Sophie may
• 9,050 points
62 views
0 votes
1 answer

How to remove HTML tags from string in R Programming?

Try this simple code to remove the <br ...READ MORE

answered Feb 1 in Data Analytics by Sophie may
• 9,050 points
54 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.