Grouped summaries के साथ अभ्यास
हम grouped summaries के आउटपुट के साथ pivot_wider() का भी उपयोग कर सकते हैं.
यह अभ्यास पाठ्यक्रम का हिस्सा है
R में Text Analysis परिचय
अभ्यास निर्देश
tidy_twitterको afinn sentiment dictionary से जोड़ें.- complaint label और user verified होने-न होने; दोनों पर group करें.
- डेटा को summarize करके एक नया कॉलम
aggregate_valueबनाएँ, जिसमेंvalueका sum हो. complaint_labelऔरaggregate_valueकॉलम को फैलाएँ.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
tidy_twitter %>%
# Append the afinn sentiment dictionary
___(___) %>%
# Group by both complaint label and whether or not the user is verified
___(___) %>%
# Summarize the data with an aggregate_value = sum(value)
___(___) %>%
# Spread the complaint_label and aggregate_value columns
___(___) %>%
mutate(overall_sentiment = Complaint + `Non-Complaint`)