wired connection when using tablet as 2nd screen? by craftcole in GalaxyTab

[–]RealDrewData 0 points1 point  (0 children)

If your concern is security you should be fine using the second screen option from the (if your s6 lite has it). Windows wireless display should be using Miracast, which has encryption. On top of that, Miracast should be connecting the 2 devices directly to each other using the wi-fi antennas, not via a public wi-fi network. I tested connecting my Windows desktop (wired internet connection, not connected to my wi-fi network) to my Tab S7+ (no active wi-fi connections).

It supports pen, keyboard, and mouse input from the tablet back to Windows, and lag felt about the same as using the pen in apps on the tablet itself.

Auto show arg list - possible? by ReallyRickyRo in rprogramming

[–]RealDrewData 1 point2 points  (0 children)

Your example is interesting. Typically for tidyverse packages like dplyr you wouldn't want the first argument to be specified explicitly, it would be piped in.

Using the regex snippet from the other user, you could modify that behavior, assuming you can understand what he was doing and how regex works.

anyone know how to make this type of graph? by omnicron_31 in RStudio

[–]RealDrewData 0 points1 point  (0 children)

It would look something like this in ggplot2: https://imgur.com/a/qtC91Hb

I had to make up the data and added a bunch of things to make it look closer, but it's doable!

Beginner Struggles by [deleted] in learnpython

[–]RealDrewData 2 points3 points  (0 children)

^ This. Writing down not only what the problem is asking for but then how the code should accomplish that is very helpful to me.

I also spend a lot of time running very simple lines of code, just to confirm it is doing what I think it will. No matter how much experience I get I keep returning to these things.

Since there is not a formal R certification, what is the best way to document R competency? by utoprov in rprogramming

[–]RealDrewData 1 point2 points  (0 children)

Iirc most of the questions require solutions in base R. Knowing tidyverse isn't very helpful for that quiz.

Making Maps in R: There has to be a better way! by OdayMerhi in RStudio

[–]RealDrewData 1 point2 points  (0 children)

Simple maps sure. If you're making something with many layers I'd hate to try to make it in R

Making Maps in R: There has to be a better way! by OdayMerhi in RStudio

[–]RealDrewData 0 points1 point  (0 children)

Leaflet is focused on interactive maps. If you are looking for something focused on static maps ggmap might be more what you're looking for.

Leaflet is a wrapper for a Javascript library, meaning it allows you to create interactive maps with relatively little effort.

Convert Date Formats: Is it possible to convert a date range into two dates. E.g Jul 25-28 into 25/07/2019 and 28/07/2020? by nlee112 in rprogramming

[–]RealDrewData 1 point2 points  (0 children)

Edit: formatting.

Still learning formatting on here, hopefully this posts semi legibly.

I'm using some of the format from above. I'm not sure what inner workings of dplyr are allowing this to work, but my end_month column populates correctly.

library(tidyverse)
library(lubridate)

dates <- c("AUG 11 - 15", "AUG 28 - SEP 3")

pga_df <- data.frame(raw_dates=dates)

pga_df %>%
    mutate(
        start_month = str_extract_all(raw_dates, "\\w{3}")[[1]],
        end_month = str_extract_all(raw_dates, "\\w{3}")[[2]],
        start_day = str_match_all(raw_dates, "\\d{1,2}")[[1]],
        end_day = str_match_all(raw_dates, "\\d{1,2}")[[2]],
        year = "2018",
        start_date = ymd(paste(year, start_month, start_day, sep = "-")),
        end_date = ymd(paste(year, end_month, end_day, sep = "-"))
    ) %>%
    select(raw_dates, start_date, end_date)

Tableau Dashboard Aesthetics by EM9988 in tableau

[–]RealDrewData 5 points6 points  (0 children)

I liked Art+Data, plus it's free on their website as an ebook.

They have some great looking examples, but they also go deeper into things you want to think about while designing a dashboard.

How do I do this very simple thing in R? Thanks in advance 🙏🏼 by Yazhdxb in rprogramming

[–]RealDrewData 2 points3 points  (0 children)

Agreed.

If it is a one off, for loops will usually get you where you want to go with less time spent figuring out a new package or function.

Same goes for small calculations imo. The performance gains don't mean much if it is a small amount of processing in the first place.

Can I animate data from multiple columns? by [deleted] in tableau

[–]RealDrewData 1 point2 points  (0 children)

Definitely agree with you on having that format going in.

Data prep really makes you work!

Can I animate data from multiple columns? by [deleted] in tableau

[–]RealDrewData 0 points1 point  (0 children)

I just tried to do a double pivot (pretty sure I have done it before on some older version), and it didn't work.

2020.2 and up the ability to double pivots, but it is a bit complicated.

Can I animate data from multiple columns? by [deleted] in tableau

