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

How to create an edge list for each user mentioned in a tweet when there are...

I want to do an network analysis of the tweets of some users of my interest and the mentioned users in their tweets.I retrieved the tweets (no retweets) from several user timelines using the rtweet...

View Article


R: how to extract pieces of text from a string based on a pattern

I have a dataset where each row contains a string of text of this type1)list(text = \"incredible hosts\", relevance = 0.87518, count = 1), list(text = \"Japan\", relevance = 0.675236, count = 1),...

View Article


Googlesheets4 does not read my Spreadsheets

I am using googlesheets4 to store Shiny data. I could reach my googleDrive but I am not able to read any sheet. I also tried "sheet_examples" but I got the same error message, see below. Here is a...

View Article

How to see interpreted/translated code in R?

I'm relatively new to R and I'm trying to better understand how R works under the hood. Often times, I'll get an error that shows syntax that wasn't even in my code. I know there must be a lot of...

View Article

How to predict gam random field markov model to grid?

I am working on a similar problem as the example in the mgcv package. I have created a similar model and would like to predict to grid level instead of the districts identified in the training data. Is...

View Article


Splitting a string based on locating a varying code (with a similar format)

I uploaded a txt file in to R as follows: Election_Parties <- readr::read_lines("Election_Parties.txt") Let's say the following text was in the file:P23-Andalusian Social Democratic Party (Partido...

View Article

Fréchet distribution parameters estimation in R?

I would need to calculate the parameters of a Fréchet distribution.I am using the packages fitdistrplus and evd of R. But I don't know what values to initialize the parameters.library(fitdistrplus)...

View Article

Connecting every point to every point on a scatterplot

I have a scatterplot of data and I want to connect every point to every point. Everything I have found online only connects one point to the next point (such as, using type = "l"). Is there a way I can...

View Article


Image may be NSFW.
Clik here to view.

How to remedy a path that crosses the international dateline with R

Aloha! I'm trying to plot the paths of multiple ships on a world map using R and a series of Lat/Lon points.All is well until the ship crosses the international dateline (-180/180) when the path jumps...

View Article


What's the equivalent of this R function in python

I've this variables in R:n <- 112 #Observations p <- 4 # Variables alpha <- 0.05 # Alpha is alpha quant=qt(1-alpha/2,n-p-1) # which is 1.982383 From my researches, qt function from R is...

View Article

Image may be NSFW.
Clik here to view.

Adjusting rugplot in ggplot2

Below is the code for a graph I am making for an article I am working on. The plot showed the predicted probabilities along a range of values in my data set. Along the x-axis is a rug plot that shows...

View Article

Is there any R function for finding index of days of week, e.g., 1 for...

Two columns [say col1 and col5] of my data frame are containing days of the week such as Sunday, Monday, ....I want to convert those columns to their respective indices such as '1' for 'Sunday, '2' for...

View Article

html_attr “href” returns only one result in rvest

My goal is to exact urls from a wiki page and there is a table of congress members and I want to exact their own wiki urls.My input is like:url_congress <-...

View Article


Is my GLM model with a binomial distribution correctly implemented?

I've been trying to implement a GLM model using data on the success of a genetic test (yes= successful test; no= unsuccesful test). > head(dataraw) success pre during season observer 1: no pre-wet...

View Article

Percentage format for y axis in mschart

Ok, this is kind of driving me insane. Hopefully I'm just stupid and someone can point me to the right answer quickly. I'm trying to format the y-axis to be a percent rather than a number. Here is a...

View Article


count most abundant species (cases) in matrix using R

I want to use some basic exploratory commands for my dataset, but can't figure this one out: i want to be able to have the ten (or any other number) most abundant species returned to me based on my...

View Article

How to use the R implementation of the Apriori or FP-Growth algorithm...

I have a CSV file with twelve fields: the first six represent events, the other six actions. For example:q,w,e, , , ,a,s,d,f, , q,t,y,i, , ,s,f,g, , , w,r, , , , ,d,f,g,j,k,l ...and so on (I inserted...

View Article


Create ranges by accumulating values

I have the DF1:KEY <- c(11,12,22,33,44,55,66,77,88,99,1010,1111,1212,1313,1414,1515,1616,1717,1818,1919,2020) PRICE <-...

View Article

Image may be NSFW.
Clik here to view.

How to calculate a Poisson-Matrix in Matlab analogous to Excel or R and sum...

I've already posted a similar question under this link but it hasn't worked maybe due to the fact that I've expressed myself not clearly enough or I was not able to comprehend the answer. However this...

View Article

R dplyr select not removing columns

I'm a new user of R and have a very basic question. I'm trying to delete columns using the dplyr select function. It appears to run correctly but then when the data is viewed using head the deleted...

View Article
Browsing all 206180 articles
Browse latest View live


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