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

Image may be NSFW.
Clik here to view.

EXTRACTING DATE COLUMN IN R [closed]

Hello this is my data frame I would like to extract the column with the dates from my data frame here called SPY so I can use that column for a regression analysis how would I do this in R

View Article


could you help me to understand this error in r?

install.packages("swirl") There is a binary version available but the source version is later: binary source needs_compilation swirl 2.4.3 2.4.5 FALSE installing the source package ‘swirl’trying URL...

View Article


RVest: Scraping the text of a website with limited access

I'm currently webscraping a news-site using rvest. The scraper is working, but on the news site, i got limited access to the exclusive articles listed there. Hence i need a working loop, that doesn't...

View Article

storing list results into a table or data frame format

I am working with 4 lists of confusion matrices and I want to store the results in a table.In order to get the confusion matrix list I created the following example:data(iris) data <- list( iris...

View Article

generate a new variable based on the aging of another variable

I have a dataset likes like belowID. Invoice. Date of Invoice. paid or not. 1 1 10/31/2019 yes 1 1 10/31/2019 yes 1 2 11/30/2019 no 1 3 12/31/2019 no 2 1 09/30/2019 no 2 2 10/30/2019 no 2 3 11/30/2019...

View Article


R group_by and summarize is not working as it should.. no clue why

This should REALLY work but it doesn't and I lose my mind!This is my data> head(dataset_2,n=5) CUSTOMER_NUMBER OLD_NEW_CLIENT COMPLETION_PRCT CRASH_RISK 1 535961675 Old client 0.06 25 2 223186690...

View Article

r - Find String in Any Elements of a List and Then Use the Name of That List...

I am trying see if the string exists in any of the elements in a list and then use the name of that list if it does exist.Right now, I am using case_when and grepl, but I'd like a more efficient way to...

View Article

delete IDs with a variable's one value appearing once

I hope I can explain myself clearly.I have a dataset like thisdataset <- data.frame(ID = c(1,1,1,2,2,2,3,3,3), Invoice = c(1,2,3,1,2,3,1,2,3), Invoice_Date =...

View Article


Regex Negative lookbehind case in R

Hey I would like to extract names from a text - my identifying pattern is that names will always start with a capital letter and there will be two or three words with a capital letter in a row....

View Article


combining Histogram bars in R

I'm trying to make a histogram using basic R. The histogram is doing a good job representing the data. However, I want to combine the few bars on the right-side(from 300,000+)enter image description...

View Article

R statistics, panel data and NAs: replacing NA value in vector with a...

My apologies for a poorly formulated question. I am new to R and to programming and for posting questions. I am working with panel data. I have two context varying variables: cat (category that ranges...

View Article

Executing python script via R Reticulate: TypeError: 'WindowsPath' object is...

I'm passing the following Python script into R using the Reticulate package. The script prints "Creating Network Template" but then stops with "TypeError: 'WindowsPath' object is not iterable". I'm a...

View Article

Extracting element in a nested list in Rcpp

I am trying to extract an element from a list and do something with it's value using Rcpp. But I cannot make the assignment. Here is basically what I want to achieve given in R code:mylist = list(steps...

View Article


Forming a new matrix in R

Suppose I have a matrix M of 1000x20. I would like to form a new matrix M' using some particular row vectors of M. Suppose v is one of the row vectors where: (sum(v[c(1,3,5)])<=m1) &&...

View Article

stringr str_replace on multiple patterns and replacements?

I tried> str_replace("abcdef", c("b", "d"), c(b="B", d="D")) [1] "aBcdef""abcDef"hoping for[1] "aBcDef"How can we replace each pattern with a specific replacement with one function call to...

View Article


How to create a sequence of up to 200-500 thousands numbers in just few...

I need to create a sequence of numbers in the shortest amount of time, ideally in the microseconds range. The total length of this sequence is generally in the range of 20-100 thousand numbers, but...

View Article

create a network without matrix in r or python

I have a large dataset that contains 30000 data (as a csv file). The data is like this:dataset <- data.frame(person = c(1331688384,910725927,1479941022,1606882065,1877559309), dahak = c(9,1,4,3,2))...

View Article


Error using using tsbootstrap function from resamplr package

I am trying to run the following code to obtain bootstrapped time series by using tsbootstrap function from resamplr packagelibrary(quantmod) library(resamplr) # get prices symbols <- c("SPY","IEF")...

View Article

Bounds on Twitter rate limits: the `reset` field

In Twitter Developer Agreement and Policy, rate limits are defined. See also: rate limits and rate limiting. (I'm using twitteR in R.) From these documents, I don't understand whether there are limits...

View Article

R Turning several functions to one object using Object Oriented Programming...

I'm trying to understand how to turn functions into object oriented programming in R. So for example, how could the data and 2 functions below be turned into one object using S3 (and then S4)? (Perhaps...

View Article
Browsing all 206045 articles
Browse latest View live


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