I want to convert the input data available as C4.5 file format into a R data frame.

The data set can be downloaded from the following link https://archive.ics.uci.edu/ml/machine-learning-databases/communities/

and is avaialble as .NAMES and .DATA files.

My approach was to convert it to a csv file using WEKA and then import the csv file into R. Could not do it as WEKA detected a error while parsing the C4.5 file.

Can some one point me in the right direction.



1 Answer 1

URL <- 'https://archive.ics.uci.edu/ml/machine-learning-databases/communities/communities.data'
data <- read.table(URL, sep = ',',  na.strings = '?')
  • 1
    $\begingroup$ Thanks, I managed to import the dat. to R. For getting the factor names, i downloaded the .NAME file and separated the factor names into a column in cvs and then read the cvs file to get the factor names as a vector.. $\endgroup$
    – Vijay
    Aug 9, 2017 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.