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;
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
add a comment |
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
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
add a comment |
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
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
r twitter-r
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
add a comment |
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
add a comment |
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
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
answered Mar 9 at 2:34
G. GrothendieckG. Grothendieck
154k11136244
154k11136244
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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