how to make 2 separate substrings from strsplit in R

0 votes
When it comes to accessing the elements in a list or dataframe, the difference between bracket [] and double bracket [[]] is significant (11 answers)
1 year ago, this business was closed.
I'm having trouble dividing a string using strsplit in R to create two independent strings. I realise this is probably a basic request, but I'm having trouble finding an answer.

I have an x string that looks like this:

"1.23e+05,1.3e+05"
I attempted to separate it using the following code:

str split - strsplit(x,split=',', fixed=TRUE) appears to create a list of length 1 with the following characters: "1.23e+05" "1.3e+05"

However, when I use str split[1] to subset this, it just returns the entire thing.

What is the simplest way to extract two substrings from this data?
Jun 13 in Data Science by Avinash
• 1,260 points
12 views

No answer to this question. Be the first to respond.

Your answer

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

Related Questions In Data Science

0 votes
1 answer

How to make loop for one-at-a time logistic regression in R?

You're probably looking for something similar to ...READ MORE

answered Jun 20 in Data Science by Sohail
• 2,960 points
58 views
0 votes
0 answers

How to read a csv-file from an url in R?

I'm not very experienced with R, so ...READ MORE

Jul 22 in Data Science by avinash
• 1,840 points
21 views
0 votes
1 answer

How To Create Vector of Vector In R

Create a list: List() on x returns x[[1]] ...READ MORE

answered Jun 24 in Data Science by Sohail
• 2,960 points
22 views
0 votes
1 answer

How to overlay density plots in R?

The second one has 104 usage lines: plot(density(MyData$Column1)) ...READ MORE

answered Jun 24 in Data Science by Sohail
• 2,960 points
31 views
0 votes
1 answer

How to implement Knn-algorithm without using k-nn function in r?

I created an example that demonstrates the ...READ MORE

answered Jun 24 in Data Science by Sohail
• 2,960 points
14 views
0 votes
0 answers

In R, how to get an object's name after it is sent to a function?

I'm trying to find the opposite of ...READ MORE

Jul 5 in Data Science by avinash
• 1,840 points
8 views
0 votes
1 answer

Big Data transformations with R

Dear Koushik, Hope you are doing great. You can ...READ MORE

answered Dec 18, 2017 in Data Analytics by Sudhir
• 1,610 points
437 views
0 votes
2 answers

Transforming a key/value string into distinct rows in R

We would start off by loading the ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
482 views
0 votes
1 answer

Finding frequency of observations in R

You can use the "dplyr" package to ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
4,352 views
0 votes
1 answer

Left Join and Right Join using "dplyr"

The below is the code to perform ...READ MORE

answered Mar 27, 2018 in Data Analytics by Bharani
• 4,660 points
504 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP