Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6219411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:46:34+00:00 2026-05-24T07:46:34+00:00

I have been using WEKA to do some text classification work and I want

  • 0

I have been using WEKA to do some text classification work and I want to try
out R.

The problem is I cannot load the String to Vector ARFF files created by
WEKA’s string parser into Rattle .

Looking at the logs I get something like:

/Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,

: scan() expected 'a real', got '2281}'/

My ARFF data file looks a bit like this:

@relation 'reviewData'

@attribute polarity {0,2}
.....
@attribute $$ numeric
@attribute we numeric
@attribute wer numeric
@attribute win numeric
@attribute work numeric

@data
{0 2,63 1,71 1,100 1,112 1,140 1,186 1,228 1}
{14 1,40 1,48 1,52 1,61 1,146 1}
{2 1,41 1,43 1,57 1,71 1,79 1,106 1,108 1,133 1,146 1,149 1,158 1,201 1}
{0 2,6 1,25 1,29 1,42 1,49 1,69 1,82 1,108 1,116 1,138 1,140 1,155 1}
..../

Any ideas how I can convert this into an R readable format?

Cheers!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:46:34+00:00Added an answer on May 24, 2026 at 7:46 am

    When you save the result of the StringToWordVector attribute filter, it will be saved as a sparse ARFF file.

    You need to check if Rattle supports reading this format. If not, you can apply the SparseToNonSparse instance filter, which will convert it to a dense matrix format (file size will be much larger).

    Example: if the sparse data looks like:

    sparse.arff

    @relation name
    @attribute word1 numeric
    @attribute word2 numeric
    ..
    @attribute word10 numeric
    @data
    {0 1,3 3,8 1,9 1}
    {2 2,5 1,8 1,9 1}
    

    it will be converted to:

    nonsparse.arff

    @relation name
    @attribute word1 numeric
    @attribute word2 numeric
    ..
    @attribute word10 numeric
    @data
    1,0,0,3,0,0,0,0,1,1
    0,0,2,0,0,1,0,0,1,1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using Tperlregex for some time. but today when I try to
I have been using json.NET successfully in projects for some time now without any
I have been using TabActivity and I want the tab to display on every
I have been using Bart Duncan's classic article to find out what indexes I
I have been using return by reference to try to speed up my code
I have been using the fantastic jQuery library for quite some time and have
I have been using the python logging module for quite some time now, but
I have been using this function for a while without a problem, although I
I have been using this piece of script to load external .js files to
I have been using an open source Java project and had to make some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.