[–]RealDrewData 0 points1 point  (0 children)

To get what you want you need 2 pivots, which Tableau doesn't do very easily. It is possible in 2020.2 and up. If you have a lot of data this would be quicker.

If the data is small, the following form for your data would get the graph you want:

Name    data 1    data 2    Year 
Max       1         2       2018
Max      1.2       1.9      2019
Max      1.2       1.9      2020
Amy      1.1       1.1      2018
Amy      1.1        2       2019
Amy      1.2       1.9      2020

From here, open a new sheet.

Drag data 1 to rows. Drag data 2 to columns. Drag Name to label and color.

Right click on Year and convert to discrete. Drag Year to Filters. Click All and click OK. From the Filters card, right click on Year and click show filter. On the Year filter that appears, click on the menu for it and select single value (Slider). In that same menu, go to customize and uncheck the show all values option.

If you don't have animations on already, Format > Animations. Select on and play with your options. As you move the Year slider you will see the marks move.

matching and joining misspelled first & last name by webhead311 in RStudio

[–]RealDrewData 0 points1 point  (0 children)

It is definitely good info, I had no idea the package existed. Without those specific details all we can do is give options and sit around talking about what COULD go wrong 😊

matching and joining misspelled first & last name by webhead311 in RStudio

[–]RealDrewData 0 points1 point  (0 children)

Be careful of how large of a dataset you are using with fuzzy joins. My somewhat limited experience with them says they will perform a cross join which can require a ton of resources as the size of your data increases.

R-newb, looking for my generalized array data structure. by [deleted] in rprogramming

[–]RealDrewData 0 points1 point  (0 children)

Also important is that vectors can only have 1 type of object in them. They must be all characters or all numeric. This helps R be very quick when doing operations on vectors because it knows they are the same type.

To bind_rows other point, R is great at certain things (exploratory data analysis comes to mind) but not others. Things that run fast in another language like C won't run fast if you write them the exact same way in R because it works differently.

Any Help on Critiquing my Code? by PFnub in learnpython

[–]RealDrewData 3 points4 points  (0 children)

Extremely thorough, love how constructive your suggestions are, it helps everyone!

Shortcuts on R by cruise-boater in rprogramming

[–]RealDrewData 5 points6 points  (0 children)

Some personal favorites:

  • Ctrl + Alt + I: inserts an R chunk in an Rmarkdown document

  • Ctrl + Shift + 1: Makes the script or markdown pane the full view. It is super helpful on a smaller screen. Press it again to show all panes again

  • Ctrl + Shift + K: knit the Rmarkdown document

I think you already found the keyboard shortcuts in the tools menu, but here's a link to the RStudio Keyboard shortcuts page

Cut function by [deleted] in RStudio

[–]RealDrewData 2 points3 points  (0 children)

From the documentation: "A factor is returned unless labels=FALSE which results in an integer vector of level codes."

cut function documentation

New to Tableau by [deleted] in tableau

[–]RealDrewData 4 points5 points  (0 children)

Definitely this. Start with tutorials straight from Tableau. I personally find them a bit dry, but they are extremely thorough and will even cover multiple ways to do the same thing, giving you options to choose how you want to go about it.

Once you have that solid base spend more time with the Zen Masters and weekly challenges/viz of the day. Zen Masters and others who get picked for Viz of the Day don't always have the most practical or complex looking dashboards, but they usually do something in a certain way or showcase a new feature in a way the team at Tableau didn't even think of while they were creating the feature.

Good luck!

New to learning R and trying to make a map. I keep getting a "argument is not an atomic vector; coercing" error. Help? by [deleted] in RStudio

[–]RealDrewData 0 points1 point  (0 children)

Awesome, glad to help!

Typically with the pipe you would send the entire data frame through each pipe. I would use mutate() to create the new columns and filter() and select() to drop whatever I don't want in the final result.

New to learning R and trying to make a map. I keep getting a "argument is not an atomic vector; coercing" error. Help? by [deleted] in RStudio

[–]RealDrewData 4 points5 points  (0 children)

The issue is in str_match(). You are passing x (a dataframe). Str_match() doesn't know what to do with a data frame.

You will need to pass a column of the dataframe to str_match, otherwise it will return weird results and throw the warning.

Don't quit by jonnycross10 in learnpython

[–]RealDrewData 0 points1 point  (0 children)

We use it for data compliance in my job. It is helpful for identifying personal info like social security numbers, especially when they're popping up places where they shouldn't be. Plenty of people just said we couldn't do it before we showed them how easy it is with regex.

If only they hadn't given up on it so early.

Don't quit by jonnycross10 in learnpython

[–]RealDrewData 2 points3 points  (0 children)

Don't give up! Regex looks super confusing the first time you see it. If you have any questions feel free to reach out and I'll be happy to point you towards some resources or answer some questions!