Quantcast
Browsing all 205423 articles
Browse latest View live

data procfessing how to know the changes per year, whether has observation...

*I have a dataset, each firm each year has some application number. I want to know whether each year has add or drop application number. firm frimID Application year A 123 a 2013 A 123 b 2013 A 123 b...

View Article


module for inputting csv/tsv/txt files in rshiny

I am developing a R Shiny application which will rely on a module in hopes that I can re-use the module for uploading and displaying two different data sets. As of now, my code works but I think I...

View Article


Market Research Tabulation Reports in R

Does anyone know of a R package that does the same thing as SPSS's Custom Tables? Please note: this is not a crosstab wherein two questions are tabled against one another. Please see Wincross as an...

View Article

Kmeans: Wrong size of clusters

I am running Kmeans algorithm in R on Heart Disease UCI dataset. I am supposed to get 2 clusters with 138 165 size for each like what in the data set.Steps:Store dataset in a data frame:df <-...

View Article

How to make plots from distributed data from R

I'm working with spark using R API, and have a grasp on how data is processed from spark, either when only spark native functions are used in which cases it is transparent for the user or in cases...

View Article


Repeatable Macros in R?

Is there any way in R to write a macro like one would in SAS? That is, I want to write a macro with some input variable (corresponding to a row in a dataset) so I can quickly make a plot of certain...

View Article

Get times on a certain date form list in R

I have a list of times parced with anytime like so:time <- anytime(ACC$Time) The content of that parced list is like this:[1] "2018-12-03 12:36:10 CET" [2] "2018-12-03 12:36:10 CET" [3] "2018-12-03...

View Article

How do I obtain the row number from my value of interest?

Let's say I'm looking for a particular row that contain my value of interest. How would I do this? The row number, not the number of rows.

View Article


Xgboost error : label must be in [0, num_class), num_class=2

Getting this error while implementing XGboost for the titanic problemError in xgb.iter.update(bst$handle, dtrain, iteration - 1, obj) : [03:26:03] amalgamation/../src/objective/multiclass_obj.cc:75:...

View Article


pan, zoom, and move for geom_sf_interactive in ggiraph

Is there a way to pan, zoom and move a map created with geom_sf_interactive? The demo of the package ggiraphExtra has zoomable and movable maps created with ggChoropleth in the intro doc at...

View Article

How to do rowwise computations to dynamically create columns using tidyverse?

imagine I have the following tibble as my data. As you can see there are columns with names like name1.x, and name2.x, but actually there are tens of them sitting in my real data set.MWEtest <-...

View Article

Dynamically reference column name in multiple linear regression (lm())

I apologize if this question was poorly worded, but after hours of searching the web I feel confident in saying this question has not been answered previously. I will do my best to describe in detail...

View Article

How do I fix Error in $: object of type 'closure' is not subsettable

I wrote this Shiny app but sadly there is a problem when using table. I have been working with this for several hours now and thanks to other similiar question I was able to find out that the problem...

View Article


Image may be NSFW.
Clik here to view.

How to show R graph from visual studio code

I installed extension for R language https://marketplace.visualstudio.com/items?itemName=Ikuyadeu.rWhen i run my R code in visual studio code with (ctrl + enter) i get empty window instead of graph...

View Article

Is there an R function to export /convert excel file into text file?

I am trying to find a code for converting an excel file into text file.This is the code for Excel workbook. I want to convert it into text file.template <- loadWorkbook('V:/rcode/template.xlsx')...

View Article


Image may be NSFW.
Clik here to view.

I am looking for the quickest code to generate a table from a data frame...

This question already has an answer here:Aggregate / summarize multiple variables per group (e.g. sum, mean) 6 answersDoes anybody know the cleanest and quickest code in R Studio to create the table...

View Article

R function with dynamic parameters

1. BackgroundI want to optimize my parameters in likelihood function. The likelihood function is a function about parameters given data we collected. The number of parameter is related to model and...

View Article


Error: Invalid input: date_trans works with objects of class Date only; in...

Following is the code where I'm getting this error. Ab_Or_Bl_Med_Netbuy$date is already formatted to date format and Ab_Or_Bl_Med_Netbuy$0_508998_CO, Ab_Or_Bl_Med_Netbuy$1_508998_CO,...

View Article

R Blogdown: how can I hide some specific code chunks?

I'm creating a blog with blogdown in which I compare code from R and code from Stata. I would like:the R code chunks to be visible by default in the article the Stata code chunks to be invisible by...

View Article

Unexpected token error for pipe operator %>% [closed]

After 17 0 lines of code of using the pipe operator without issue, rstudio is suddenly throwing up unexpected token errors for ">" in the pipe command %>%. (s. screenshot). i really dont...

View Article
Browsing all 205423 articles
Browse latest View live


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