how to combine table(weekdays()) in RHow to sort a dataframe by multiple column(s)How to make a great R reproducible exampleAssigning Values Using Logical OperatorsChanging line graph characteristics to notify that those values are predictionsMerge multiple tables by row and column in RGrouping time series data by combination of time and day of the weekDelete next row after every count/list of day; in RSelecting multiple values from checkboxGroupInput and plottingFunction that subsets a dataframe to the “best square” in RSubset dates with a given weekday and select next date if weekday is missing

Is it unprofessional to ask if a job posting on GlassDoor is real?

Is it possible for a square root function,f(x), to map to a finite number of integers for all x in domain of f?

Is it legal for company to use my work email to pretend I still work there?

How much of data wrangling is a data scientist's job?

dbcc cleantable batch size explanation

How to determine what difficulty is right for the game?

infared filters v nd

What typically incentivizes a professor to change jobs to a lower ranking university?

Why can't we play rap on piano?

Watching something be written to a file live with tail

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?

Today is the Center

What is the word for reserving something for yourself before others do?

Paid for article while in US on F-1 visa?

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

Perform and show arithmetic with LuaLaTeX

Codimension of non-flat locus

Replacing matching entries in one column of a file by another column from a different file

Why can't I see bouncing of switch on oscilloscope screen?

Is it possible to run Internet Explorer on OS X El Capitan?

Was any UN Security Council vote triple-vetoed?

What's the output of a record needle playing an out-of-speed record

Java Casting: Java 11 throws LambdaConversionException while 1.8 does not



how to combine table(weekdays()) in R


How to sort a dataframe by multiple column(s)How to make a great R reproducible exampleAssigning Values Using Logical OperatorsChanging line graph characteristics to notify that those values are predictionsMerge multiple tables by row and column in RGrouping time series data by combination of time and day of the weekDelete next row after every count/list of day; in RSelecting multiple values from checkboxGroupInput and plottingFunction that subsets a dataframe to the “best square” in RSubset dates with a given weekday and select next date if weekday is missing






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I want to combine 3 table(weekdays()) in R with library(twitteR) and library(ROAuth) no more.



I am doing it with tweets. My job is combine created days(what days) from 3 tweets.



 a=table(weekdays(dsADF[,"created"])) 
b=table(weekdays(dsBDF[,"created"]))

c=table(weekdays(dsCDF[,"created"]))


Let's say from a I've got Monday :100, Tuesday : 200



From b, Monday =30, tuesday = 40, thursday= 130, friday = 200
from c whatever



How I can combine three tables? without any library functions?
I will use it to draw a plot.










share|improve this question
























  • Please specify what your existing table (a,b, and c) look like and what your desired result looks like (i.e. what columns).

    – JJJ
    Mar 9 at 1:06

















0















I want to combine 3 table(weekdays()) in R with library(twitteR) and library(ROAuth) no more.



I am doing it with tweets. My job is combine created days(what days) from 3 tweets.



 a=table(weekdays(dsADF[,"created"])) 
b=table(weekdays(dsBDF[,"created"]))

c=table(weekdays(dsCDF[,"created"]))


Let's say from a I've got Monday :100, Tuesday : 200



From b, Monday =30, tuesday = 40, thursday= 130, friday = 200
from c whatever



How I can combine three tables? without any library functions?
I will use it to draw a plot.










share|improve this question
























  • Please specify what your existing table (a,b, and c) look like and what your desired result looks like (i.e. what columns).

    – JJJ
    Mar 9 at 1:06













0












0








0








I want to combine 3 table(weekdays()) in R with library(twitteR) and library(ROAuth) no more.



I am doing it with tweets. My job is combine created days(what days) from 3 tweets.



 a=table(weekdays(dsADF[,"created"])) 
b=table(weekdays(dsBDF[,"created"]))

c=table(weekdays(dsCDF[,"created"]))


Let's say from a I've got Monday :100, Tuesday : 200



From b, Monday =30, tuesday = 40, thursday= 130, friday = 200
from c whatever



How I can combine three tables? without any library functions?
I will use it to draw a plot.










share|improve this question
















I want to combine 3 table(weekdays()) in R with library(twitteR) and library(ROAuth) no more.



I am doing it with tweets. My job is combine created days(what days) from 3 tweets.



 a=table(weekdays(dsADF[,"created"])) 
b=table(weekdays(dsBDF[,"created"]))

