Let us worry about your assignment instead!

We Helped With This R Studio Programming Homework: Have A Similar One?

SOLVED
CategoryProgramming
SubjectR | R Studio
DifficultyGraduate
StatusSolved
More InfoStatistics Homework Help
209111

Short Assignment Requirements

In Assignment #5, you will use Trump tweet data, trump_tweets.csvPreview the document, and the preprocessCorpus.RData file, which contains the preprocessCorpus() function, to answer the questions in HW4_Student_Template.R.

Assignment Code


#------------------------------------------
#------------------------------------------
############## Homework # 4 ##############
#------------------------------------------
#------------------------------------------

# Directions:
# In Assignment 4, you will transform a sample of 
# 2500 trump tweets for analysis, using data with over 
# 30,000 tweets. You will use the preprocessCorpus function
# to simplify the transformation and then demonstrate and
# understanding of the transformation from a corpus to 
# a DTM or TDM.

#------------------------------------------
######### Preliminary Code #########
#------------------------------------------

#------------------------------------------
## Get/Set Your Working Directory
#------------------------------------------
#------------------------------------------
## Load Packages (libraries)
#------------------------------------------
#------------------------------------------
######### Solutions #########
#------------------------------------------

#------------------------------------------
# 1. First, import the data from the .csv file (trump_tweets.csv)
#    as a dataframe names trumpt. Identify the ID column and column with text
#    that you would like to analyze and rename them or create them as necessary
#    to create the Corpus from a DataframeSource. 
#    
#------------------------------------------
# ANSWER #

#------------------------------------------
# 2. Run a command using the set.seed function and your birthday,
#    as in HW #3. Using Hw #3 as a guide, use the sample()
#    function to create a sample of 2500 tweets without replacement.
#    Name your subset of tweets "trump_sub". Then, remove the 
#    original dataframe.
#------------------------------------------
# ANSWER #

#------------------------------------------
# 3. Create the Corpus object named trumpcorp. Then, use the preprocessCorpus() 
#    function, which you loaded into your workspace, to cleanse the corpus.
#    Use lemmatization, keep hashtags, remove SMART stopwords 
#    and do not preserve intraword punctuation.
#------------------------------------------
# ANSWER #

#------------------------------------------
# 4. Create a Document Term Matrix, named trumpDTM, with default settings.
#    View the high-level DTM information. How many Terms are in your
#    DTM?
#------------------------------------------
# ANSWER #

#------------------------------------------
# 5. Now, apply a a maximum term length of 15 and a minimum term length of 4 to the DTM. 
#    How does this impact the number of terms? How many terms are there in the DTM with 
#    min and max term lengths? How does this impact the size of your DTM?
#------------------------------------------
# ANSWER #

#------------------------------------------
# 6. Use the appropriate functions to determine 
#    which terms appear more than 100 times in your TDM? 
#    and 250 times in your TDM? What do you notice about
#    these terms? Use the appropriate function to find terms associated
#    with terms appearing 250 times. What does 
#    Donald Trump talk about most on Twitter based on your sample? 
#    In your opinion, are these the most important terms?
#    Why or why not? Explain.
#------------------------------------------
# ANSWER #

#------------------------------------------
# 7. Next, consider the sparsity of the DTM. Based on the
#    sparsity, Based on this, should you remove Sparse 
#    Terms? Explain. If you remove terms with .995 
#    sparsity, how many terms remain? If you remove terms
#    with .99 sparsity, how many remain? Which would you
#    use and why? Explain.
#    
#------------------------------------------
# ANSWER #
#------------------------------------------
# 8. tfidf weighting is probably the most popular weighting used in Text Mining. 
#    Apply tfidf weighting to your matrix (which removes sparse terms). Do not use normalization. 
#    View the 50 highest weighted terms.  In your opinion, do these seem
#    to be the most important terms in your sample of trump tweets?
#    why or why not?
#------------------------------------------
# ANSWER #
#------------------------------------------

Frequently Asked Questions

Is it free to get my assignment evaluated?

Yes. No hidden fees. You pay for the solution only, and all the explanations about how to run it are included in the price. It takes up to 24 hours to get a quote from an expert. In some cases, we can help you faster if an expert is available, but you should always order in advance to avoid the risks. You can place a new order here.

How much does it cost?

The cost depends on many factors: how far away the deadline is, how hard/big the task is, if it is code only or a report, etc. We try to give rough estimates here, but it is just for orientation (in USD):

Regular homework$20 - $150
Advanced homework$100 - $300
Group project or a report$200 - $500
Mid-term or final project$200 - $800
Live exam help$100 - $300
Full thesis$1000 - $3000

How do I pay?

Credit card or PayPal. You don't need to create/have a Payal account in order to pay by a credit card. Paypal offers you "buyer's protection" in case of any issues.

Why do I need to pay in advance?

We have no way to request money after we send you the solution. PayPal works as a middleman, which protects you in case of any disputes, so you should feel safe paying using PayPal.

Do you do essays?

No, unless it is a data analysis essay or report. This is because essays are very personal and it is easy to see when they are written by another person. This is not the case with math and programming.

Why there are no discounts?

It is because we don't want to lie - in such services no discount can be set in advance because we set the price knowing that there is a discount. For example, if we wanted to ask for $100, we could tell that the price is $200 and because you are special, we can do a 50% discount. It is the way all scam websites operate. We set honest prices instead, so there is no need for fake discounts.

Do you do live tutoring?

No, it is simply not how we operate. How often do you meet a great programmer who is also a great speaker? Rarely. It is why we encourage our experts to write down explanations instead of having a live call. It is often enough to get you started - analyzing and running the solutions is a big part of learning.

What happens if I am not satisfied with the solution?

Another expert will review the task, and if your claim is reasonable - we refund the payment and often block the freelancer from our platform. Because we are so harsh with our experts - the ones working with us are very trustworthy to deliver high-quality assignment solutions on time.

Customer Feedback

"Thanks for explanations after the assignment was already completed... Emily is such a nice tutor! "

Order #13073

Find Us On

soc fb soc insta


Paypal supported