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

Image may be NSFW.
Clik here to view.

How to make R Markdown links with boxs like LaTeX document?

First, I have a .Rmd file using knitr to generate a pdf, it only contains a link:--- title: "My Title" author: "my name" date: "2020/2/6" output: pdf_document linkcolor: blue urlcolor: blue citecolor:...

View Article


Image may be NSFW.
Clik here to view.

How to automatically define the height of a horizontal line from a...

I am trying to add a horizontal line above this density plot using the geom_segment, however the arguments of this function request y and yend. Since - depending on the SD - the height of the curve can...

View Article


How to convert from CIE XYZ to Munsell and back in R

I am trying to implement a conversion from the CIE XYZ color space to the Munsell specifications, using the package munsellinterpol in R (to my knowledge, this package is based on the Kubelka-Munk...

View Article

R - Counting total occurrences of word from list that appears in data frame,...

I have a data frame like this:ID Word 1 Tree 1 House 1 Tree 2 Snail 2 Tree 3 Car And I have a list of keywords I want to check for:(House, Tree, Bird) I want to know how many times for each ID, any...

View Article

Sum values for overlapping dates for each ID

Here is the question which I found is very similar to mine, but the start dates and stop dates can be same sometimes (Find overlapping dates for each ID and create a new row for the overlap). I want to...

View Article


multiple (R) plotly figures generated in a rmarkdown (knitr chunk) document

I try to create multiple plotly figures in a Rmarkdown document using loop or lapply.The R script:require(plotly) data(iris) b <- lapply(setdiff(names(iris), c("Sepal.Length","Species")),...

View Article

For loop over dygraph does not work in R

There is some strange behavior on dygraph.When using a for loop for dygraph i get no result. library(dygraphs) lungDeaths <- cbind(mdeaths, fdeaths) for(i in 1:2){ dygraph(lungDeaths[, i]) } On the...

View Article

How can this normal table be modified to work properly with R?

I have a large table with different columns and some rows. The columns represent different characteristics of each row. The row are my different items i would say.The overall buildup or relevant...

View Article


How to get 0-padded binary representation of an integer in R language

How to Generate a function in R that translates integers into a binary vector for length K, for example, if I have integer n=3 and length is K= 7the output is 0000011? I generate this function but I...

View Article


R -- Shift Multiple Rows in a Data Frame Without a Loop

I was wondering if there was any way to perform this shift of rows without a loop in R? I have data from a machine that performs sequential jobs of varied length. I want to shift the data so that there...

View Article

Assigning value to variable in R with string pattern matching

I have to detect Name: and assign the value to any variable. I am trying to use str_match, but it takes only Sunilx = c("Name: Sunil Raperia ") xx = str_match(x, "Name: (.*?) ") xx I want to assign...

View Article

Question regarding using function c() in R coding

I am studying Data analyitcs, my teacher give a question for class "using one-sigma to find any outlier in vector D". He gave his answere as below but I do not understand why he called Out=c() before...

View Article

Image may be NSFW.
Clik here to view.

Heatmap/Contours based on Transportation Time (Reverse Isochronic Contours)

Note: A solution in python would also work for me.I am trying to draw contours based on transportation time. To be more clear, I want to cluster the points which have similar travel time (let's say 10...

View Article


Image may be NSFW.
Clik here to view.

Mutate column in R

Please help. I was trying to mutate a column for the average speed, using two columns from the data frame. The new column is actually showing in the output but nit in the table viewer. While calling...

View Article

Image may be NSFW.
Clik here to view.

Text as Variables with different elements In R

So I'm a beginner, I'm trying to make a data chart in r. So I have the obesity and GNIPerCapita as my x and y. Both of them are classified as Low income, High income, Lower Mid, Upper High Income,...

View Article


Image may be NSFW.
Clik here to view.

How to make R Markdown links with boxes like LaTeX documents?

First, I have a .Rmd file using knitr to generate a pdf, it only contains a link:--- title: "My Title" author: "my name" date: "2020/2/6" output: pdf_document linkcolor: blue urlcolor: blue citecolor:...

View Article

Modifying line of reference for annual data

Having a data set called "data", and using the openair package, I created a timePlot using the following code:a=timePlot(data, pollutant="pm2.5", type="site", avg.time="24 hour", plot.type="s",...

View Article


Am I using xgboost() correctly (in R)?

I'm a beginner with machine learning (and also R). I've figured out how to run some basic linear regression, elastic net, and random forest models in R and have gotten some decent results for a...

View Article

How to split a string after the nth character in r

I am working with the following data:District <- c("AR01", "AZ03", "AZ05", "AZ08", "CA01", "CA05", "CA11", "CA16", "CA18", "CA21") I want to split the string after the second character and put them...

View Article

Optimizing parameter values using non-linear least squares in R (with integrals)

Obviously an R (and math) amateur. I've been working 10+ hours on trying to get this to work, so I thought I'd attempt posting here as a shot.I have data collected from an experiment with two...

View Article
Browsing all 201839 articles
Browse latest View live


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