c=table(weekdays(dsCDF[,"created"]))


Let's say from a I've got Monday :100, Tuesday : 200



From b, Monday =30, tuesday = 40, thursday= 130, friday = 200
from c whatever



How I can combine three tables? without any library functions?
I will use it to draw a plot.







r twitter-r






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 9 at 4:00









Dale Burrell

3,43452655




3,43452655










asked Mar 9 at 0:56









OasisOasis

103




103












  • Please specify what your existing table (a,b, and c) look like and what your desired result looks like (i.e. what columns).

    – JJJ
    Mar 9 at 1:06

















  • Please specify what your existing table (a,b, and c) look like and what your desired result looks like (i.e. what columns).

    – JJJ
    Mar 9 at 1:06
















Please specify what your existing table (a,b, and c) look like and what your desired result looks like (i.e. what columns).

– JJJ
Mar 9 at 1:06





Please specify what your existing table (a,b, and c) look like and what your desired result looks like (i.e. what columns).

– JJJ
Mar 9 at 1:06












1 Answer
1






active

oldest

votes


















1














Convert them to data frames, combine them with rbind and convert back with xtabs.



a <- as.table(c(Monday = 100, Tuesday = 200))
b <- as.table(c(Monday = 30, Tuesday = 40, Thursday= 130, Friday = 200))
xtabs(Freq ~ Var1, rbind(as.data.frame(a), as.data.frame(b)))


giving:



Var1
Monday Tuesday Thursday Friday
130 240 130 200





share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55072954%2fhow-to-combine-tableweekdays-in-r%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Convert them to data frames, combine them with rbind and convert back with xtabs.



    a <- as.table(c(Monday = 100, Tuesday = 200))
    b <- as.table(c(Monday = 30, Tuesday = 40, Thursday= 130, Friday = 200))
    xtabs(Freq ~ Var1, rbind(as.data.frame(a), as.data.frame(b)))


    giving:



    Var1
    Monday Tuesday Thursday Friday
    130 240 130 200





    share|improve this answer



























      1














      Convert them to data frames, combine them with rbind and convert back with xtabs.



      a <- as.table(c(Monday = 100, Tuesday = 200))
      b <- as.table(c(Monday = 30, Tuesday = 40, Thursday= 130, Friday = 200))
      xtabs(Freq ~ Var1, rbind(as.data.frame(a), as.data.frame(b)))


      giving:



      Var1
      Monday Tuesday Thursday Friday
      130 240 130 200





      share|improve this answer

























        1












        1








        1







        Convert them to data frames, combine them with rbind and convert back with xtabs.



        a <- as.table(c(Monday = 100, Tuesday = 200))
        b <- as.table(c(Monday = 30, Tuesday = 40, Thursday= 130, Friday = 200))
        xtabs(Freq ~ Var1, rbind(as.data.frame(a), as.data.frame(b)))


        giving:



        Var1
        Monday Tuesday Thursday Friday
        130 240 130 200





        share|improve this answer













        Convert them to data frames, combine them with rbind and convert back with xtabs.



        a <- as.table(c(Monday = 100, Tuesday = 200))
        b <- as.table(c(Monday = 30, Tuesday = 40, Thursday= 130, Friday = 200))
        xtabs(Freq ~ Var1, rbind(as.data.frame(a), as.data.frame(b)))


        giving:



        Var1
        Monday Tuesday Thursday Friday
        130 240 130 200






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 9 at 2:34









        G. GrothendieckG. Grothendieck

        154k11136244




        154k11136244





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55072954%2fhow-to-combine-tableweekdays-in-r%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to get text form Clipboard with JavaScript in Firefox 56?How to validate an email address in JavaScript?How do JavaScript closures work?How do I remove a property from a JavaScript object?How do you get a timestamp in JavaScript?How do I copy to the clipboard in JavaScript?How do I include a JavaScript file in another JavaScript file?Get the current URL with JavaScript?How to replace all occurrences of a string in JavaScriptHow to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?

            Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

            List of MPs elected to the English parliament in 1640 (April) Contents List of constituencies and members See also Notes References Navigation menueNational Archives – The Glynde Place ArchivesCobbett's Parliamentary history of England, from the Norman Conquest in 1066 to the year 1803'Aldermen in Parliament', The Aldermen of the City of London: Temp. Henry III – 1912onepage&q&f&#61, false 229