The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

"Struggling importing CSV from R Studio to Rapidminer"

matteomartignonmatteomartignon Member Posts: 3 Contributor I
edited June 2019 in Help

Hello guys,

I have a lot of problems importing my CSV from R Studio into Rapidminer.

The firt 50 rows are completly gone..

 

Here the comand in R Studio I used to save my dataframe:

write.table(musei, file = "musei_18_F.csv", quote = TRUE, sep = ",", row.names = FALSE)

 

//SCREENSHOTS

Schermata 2017-07-26 alle 11.26.59.pngMy CSV from R StudioSchermata 2017-07-26 alle 11.26.43.pngThe same CSV imported in Rapidminer

Tagged:

Answers

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

    You have 31 warnings when importing the CSV file, look at the lower right of the 2nd image. Click on that and see what it says.

  • matteomartignonmatteomartignon Member Posts: 3 Contributor I

    Got it

    Is there a way to fix this problem in R?

    Thanks on advanceSchermata 2017-07-26 alle 12.23.36.pngWarnings

  • Telcontar120Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn

    In the last screenshot it looks like your separator might be a ";" instead of a "," which isn't what you are telling RapidMiner, which would definitely cause problems.  If you post a sample data file in addition to the screenshots it would be easier to troubleshoot.

     

    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
  • matteomartignonmatteomartignon Member Posts: 3 Contributor I

    Sure, this is my CSV.

    It is a data frame I extracted with RFacebook. The function was "search.pages".

    Thanks in advance,

    matteo

  • Telcontar120Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn

    Looking at the raw csv it is evident that there are many line break characters in some of the records and that is what is causing the parsing problem with the import of certain records in RapidMiner.  It's theoretically possible to clean this up in RapidMiner but it is probably easier to do it in R or Python using some scripting to remove the extra characters before importing.

     

    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
  • SGolbertSGolbert RapidMiner Certified Analyst, Member Posts: 344 Unicorn

    I've also seen your CSV. As far as I can tell, there is a problem writing the CSV. The problem is entirely in the R part, so there is no much help to give from our part.

     

    I can suggest to save the CSV and then read it again from R with read.table() or similar. When you manage to correctly retrieve the file, it will be ready to be read by RapidMiner.

     

    Or you can put the code that generates the dataset inside the R scripting operator in RapidMiner, then you won't need to save a CSV file.

Sign In or Register to comment.