Category "r"

Unable to determine what type of blank, null, na or anything else in R dataframe

I have a data frame loaded from an Excel csv. One columns has many "NULL". This is what is showing up when looking at the data in RStudio. When I filter in the

Color coding in ggplot using geome_point, while maintaining size of point

I am plotting a dataset in R using three different variables (x=PassingFilerReads, y=meanCoverage, and size distribution of alignPercentageR1 over those two thi

Create unique row values in new column based on matching criteria in R

I have a dataframe with one identifier column of unique values, and one column which contains specific criteria. I want to create a new identifier column of uni

R import of stata file has problems with French accented characters

I have a large stata file that I think has some French accented characters that have been saved poorly. When I import the file with the encoding set to blank, i

Retain all columns after using group_by summarise, and mutatue dplyr on categorical variable and plot barplot with confidence intervals

I'm new to R. This is my dataset df <- tribble( ~Area_of_interst ,~Meds,~Response, "Internal Med", "asprin", "yes", "Inter

Renv and Java: "Error in rJava::.jinit() : Unable to create a Java class loader"

I have a script that works perfectly when I'm not using Renv. However, when running it in a project with Renv enabled, the last command line returns the followi

How to convert all NAs in a data set to blank values (regardless of class of vector)

I'd like to convert all the NAs in my very large data set to blank values "" I believe the issue that I have is that some columns are string, some are numeric,

Understanding the get_prior output in brms package

I'm relatively new to Bayesian modeling in R and am trying to understand how to interpret the get_prior output and how to use the information in the set_prior f

Predicted values for conditional logistic regression greater than 1

I have a multivariate conditional logistic regression model. Case and controls are matched on a 1 to many basis. I want to make predictions using the model. How

Group estimate in different direction than individual components

I have a binary outcome and five classes of grouped exposures in a BHM model. One group's summary estimate does not make sense to me given the estimates of the

I keep getting object ‘country_long’ not found

power %>% count(country_long, sort=T) %>% head(10) capacity <- power %>% group_by(country_long, primary_fuel) %>% summarize(capacity_mw) pl

Rendering quietly not working if the chunk has message = FALSE

I want to render an R Markdown file quietly, i.e nothing should be displayed in the console. Let foo.Rmd be the following file: --- title: "Foo" output: ht

Parallel processing cluster not used when running dredge on a MCMCglmm model with the parallel package

I am using MCMCglmm to run a PGLMM model. Since the aim is not to make predictions, I'm using dredge (from MuMIn) to calculate model-weighted parameter values a

Plotly screenshot for big graph screenshots

actual output which is cluttered But When I click on the camera icon of plotly , I get the whole screenshot which I wanted . I have attached the screenshot of i

Clustering within a single time series (detecting process changes)

I have a single time series where you can clearly see a process change (denoted by the manually drawn lines). I am trying to detect and cluster these changes so

Creating a summary statistics table in python

I am trying to recreate the 'SummarySE()' function from R in python but I am having trouble getting it to work. The function creates a summary stats table from

Quarto file not producing data table

I am very new to Quarto and I am trying to create an markdown document using it. Everything works well except I am not able to render tables on the output HMTL

Code for cross lagged model with moderators

I want to find out which relation exists between Attractiveness (X) and self-worth (Y) and use R for it. This relation should be moderated by age (A), gender (G

Comparing two Excel files in R and returning different titles

I am working on a project at work where I am required to compare two Excel spreadsheets to see if a title has been added or removed from the second excel sheet

Split numbers and dates into separate columns

My data contains text strings with three important features, an id number separated by":" and a starting date and an end date. I need to get these tree numbers