Compute biodiversity index
Reddit | R programming language
by /u/marinebiot
7h ago
can someone help me with computing basic biodiversity indices? my data is in long form (see picture) but it appears that package vegan works best for matrices. should I really be wrangling it into matrix or is there anther option? submitted by /u/marinebiot [visit reddit] [comments ..read more
Visit website
Welp
Reddit | R programming language
by /u/Commercial_Ninja4106
1d ago
hey I hope everybody's doing alright, I'm new to R and i'm currently working on my basics. what should I focus on after that? i'm kinda lost so if anybody could provide a list of some sort like a pathway or something. will mean a lot to me thank you submitted by /u/Commercial_Ninja4106 [visit reddit] [comments ..read more
Visit website
Matrix standard multiplication in R
Reddit | R programming language
by /u/Poseidon2010
1d ago
i write this code in R: X <- matrix(c(4, 5, 2, 4, 3, 3), nrow=3, byrow=TRUE) b <- c(3, -2) print(X*b) an the output is: [,1] [,2] [1,] 12 -10 [2,] -4 12 [3,] 9 -6 [,1] [,2] [1,] 12 -10 [2,] 6 -8 [3,] 9 -6 but why it's not like this: if X*b is standard multiplication it most be the second one submitted by /u/Poseidon2010 [visit reddit] [comments ..read more
Visit website
Learning R and trying to understand multilevel with lme
Reddit | R programming language
by /u/hyperbubblesLeo
1d ago
Hi! I’m trying to pick up R right now and following a tutorial but I don’t seem to quite understand it. This is specifically about making/analyzing a multilevel model. I am using this script and it works, but I just don’t fully understand it. Engagement is the outcome variable, but the final model I was given is a moderated/moderated mediation model. Is empathetic the independent variable, and emotion the mediation variable? Where does the moderation variable go then? model1 <-lme(s_engage ~ s_empathetic + s_emotion , random=~1|Res_ID ,method="ML",na.action=na.omit, data=hrdata) Thanks so ..read more
Visit website
Help formatting some data in R
Reddit | R programming language
by /u/JustABigMan
2d ago
So i have train_set_tsibble, where > str(train_set_tsibble) tbl_ts [31 × 2] (S3: tbl_ts/tbl_df/tbl/data.frame) $ date : Date[1:31], format: "2015-01-01" "2015-01-02" "2015-01-03" ... $ Delays: num [1:31] 25 52 57 76 41 46 37 42 32 16 ... - attr(*, "key")= tibble [26 × 2] (S3: tbl_df/tbl/data.frame) ..$ Delays: num [1:26] 12 13 16 18 21 23 24 25 26 28 ... ..$ .rows : list<int> [1:26] .. ..$ : int 24 .. ..$ : int 19 .. ..$ : int [1:3] 10 14 25 .. ..$ : int 23 .. ..$ : int 20 .. ..$ : int 27 .. ..$ : int 15 .. ..$ : int 1 .. ..$ : int 13 .. ..$ : int 22 .. ..$ : int 17 .. ..$ : int 28 ..read more
Visit website
Scraping a website
Reddit | R programming language
by /u/Orca_of_Azura
2d ago
I'm trying to scrape the table from the following webpage:https://www.nasdaq.com/market-activity/stocks/aaa/dividend-history I'm doing so with rselenium because I can't seem to download the html using rvest. However I'm finding that all the actual values of the table are coming up empty. Here's the code I'm using: library(RSelenium) rD <- rsDriver(browser = 'firefox', port = 4833L, chromever = NULL) remDr <- rD[["client"]] remDr$navigate(paste0("https://www.nasdaq.com/market-activity/stocks/aaa/dividend-history")) Sys.sleep(11) html <- read_html(remDr$getPageSource()[[1]]) df < ..read more
Visit website
Plot PCoA
Reddit | R programming language
by /u/BioNorthLion
2d ago
So, I'm trying to plot a PCoA with ggplot2 and I don't know how to create the ellipses for groping each group i got. I also like to plot the % variance in the axes but I don't even Know how create then, would be a plot like this. submitted by /u/BioNorthLion [visit reddit] [comments ..read more
Visit website
First R Assignment and summary(data frame) not working
Reddit | R programming language
by /u/More-Detective6251
3d ago
This is the code I am running for an assignment, but when it runs summary(E1_1) I only receive back Length, Class and Mode. Summary has worked for me in the past with an uploaded excel dataset but, not sure how to get it to work properly now ​ # Creating Vectors for Cities recorded High and Low Temperatures in Celcius # vCity = City names # vHigh = the highest temperature recorded # vLow= the lowest temperature recorded ​ vCity <- c("Barecelona", "Berlin", "Lisbon", "London", "Paris", "Rome") vHigh <- c(14, 2, 14, 5, 2, 14) vLow <- c(6, -1, 3, 0, -3, 3) ​ #Creating a data frame title ..read more
Visit website
Which plots look best?
Reddit | R programming language
by /u/CriticalIndividual83
3d ago
Hi, I'm looking at an MLR for continuous income - here are my plots for MLR without logging the outcome, with logging and with logging + 1. Without logging has a lower R2 while logging and logging +1 have the same R^2. But I think the residual vs fitted graph isn't looking too good for the logged versions. Any advice/help would be appreciated. Thanks! https://preview.redd.it/aw581ms2anvc1.png?width=1420&format=png&auto=webp&s=a134a194517fea010ebaaaa83a882dfb1ade417c https://preview.redd.it/c1hv4ns2anvc1.png?width=1420&format=png&auto=webp&s=224bcd96acf5bd24321a1c0d353b ..read more
Visit website
Issues installing Rtools package
Reddit | R programming language
by /u/GhostGlacier
3d ago
I have Rstudio 2023.12.1 build 402. I initially tried installing the Rtools package & got the following error: install.packages("Rtools") WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding: I went to the below site & downloaded the Rtools43 installer, and am still getting the same error when i try running install.packages("Rtools") or install.packages("Rtools43"). https://cran.r-project.org/bin/windows/Rtools/rtools43/rtools.html Does anyone know what I'm doing wrong? submitte ..read more
Visit website

Follow Reddit | R programming language on FeedSpot

Continue with Google
Continue with Apple
OR