Dear R masters, I’m really new to coding in general and am struggling with a project, visualisation and markdown are my main issues. Would anyone be available for a 1hr tutoring session to help me on zoom/Google meets please? UK time zone my end.
An hour is a long time to commit, not knowing what level the issue is or if they can help.
Where have you already looked? Markdown should take three minutes to master. So what isn't working?
# Heading Level 1
## Heading Level 2
### Heading Level 3
Normal text. **Bold text**. *Italics text*
* bullet point
* bullet point
1. Number list
1. Number list
Heading Level 1
Heading Level 2
Heading Level 3
Normal text. Bold text. Italics text
- bullet point
- bullet point
- Number list
- Number list
Note there are spaces after # etc.
Note there are blank lines
What are you knitting to?
Are you using RStudio? Are you using v1.4 it has a visual Basic editor
1hr would be the usual tutoring time, I’ll take 30 mins too, whatever works. Basically when I knit the results of my code don’t show. I put everything correctly, I think, but the tibles that show in the console don’t show in the word doc.
My visualisations are something I struggle with as I need to sort the data before creating the vis and I don’t know how.
It will be quicker for me to just share my screen during a call and for the person to show me where I’m wrong. I’m obviously prepared to pay a tutor fee, that’s why I said 1hr as that’s a standard amount of time to charge for...
P.S. 3 minutes to master for someone whose coded at least once in their life. I haven’t. I’m a compete novice. I don’t speak R, I’m learning. So it will not be 3 minutes unless I’m helped in the way I respectfully ask.
This sounds like something we can do here if no one closer to your TZ can help (I'm PST, so that's a stretch.)
To get you going, let's set aside the details of how to convert it to Word (presentation should be the final step) and how to format the data in markdown and focus on the basics of the data, the object that contains it, what transformations are needed (sorting?) and the kind of plots sought.
To get started, see the FAQ: How to do a minimal reproducible example reprex
for beginners. The data doesn't have to be all your data, or even representative data—just enough to illustrate the task.
Here's an example, using the built-in. I'm assuming you're working in RStudio.
suppressPackageStartupMessages({
library(dplyr)
})
head(mtcars)
#> mpg cyl disp hp drat wt qsec vs am gear carb
#> Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
#> Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
#> Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
#> Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
#> Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2
#> Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3 1
mtcars %>% arrange(-desc(mpg)) %>% head()
#> mpg cyl disp hp drat wt qsec vs am gear carb
#> Cadillac Fleetwood 10.4 8 472 205 2.93 5.250 17.98 0 0 3 4
#> Lincoln Continental 10.4 8 460 215 3.00 5.424 17.82 0 0 3 4
#> Camaro Z28 13.3 8 350 245 3.73 3.840 15.41 0 0 3 4
#> Duster 360 14.3 8 360 245 3.21 3.570 15.84 0 0 3 4
#> Chrysler Imperial 14.7 8 440 230 3.23 5.345 17.42 0 0 3 4
#> Maserati Bora 15.0 8 301 335 3.54 3.570 14.60 0 1 5 8
Looks like I may have to battle this on my own, thank you so much, I will try to figure it out.
I am working in R studio but have no idea about most of what I'm doing... sigh
what's the best way to shrink the Date data i have? instead of having d/m/y, can I just shrink it to annual fingures somehow?
Yes, that would involve grouping by year.
Install the {dplyr} and {lubridate} packages. Assuming you have your data in a data frame with the date as the first column, use
str(your_df)
and confirm that the date column is character
. If it is, you will need to
your_df %>% mutate(date = dmy(date)) -> your_df
(This assumes dates in form of 29/03/2021, d/m/y).
Then
(your_df %>% group_by(date) %>% summarize(your_var = sum(your_var)
Really much easier to explain with a reprex
.
Thank you so much I've found a way to go around the most confusing bits and after a ton of googling, finished the project, what a relief. Appreciate your help
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.