Category "r"

How can I plot the intercept and coefficient of my LMM with 95% confidence interval over spagetti plots in R?

To visualize the results of my linear mixed model (LMM) I would like to plot spagetti plots that track the change in volume1 over time for all participants. I w

Bulk downsampling list of wave objects using seewave::resamp

I am trying to downsample a list of wave objects using seewave::resamp. To get my list I have imported a .wav file and split it into 10 second clips following @

Reiterative calculate

I have to make a reiterative table that each calculation has to take the previous one. Let me explain, my initial data are: maximum <- 10 minimum <- 2 ord

classify audio data based on thresholding in R

I have a number of audio files (~5 minutes long). All I need to do is to detect whether someone is speaking or not. It is only one speaker in each file, but the

R Plotly Bar Chart - Add horizontal line markers

I want to draw a bar chart with two bars side by side for each category (LETTERS) and add a horizontal line to each bar (y_ref as red lines & z_ref as green

How to set size of rpivotTable in rmarkdown document

I would like to include several rpivotTables in an rmarkdown HTML output (document, flexdashboard, other options that result in a standalone HTML file are ok; I

dplyr mutate only works once

I'd like to add a new variable to a dataframe for plotting labels, as seen in the top voted answer here Here's the data: small <- structure(list(Site = stru

Tibetan characters in data.frames cannot be displayed in R console even after locale is set (Chinese is fine, Tibetan in matrices is fine)

In R, Tibetan characters do not display properly when they are located in data.frames: > Sys.setlocale("LC_CTYPE", "Tibetan") [1] "Tibetan_China.950" > da

Error while running WTC (Wavelet Coherence) Codes in R

I am doing Wavelet Analysis in R using Biwavelet. However, I receive the error message: Error in check.datum(y) : The step size must be constant (see approx fun

How can I plot a sphere with plotly in R?

I would like to plot a sphere in the following plot: And that is the code for it: library(plotly) fig <- plot_ly(mtcars, x = ~wt, y = ~hp, z = ~qsec,

Creating custom rendered footer values i a reactable

I am having a hard time to render my footer column in a reactable. I want to use JS here to access the client-side filtered state, and since iam not too familia

app$vspace error in building phylogenetic tree in R

I am working with phylogenetic trees. Import the phylogenetic tree file with ggtree::read.tree and get the information with readxl::read_xlsx. I want to visuali

How to create beepvar or dayvar from time-varying VAR

For my Thesis, I am applying time-varying vector autoregression (TVVAR) on time-series objects. I am using a dataset from an open-source paper. As R-package I a

R code error - Error arguments implying differing number of rows: 35, 13

I am creating an NMDS plot and first I need to create a dataframe with the scores from the individual sites. This is my NMDS code: nmds_results <- metaMDS(co

In a point pattern with marks representing area height and width: how to delete points with "nested" areas?

I have point patterns comprising of several 100k marked points representing cell centres of cells of two types (big and small cells). The point coordinates are

R: Match an odd number of repetitions

I would like to match a string like \code, but not when the backslash is escaped. I think that one way of doing this could be matching an odd number of backslas

Cohen's f2 in R

Does anyone know how to extract the cohen's f2 effect size value from a model computed with the lm() function in R? I would like to report effect sizes for indi

Remove outlier from five-number summary statistics

How can I force fivenum function to not put outliers as my maximum/minimum values? I want to be able to see uppper and lower whisker numbers on my boxplot. My c

InternetOpenUrl failed: 'A connection with the server could not be established'

I have gone down a rabbit hole trying to set up Github actions to check the builds of my packages via usethis::use_github_action_check_standard(). The function

Facet title alignment using facet_wrap() in ggplot2?

I'm making a plot involving facets, and I am trying to fix the alignment of the facet/strip title. Right now it seems to left align to the panel, which places i