"Reading a Word Vector into Execute R"

carlcarl MemberPosts:30Guru
edited June 2019 inHelp

After creating a word vector, with a column of words and a column of total occurrences, what line of code would I then need to read that data into theExecute R运营商吗?





<宏/ >














































Best Answer

  • bhupendra_patilbhupendra_patil Administrator, Employee, MemberPosts:168RM Data Scientist
    Solution Accepted

    Hey@carl

    You can use the 'wordlist to data" operator and then connect that to your Execute R operator, that should make it available as a datatable in rm_main inside the execute R.

    keep in mind the order matter. So if you connect to first port on execute R, then "data" will ahve your wordlist

    rm_main = function(data)
    {

    ..

    ..}

    if you connect it as second port, then apples will have the wordlist. Let me know if this helps

    rm_main = function(data,apples)
    {

    ..

    ..}

Answers

  • carlcarl MemberPosts:30Guru

    Many thanks Bhupendra ... it is at least executing now. This is my very first attempt at a little R script!

    I do get an execution failure though, so guess I'm missing something in the code to recognize the wordlist as a table?

    Error and sample data attached below:

    Wordlist.jpegError.jpeg



    <宏/ >















































Sign InorRegisterto comment.