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

Select columns when reading in files with st_read

I am trying to read 39 json files into a common sf dataset in R. Here is the method I've been trying:path <- "~/directory" file.names <- as.list(dir(path, pattern='.json', full.names=T)) geodata...

View Article


increase the maximum possible payload size for deployr server (hosted via...

I have a service hosted by deployr. I am getting a connection reset by peer error. I know my payload size is above 2MB - the default limit as mentioned by Microsoft...

View Article


How can I download "Afinn" and "NRC" lexicon in R?

I'm trying to get_sentiments("afinn") and the "nrc" but I get this message: Error: The textdata package is required to download the NRC word-emotion association lexicon. Install the textdata package to...

View Article

how to set the x-axis of barplot

This has been questioned many times like this one X axis in Barplot in Rhowever none helped me to solve my problemdt<- structure(c(79L, 54L, 37L, 41L, 42L, 121L, 134L, 169L, 23L, 19L, 22L, 19L,...

View Article

Subsetting data by a unique ID

I try to subset data based on an ID (can be any number) and one condition. An example could be; I have several cars with a different number of cilinders and a different number of carburetors. I want a...

View Article


Transform numeric vector to specific length n R

I have numeric vectors of different lengths and want to "standardize" their length to, say, 100 to make them comparable and transform the raw signal to a smoother version.I do need control over the...

View Article

How to run a R script in a remote way?

I need to execute a R script. It's takes ~2 days to run on my machine and it's very costly. Is there some service that I could use to run it remotely in a machine supplied by third parties? It's a...

View Article

R: Need an efficient way to convert coloured utf-8 emoji characters to their...

is there any efficient way to get rid of colored emojis from vectors and make them to their standard form? Please see two output for instance, I maybe not using appropriate terms. Currently I am doing...

View Article


How to I convert coordinates keeping all the info from the dataframe

I have a list of coordinates in Lambert78 coordinate system which I want to convert to WGS84. I want these converted coordinates added as 2 additional columns to my dataframe so I can keep labelnames....

View Article


How to remove duplicated values in uneven columns of a data.table?

I want to remove duplicated values in each coulmn of an uneven data.table. For instance, if the original data is (the real data table has many columns and rows):dt <- data.table(A = c("5p", "3p",...

View Article

R sf: Points of LinearRing do not form a closed linestring

I am trying to calculate the centroids of a set of polygons. My dataset, geodata, contains five columns including one geometry column of class sfc_GEOMETRY, with 45759 rows. When I run...

View Article

How to separate time and date from columns

I have a dataset df. It has a column that has both date and time. Can we separate thisdf ColA ColB A 2020-01-17T03:30:37-05:00 B 2020-01-17T03:30:38-05:00 C 2020-01-17T03:30:39-05:00 Expected outputdf...

View Article

R Plotly: How to change position of tick text in horizontally oriented...

I have a bar chart that is horizontally oriented and it's flipped (autorange = 'reversed') so its base is on the right side. My problem is that ticktexts for Y-axis stay on the left side, where the...

View Article


R - how to get data into block form for friedman test?

enter image description hereI have some data relating to levels of a chemical in the blood before and after treatment and there are 4 treatment groups - ABCD. I have been told I can run a Friedman test...

View Article

Using Dplyr /SQLite to perform un-nest values in one column and create...

I currently have a Rsqlite db set up on disk with the following table: id_no | website_link 1 | google.com msn.com gmail.com 2 | stackoverflow.com reddit.com 3 | msn.com Two columns are: id_no = gives...

View Article


How could I save a pixmap plot in R as a ".pgm" file?

I have generated a number of pixmapGrey files in rstudio, and I would like to save their plots as pgm images.I am aware that one option is to save the plots as JPEG, PNG, TIFF, and BMP then, convert...

View Article

Is there method in R to replace values in one data frame with a related value...

I need to replace the values in one data frame with values from another data frame. I am trying to find the simplest way to do so but I may be over thinking it. Here is a sample of the data from DF1:...

View Article


How to pass a dataframe column as an argument in a function using piping?

I'm messing around with the built-in dataset economics in R, and I'm trying to pass a dataframe column as an argument in a function that uses piping (dplyr, %>%). But I'm experiencing some seemingly...

View Article

Plot mean and standard deviation by category

I'm trying to plot a plot with mean and sd bars by three levels of a factor.(After two hours of searching on the internet, then checking the Rbook and Rgraphs book I'm still not finding the answer. I...

View Article

problems with ranged values and geom_bar

I'm trying to get a stacked bar plot, but (I think) the problem is, that I have ranged y-values:Punkt Tiefe Zersetzungsgrad JE1 000-050 H10 JE1 050-100 H10 JE1 100-150 H6 JE1 150-200 H6 JE1 200-250 H5...

View Article
Browsing all 206180 articles
Browse latest View live


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