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

Predict a factor of 3 levels and return the % of each factor

I am trying to predict a three-level factor with a set of variables. The group is A, B and C.m<-glm(as.factor(Group)~Sex+BloodType+Pressure,data=Hel,family = "binomial") newdata <-...

View Article


Garbage Collection in R process running inside docker

I have a process where we currently large amount of data per day, perform a map-reduce level of functions and use only the output of the function. We currently run a code sequence that looks like the...

View Article


Image may be NSFW.
Clik here to view.

Web Scraping image in R from www.zoobashop.com

I am collecting wax images for my classification algorithm.At first I recovered all the links of the image blocks. Each block contains 1 or 2 images that I want to get back the links.For example on...

View Article

Summary command in logistic regression in r [closed]

If this is a data frame Cust I'd. Consumer spending. Area Sales made 1. 1$100-$200. Urban. 1 2 $200-$300. Suburban. 0 3. $300-$400. Suburban. 1 . . . . . . . . . . . .Then on doing modelling through...

View Article

Simultaneously permute rows and columns while constraining by other factors

I am working in R with a dataset that has this structure:plt <- c("W","W","W","W","W","W","W","W","W", "Z","Z","Z","Z","Z","Z","Z","Z","Z") siteA <- c("a","a","a","b","b","b","c","c","c",...

View Article


Is there a way to give each subset from a dataframe a different object name...

I need to make different subsets from one data.frame, and then use these different subsets for subsequent actions. Therefore, I need to give each subset a unique name. I tried writing different...

View Article

R help converting factor to date

I imported a csv file with dates from a SQL query, but the dates are really date-time values and R doesn't seem to recognize them as dates. How do I convert them to dates? (I don't need to include the...

View Article

Perform a bootstrap to estimate these standard errors

log_mod <- glm(formula = y ~ x1 + x2, data = dat, family = "binomial")Perform a bootstrap to estimate these standard errors ourselves. It works as follows: i. Sample 2000 $(X_1,X_2,Y)$ triplets with...

View Article


How do you remove the academic and demos sections from the main page of the...

I created a site (https://www.dsobolew.me/) using blogdown and the Academic hugo theme. I want to remove the Academic and Demos sections on the main page so the first thing that appears is the...

View Article


How to lag dates based on multiple conditions and reseting the lag after it...

I have a dataframe of station repairs.The workflow is like this: Mechanics go to a station and they press a button that records an action named release. After they fix the station, they press the...

View Article

Dynamically create dataframe

I want to create a dataframe with columns names given by user. Like I have some textInputs(name1, name2, etc) and textInputs(value1, value2, etc). Now I want to create dataframe with entries in name1,...

View Article

Calculating density within a shapefile

I'm trying to calculate density within a shapefile, but I'm fairly confident I'm doing it wrong. The idea is to figure out which geographical regions there have been the most sales by density.Here is a...

View Article

Split column to multiple columns by using R or python

I have a value like that and I would like to split it to multiple columns[['Alonso, O.', 'Mizzaro, S.'], ['Gao, H.', 'Barbier, G.', 'Goolsby, R.']] I just wanna the value like 'Alonso, O''Mizzaro,...

View Article


Need help adding column with associated characters

Table before adding associated cost vectorI am trying to add a new column that has an associated cost depending on the item code listed in the first column.Here is the price sheet:| Item | Price...

View Article

How can I scrape table from PHP website using R?

Looking to import data into R from a table on this page:https://legacy.baseballprospectus.com/standings/index.php?odate=2019-09-10I've tried multiple methods using XML and httr with no luck. Have...

View Article


How do I run a linear regression between certain observations in a data set?

my problem is that I am unable to run a linear regression between say the 450th and 500th observations of NBA salaries (the salaries only in the year 18/19 in my continuous data set).So far I have this...

View Article

ggplot2 with summarize as y aesthetic - r

Here's my task:Create the following graph:Group the Pokemon data by type1 and is_legendarySummarize the data with the mean of the attackCreate a bar chart with type1 on the x, the mean of the attack on...

View Article


How to make my graph legend not a gradient? ggplot2, tidyr, poisson...

This is kind of a really small issue, but I can't rectify it without causing unwanted ramifications... unless someone can help. I'm doing a poisson regression and I have 7 predictor variables, 3 are...

View Article

Sort data frame by character and date columns

I'm trying to sort a simple dataset by a character column (descending) and a date variable (ascending). fx_code date fx_spot 1 AUD 2000-01-31 0.6370 2 AUD 2000-02-29 0.6178 3 AUD 2000-03-31 0.6071 4...

View Article

Image may be NSFW.
Clik here to view.

Changing the fontsize of axis annotations in a hexbinplot

I would like to increase the font size of axis annotations in a hexbinplot.library(hexbin) df <- data.frame(x=rnorm(1000),y=rnorm(1000)) hb <- hexbin(x=df$x, df$y) myPlot <- plot(hb, xlab="",...

View Article
Browsing all 204908 articles
Browse latest View live


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