Category "r"

How to read dirty csv file in R?

I have a very dirty data that I need to read in R. The csv file seperated with comma, but there are also some commas in the first column of my data that puts me

R Shiny, shinjqui get orderInput after modification

I have an orderInput from the shinyjqui library and I would like the server to set which items are in the orderInput. Afterwards I would like the user to modify

R Shiny, shinjqui get orderInput after modification

I have an orderInput from the shinyjqui library and I would like the server to set which items are in the orderInput. Afterwards I would like the user to modify

How to loop over on different files and save the output with filename in R?

I have several files with the names RTDFE, TRYFG, FTYGS, WERTS...like 100 files in txt format. For each file, I'm using the following code and writing the outpu

Converting character to date turning all dates to NA & x-axis of ggplot not in chronological order [duplicate]

I am using an online ONS dataset of inflation and trying to chart it, but when plotting it with ggplot the x-axis is not in chronological orde

How to copy multiple row and column headers in a rendered table when using DT table copy function?

A similar question was posted but never answered: r shiny problem with datatable to copy a table with table head (colspan) When running the below reproducible c

Unable to import from Sharepoint Excel file to an R dataset

I am trying to download an Excel in Sharepoint site into an R dataset. But I keep getting errors. I have also tried searching for solutions across forums for th

Problems installing kb-python on R software (Windows 10)

I am trying yo install to make an RNA-seq analysis from raw-data (fastq extension) and I am trying to install kb-python by running the next lines: conda create

R incongruity when copying a column in R with ifelse

After loading lots of xlsx sheets of multiple workbooks, I want to create a double check of the tidiness and cleanliness of the data source. I created a data fr

Formating tbl_svysummary() outputs in R

I'm doing descriptive analysis of survey data, I'm using the gtsummary package which have been working nicely. I use this code, I don't provide any data because

How can I get reactlog to render on its own webpage using flexdashboard?

I am successful in rendering 'reactlog' when I use flexdshboard, but it renders within the dashboard and is way too small in size - even for this minimal exampl

How to change class character to class date in R without getting NA results

I've got a data table with a column of dates: ex_dates <- c("2022-01-01", "2022-05-28") they are now at class character, how can I change them to class date?

How can I get reactlog to render on its own webpage using flexdashboard?

I am successful in rendering 'reactlog' when I use flexdshboard, but it renders within the dashboard and is way too small in size - even for this minimal exampl

Create dataframe based on matching

I want to create a df in R with two variables, they have different number of rows. This is an abstract example: I want to match a 3 to "Fail" (without writing i

Merging csv files in R and adding a column with file names [duplicate]

I want to merge multiple csv files stored in a single folder, and to add a column containing the name of each csv file on the rows that corres

Using RPostgres, what should I use to "set role..." for the table I will write to a db?

I'm new to connecting to databases via R, and I am trying to find best practices to minimize errors and problems. I am uploading a table from R to a postgres da

quesion of loading the packages of Rstudio

Everytime I load the packages of Rstudio and always get the following messages.something &

ee$Reducer$mean: Extract mean several bands/indices with GEE in R

I'd like to get "B2","B3","B4","B8","NDVI","SAVI" and "TVI" average data from COPERNICUS/S2_SR collection by date/tile. I like to extract these bands and vegeta

$ operator is invalid for atomic vector

I'm using rugarch::ugarchforecast to do a 1 step ahead rolling forecast. I keep getting the error message $ operator is invalid for atomic vector, but I'm not u

Creating a regression summary table with multiple regressions, adding 1 independent variable at a time (R/Python)

I would like to know, whether there is a pre-built function / package which does a simply OLS regression, by adding one independent variable from a pre-defined