Category "r"

use 'start' and 'end' values in two columns to specify fill range over remaining columns in R

I need to fill each row of a matrix with '1' between 'start' and 'end' columns, where the 'start' and 'end' column names (dates in the real data) are specified

R: What is the difference between the "baseline model" and "unrestricted model" in lavaan model summaries?

Usingsummary(fit.measures = TRUE) I am able to access extensive information about the fit of models stored in lavaan model objects. In this output (exemplified

Using LmFuncs (Linear Regression) in Caret for Recursive Feature Elimination: How do I fix "same number of samples in x and y" error?

I'm new to R and trying to isolate the best performing features from a data set of 247 columns (246 variables + 1 outcome), and 800 or so rows (where each row i

use 'start' and 'end' values in two columns to specify fill range over remaining columns in R

I need to fill each row of a matrix with '1' between 'start' and 'end' columns, where the 'start' and 'end' column names (dates in the real data) are specified

Is there a way to use different y-values per facet in R?

I'm relatively new to R and I'm struggling to figure out a way to get a set of plots with different y values. Below is a simplified version of the dataset I'm w

R obs Number Limited

I've been stuck with the data here for days, as I want to get data from API Binance, which is surely over ten thousand obs, but the R only limited the obs at 15

Creating a 3 by 1 matrix from three columns in a data frame and multiplying by a 2*3 in the correct order and applying to all the rows

I have a 23 constant complex matrix and create a 31 matric created from 3 columns of a data frame(this should be done for each row) and the result is going to b

Getting an R Notebook to work in Jetbrains Dataspell

So I am just starting a data science/stats class and I am trying to setup a R notebook within Dataspell I am able to create a Jupyter notbook but it only wants

Meta-analysis forest plot removing common effect model estimate

I am performing a meta-analysis of proportions using metaprop function. I am looking at the prevalence of heart fibrosis in people living with HIV. #mri$lgehivn

Extract data frame column after pipe, in base R [duplicate]

I'd like to use the [[ base R function to extract a column from a dataframe at the end of a sequence of piped operations. But I get an error m

Source RMarkdown chunks

Please consider the following. For me, the beauty of writing nearly all analyses in a RMarkdown file instead of in R scripts it that RMarkdown offers the possib

cat_plot showing same confidence intervals for all data points (interactions package in r)

I am using the cat_plot function from the [interactions]https://interactions.jacob-long.com/reference/cat_plot.html package to plot a 2-way interaction between

Plot three way interaction with 3d graph

I have fitted a binominal logistic glm with a three-way interaction between sex (male & female), tree cover including a quadratic term (1-100%), and the mea

R plotting code behaves differently for CSVs containing different data formatted the same way

I have two CSVs for experimental data measuring the effects of a two values of a single variable. Basically the code is the same except for the name of the data

%>% .$column_name equivalent for R base pipe |>

I frequently use the dplyr piping to get a column from a tibble into a vector as below iris %>% .$Sepal.Length iris %>% .$Sepal.Length %>% cut(5) How

R: Manually divide a specific row and column by a number in a dataframe

Unfortunately, I could only come across questions on how to divide columns by a specific number. However, I would like to divide the value only in a specific ro

I am getting a Torch error when using the textEmbed() function in the Text Package in R

I am trying to run the textEmbed() function in R using the text package in text analysis. However, I keep on getting errors telling me I haven't installed torch

how can I run r function from package in postgresql

I am trying to use the R function from a R package (https://cran.microsoft.com/snapshot/2017-04-03/web/packages/genasis/index.html) directly in Postgres without

`openxlsx` `dataValidation`: providing text input in list insteaf of cell reference

The documentation for openxlsx::dataValidation demonstrates how to get a dropdown menu by referencing cell(s). However, I'm interested in adding text input ("Ye

Calculating snow accumulation and snow melt using SnowMelt {EcoHydRology} package in R

I found an R package that calculates snow accumulation and snow melt. However, I'm getting an error which I have no idea about. My confusion is that snowdepth d