Quantcast
Browsing all 206126 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

I have a geom_bar that I want to organize but cannot seem to figure out how

I have a set of a data I'm working on but can't seem to organize the bin size of my datavgsales %>% ggplot(aes(User_Score)) + geom_bar() The bins are all crowded and not sure how to make them look...

View Article


Set column names conditionally using dplyr

I want to set column names based on the number of columns.For example,#iris1 <- iris[,1:4] if(ncol(iris)==4) colnames(iris) <- c("a","b","c","d") if(ncol(iris)==5) colnames(iris) <-...

View Article


Very slow or failing xls data extraction in R [functions read.xls, read_xls,...

I have multiple .xls (~100MB) files from which I would like to load one sheet (in fact, just one column of numbers) into R as a dataframe. I have tried various functions, such as xlsx::xlsx2 and...

View Article

Image may be NSFW.
Clik here to view.

How would I split a PCA analysis histogram that show the number of main PCs...

I have performed PCA Analysis using the prcomp function apart of the FactoMineR package on quite a substantial dataset of 3000 x 500. I have tried plotting the main Principal Components that cover up...

View Article

Is there a way in R to add comma's to incorrect JSON format?

I'm trying to work with a JSON file in R, but unfortunately the JSON file is unreadable by jsonlite in its current state. It's missing commas between the objects(arrays elements?). My objective is to...

View Article


Ifelse function with multiple conditional Outputs [duplicate]

This question already has an answer here:Convert continuous numeric values to discrete categories defined by intervals 2 answersLet X be the vector 1:100. I want to create a new vector that assigns the...

View Article

Image may be NSFW.
Clik here to view.

How would I generate matrices to represent the variants of "R" in these...

I am essentially trying to make my own code for the nonpartest() function in the npmv package. I have a dataset: Cattle <- read.table(text=" Treatment Replicate Weight_Loss Persistent Head_Size...

View Article

How can I install R in Linux server? When I run the ./configure command I am...

I want to install R in Linux Server. I was going through the site: https://cran.r-project.org/doc/manuals/r-release/R-admin.html.When I run the ./configure command I am getting the...

View Article


linear regression model using R

I am a novice in R but am trying to learn. I have a dataset in excel and i import it in R using:stockPrice<-read.csv("C:/Users/Desktop/prova.csv", sep=";", header=T, check.names = FALSE,...

View Article


error: --with-readline=yes (default) and headers/libs are not available

I am installing R. I am getting this error when runing ./configure :checking for history_truncate_file... no configure: error: --with-readline=yes (default) and headers/libs are not available Any hint,...

View Article

R - Identical values in columns of dataframe in one row

I have a data frame containing 3 columns of non-integer values. The values in the respective columns allot of the time will be identical to values in the other one or two columns in the same data...

View Article

Image may be NSFW.
Clik here to view.

K-Means clustering in R error NA/NaN/Inf in foreign function call

I have a dataset that I have created in R. It is structured as follows: I am trying to cluster the observations using k-means. However, I get the following error message: > cl <- kmeans(sample,...

View Article

R install.packages polyclip: where is config.log? No answer in prior posts

Attempting to install R package ggforce encountered following error installing dependency polyclip which referred me to config.log. However, config.log is not found below ~/, /tmp, or /var/log I...

View Article


Image may be NSFW.
Clik here to view.

Automatic fill in of missing dates in R for irregular datestamps

I have multiple time series datasets to analyze. In order to analyze I have to do preprocessing. One troublesome task is to identify irregualar missing rows and insert rows of NAs.So far, I did this...

View Article

couldn't add legend to ggplot

I'm trying to add legend to the ggplot, and here is what I've tried (the data is just 3 simple columns of numbers.).ggplot(data, aes(x = instant, y = cnt))+ geom_point(aes(instant, cnt), color =...

View Article


R grid arrange tiff microscopy RGB

I have a RGB tiff files (from cellProfiler) which I want to import to R, label and arrange - as part of a high throughput analysis. The closest I get is using: library(tiff) library(raster) imageTiff...

View Article

R spread the rows into columns [duplicate]

This question already has an answer here:spread for duplicate identifiers [duplicate] 1 answerSpread with duplicate identifiers (using tidyverse and %>%) [duplicate] 1 answerThis is part of my data...

View Article


resolving singular fit error of mixed model in R using lme4

I'm working with a dataset that I have already analyzed using GLMs. I want to use a LMEM, for which I have a random effect (species name) with seven different values (levels). I think the model is...

View Article

cannot install tinytex package. (Maybe the repository setting should be...

im using R and quite new at rmarkdown. i want to knit my rmarkdown into pdf formatted file and i already read that i need to install tinytex package. i enter the code as instructed on...

View Article

“Error in sys$stdout$flush() : attempt to apply non-function”

I am trying to use the "reticulate" package in R to run python code in my R script. I have tried to run very simple commands just to see if it is working, and I get the following error every time....

View Article
Browsing all 206126 articles
Browse latest View live