Quantcast
Channel: Active questions tagged r - Stack Overflow
Browsing all 205399 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

Rstudio will not load Rcmdr

When trying to load Rcmdr it starts loading the packages and then freezes after loading effects. I have attached a picture of the console. I am not sure what is going on, I have tried reinstalling R...

View Article


base_layer not showing in ggmap

I would like to as kfor any advice how to solve ggmap issue.lets suppose we have some spatial model and residuals and then we would like to plot it in the map. When using ggmap function I can see...

View Article


How do I get my loop on pdf_text only to read all the files?

I have a series of 475 files that I need to convert to text. I have written the following code to do that:files <- list.files(pattern = "pdf$") for (i in 1:length(files)){ print(i) files_pdfs <-...

View Article

How to plot the fitting curves in a GAM regression in R?

I am trying to fit a GAM model as follows:model <- gam(`output` ~ s(`var 1`) + s(`var 2`), data = mydata) Where mydata is a data.frame containing the data I need with columns: output, var 1 and var...

View Article

how to iterate through multiple elements in xml using R program

i am just new to R program and i am in the process of learning it. I have a sample xml file as below.<?xml version="1.0" encoding="ISO-8859-1"?> <documents> <Attribute ID="HCITM0014870"...

View Article


How to select the row with the maximum value in each group

Currently I have a problem as follows. In a dataset where multiple observations for each subject exist, and I want to make a subset of this dataset where only the maximum data for a record is selected....

View Article

Image may be NSFW.
Clik here to view.

How can I change the values displayed on the X axis using ggplot2?

Here is my R code:# Create vectors for Stroman 2019 -- Mets GScMets <- c(38,44,51,48,49,54,30,63,75,49,59,53) GameMets <- c(1:12) # Set line color and size ggplot(gameGScMets, aes(x=GameMets,...

View Article

Image may be NSFW.
Clik here to view.

R, optimal return level, gpd.fitrange (ismev)

For purpose of project I must find optimal return level using gpd.fitrange from ismev library. Can anyone tell me how to interprete the chart it outputs? What is the optimal return level here?

View Article


Error in if (randomNumber

I get a problem when I run this program in R. anybody help me to solving this problem..?par_1<-cbind(c(5.038159),c(3.899621)) par_2<-cbind(c(2.435457),c(13.89517)) tau<-365 cdf2 <-...

View Article


Using a logistic regression model calculated, create a classifier based on a...

I have created a logistic regression model using the built in iris dataset in R...# Includes iris dataset. library(datasets) # Dummy variable to predict. iris$dummy.virginica.iris <- 0...

View Article

Image may be NSFW.
Clik here to view.

how to insert valuebox inside navbarpage layout?

I'm trying to add valueBox to shiny app created in navbarpage layout, I know that valve boxes are part of the shinydashboard package but this app made me wonder how should I achieve this below is an...

View Article

Compile Multiple PDF using RMarkdown LaTex Error

I am trying to automatically compile multiple individual PDF reports from RMarkdown using a for loop in a separate R script. It works perfectly using this example that I previously posted here. Sample...

View Article

Image may be NSFW.
Clik here to view.

Plotting an nlme object in ggplot2

I calculated a linear-mixed model using the nlme package. I was evaluating a psychological treatment and used treatment condition and measurement point as predictors. I did post-hoc comparisons using...

View Article


Image may be NSFW.
Clik here to view.

Logistic Regression PMML won't Produce Probabilities

As part of a machine-learning deployment project, I built a proof-of-concept where I created two simple logistic regression models for a binary classification task using R's glm function and python's...

View Article

Load R packages only once when executing R scripts via bash

I have an R file example.r which basically looks like this:#!/usr/bin/env Rscript # do something ... library(somelibrary) # do something with somelibrary functions And a bash script which needs to call...

View Article


r for loop with if else statement and reference to outcome of previous iteration

I am having a dataframe with field x containing both group names (labeled as letters in the example below) and members of the group (listed under the group names, labeled as a number). I want to create...

View Article

R packages not found when scripts executed in shells but they are already...

Background I am trying to run the Example Workflow in https://rki_bioinformatics.gitlab.io/ditasic/, in which example.sh is the major bash script that will take the example data (which is a bunch of...

View Article


Find last date of previous week using data.table in R

I have a data.frame as shown below:structure(list(Start_Date = c("D1", "D2", "D3", "D4", "NA", "NA", "D6", "D7"), Week = c("W1", "W1", "W1", "W2", "W2", "W3", "W4", "W4"), last_date = c(NA, NA, NA,...

View Article

Image may be NSFW.
Clik here to view.

Calculate probability of value based on 2D density plot in R

I'm looking to work out a function to calculate the likelihood of a certain combination for B and R. The current illustration of the data looks like so:ggplot(df, aes(R,B)) + geom_bin2d(binwidth =...

View Article

Image may be NSFW.
Clik here to view.

How to add direct labels to a bar chart in ggplot for numeric x axis

I am trying to create a bar chart in ggplot where the widths of the bars are associated with a variable Cost$Sum.of.FS_P_Reduction_Kg. I am using the argument width=Sum.of.FS_P_Reduction_Kg to set the...

View Article
Browsing all 205399 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>