Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [r]

R is a free, open-source programming language and software environment for statistical computing, bioinformatics, and graphics.

0
votes
2answers
25 views

White noise seasonality

Is the above graph a white noise? I'm confused by the spikes at certain places. The above plot has been obtained after doing a first order differencing on a time series. How can I justify whether ...
0
votes
1answer
24 views

Preparing dataframe to carry k-means clustering [on hold]

Im trying to apply 3 different algorithms of clustering on my dataset. to check which one fits the best. I'm confused how should I convert my dataframe -k-means -DBSCAN -hierarchical clustering ...
1
vote
0answers
16 views

LASSO Regression using Panel Data

I have panel data for 3 countries, ranging over 3 years. The dataset is called CarProduction ...
2
votes
1answer
23 views

how to implement a hierarchical clustering technique using parallel execution in R

In R, currently to implement wards method for hierarchical clustering, I use the following code - results <- hclust(data, "ward.D2"). However as my data size has ...
0
votes
0answers
32 views

Practical use of bootstrap in R

I am a beginner and try to perform a bootstrap in R. It would be nice if somebody could help me with the following situation. I have defined prices and I want to randomly generate quantities (given a ...
1
vote
1answer
23 views

Different t-test results from R and LibreCalc

while I was trying to apply one-tailed t-test to two vector of data on R, I just wanted to apply same thing on librecalc also and then I noticed that p-values are different. Here is a summary what I ...
3
votes
2answers
31 views

How do Data Scientists integrate Predictive Modeling with SQL?

I've heard a lot about the importance of knowing SQL but how do you guys at the larger firms integrate your software for modeling/analysis with the server that holds the data? Do you simply access ...
1
vote
2answers
34 views

Extracting data from a data frame with conditions

Given the first data frame consisting of 4 columns ...
1
vote
0answers
37 views

Why are pandas/R/etc so common in a data scientist or analyst's workflow when one can resort to UDFs in an RDBMS?

It seems common for an analyst to have this workflow when using an RDBMS: use SQL to get a subset of data from the database, export it or use a connector, and then apply a data mining / model ...
0
votes
2answers
54 views

How should we manage large database

We currently manage a large volume of economic data in Excel in my organisation. All of the data is downloaded from different online databases into Excel spreadsheets (one for each data frequency ...
2
votes
2answers
29 views

Is ARIMA appropriate for time series prediction involving a mix of explanatory and independent variables?

I have a table with the following columns: Date(Month,Year), Sold_Past_Month, Quantity_Available, Quantity_Shipping_In, Missed_Sales, Quantity_Needed Quantity_Needed is the dependent variable that ...
0
votes
0answers
12 views

Count and summarise ID's each day while creating a new column that shows the accumulated ID's

Good afternoon community, I am quite new into the R programming language so excuse me if my description of the problem might be a little of. PROBLEM: I have two column, first one being the ID of a ...
0
votes
0answers
25 views

Wrong calculation of feature importance of decision tree in R

I trained decision tree both in python and R, but I think the way feature importance is calculated in R may be wrong. Following is the sample code which you can use to reproduce the problem. Let's say ...
0
votes
0answers
40 views

Running into strange errors when using glmnet and generating graphs

I developed a very simple Ridge Regression with glmnet, the R package. When I use the plot.glmnet() function I encounter strange errors: ...
0
votes
0answers
28 views

Time-series forecasting

Here is the data: ...
3
votes
2answers
29 views

Rearranging data frame from column names to key value pairs

If I have data like this in R: > a = data.frame(a = c(1, 2), b = c(3, 4)) > a a b 1 1 3 2 2 4 but I would like to have it like this: <...
1
vote
1answer
29 views

How to do webscrapping in R on this webpage? [closed]

I am quite new to R and I am trying to learn webscraping. I basically need to extract documents from this website. Ideally, the data needs to be structured in three columns: YEAR, DATE, and ...
0
votes
1answer
30 views

Extract or subset hundreds of columns from a data frame

I need to extract many columns from a dataset. I have a very large csv file with thousands of columns and rows, and I read it into R using: ...
0
votes
1answer
13 views

Amazon Cloud Image istance most suited for R data mining

I'm new to the field of machine learning, I always used my laptop for regular statistical analysis with no performance problems. Though lately I started programming with caret and I find myself stuck ...
0
votes
0answers
6 views

caret dummyVars on unseen data

I created my dummy variables, trained my model and tested it as below: ...
0
votes
1answer
11 views

Setting input shape for an NLP task in R(Rstudio) using keras 1D convolution layer, when it expects 3 dimensional input (a tensor)

I am using R programming language and using Keras API to build a functional 1D CNN. I have a matrix of my dataset of the following shape rows*features (6000*1024). The input layer is set using the ...
0
votes
0answers
26 views

How to write a predict function for mlr predict to upload in AzureML as webservice?

I am trying to upload a R Model in AzureML as webservice, for the linear model like Regression I use ...
1
vote
0answers
17 views

How to set kernel size (height and width) for 1D convolution layer in CNN Keras R API for doc2vec input?

I am using a doc2vec matrix (6000,1024) as feature space to input in a classification model which can categorise each document(sentence in my case) into one of the two classes (A,B). My feature space ...
0
votes
0answers
24 views

Multi-label text classification (3 targetted result columns)

I am trying to build a multi-label text classifier for suggesting "AC_location", "Issue" and "Part_Affected" on the generated events. The textual data is full of ...
0
votes
2answers
26 views

Reading Date Time in R (01.01.2019 00:00)

How do you read a date in R that is given in the following way: 01.01.2019 00:00 While reading it with read.csv("my_file.csv", sep = ";", dec = ",") I am getting ...
0
votes
1answer
27 views

Append and replacing data in r

I am writing a few lines of codes to create a data table full of NAs but don't know how to append the data of results into the data table I created while replacing the position of NAs. Here is my data ...
0
votes
0answers
15 views

Logistic model for Continuous data using uniform quantization

Would anyone have know where to find information about running a Logistic model for Continuous data in R or SAS. I need to run this type of model on a dataset with the number of levels 4, 8, and 16.
4
votes
1answer
72 views

On the choice of LSTM input/output dimension for a spatio-temporal problem

I am using LSTM neural networks from (R)Keras for a matter of spatio-temporal interpolation. I manage to get the network to output predictions but the results are not outstanding (very little ...
2
votes
1answer
38 views

Difference in model performance measures of train and test data sets

I am using CART classification technique by dividing a dataset into train and test sets. I have been using Mis-classification error, KS by rank ordering, AUC and Gini as MPMs(model performance ...
2
votes
1answer
25 views

How to approach clustering of time-series with a single variable

Let me preface this by saying that I'm a complete beginner to R and data science in general, so my apologies if this is a rather trivial question. I do have a rough idea of what I would like to ...
0
votes
0answers
18 views

label propagation on R graph

I want to run the algorithm label propagation (Xiaojin Zhu(2005),Semi-Supervised Learning with Graphs ) on a retweet graph in R. I have found that exist several functions for similar tasks as: label....
1
vote
0answers
29 views

Kappa Goes up as Accuracy Goes Down

I have recently been trying to train a randomForest model on a binary outcome with a very uneven class split. 282 control ~82% 63 case ~18% There are a total of 147 predictors that I'm testing for ...
0
votes
2answers
38 views

Loops in R programming,

I want to update this Remaining column in this table below: How do I do this in R programming? I tried while (n.Remaining>0) { n.remaining <- n.total-n.expense} Desired Output:
1
vote
0answers
53 views

How to model non-linear demand function?

I am trying to build a dynamic pricing algorithm on intermittent data (a lot of zeros between non-zero values). I have on average 100 non-zero data points for each product. However, it seems to be ...
0
votes
1answer
24 views

How to make a dataframe with lists or vectors as its elements

This is something I have been wondering for ages but I am never able to get an answer. I am trying to understand how to make a dataframe in R, where each element of the dataframe is itself a vector ...
0
votes
1answer
16 views

Using the Stanford Named Entity Tagger in R [closed]

I am experimenting with the Stanford Named Entity Tagger here http://nlp.stanford.edu:8080/ner/process and I feel it would be useful in my research. Does anyone know of a example that I could follow ...
0
votes
0answers
15 views

What does this residual-fitted value plot show?

I am trying to fit a linear regression model, where my Y and X variables are all continuous. I have applied a vanilla linear regression in R, and I am trying to understand if the model fits all the ...
2
votes
1answer
40 views

How to define a custom metric function in R for Keras?

I just started using keras and would like to use unweighted kappa as a metric when compiling my model. Following the instructions from here, I tried to define my custom metric as follows: ...
1
vote
0answers
18 views

Better way to graph percentage of One Categorical Variable by another in R

Looking through the Brfss 2013 dataset (a study that recorded many elements of an observers health habits and outcomes), I wanted to see if there was a correlation between smoking often and being an ...
3
votes
0answers
36 views

Fitting model to differenced time series

I have a time series on daily stock price of company(2013 data points).I took a first order difference and the following acf and pacf plots of the differenced series were obtained. However, I am ...
1
vote
1answer
36 views

Importing Excel format data into R/R Studio and using glmnet package?

I have no problem importing Excel formatted data into R/R Studio and use all other R packages that I use. But, when I want to use the glmnet package to develop a regularization model, I invariably ...
1
vote
1answer
30 views

How R performs the operations like Inf + Inf, Inf * Inf, Inf - Inf and Inf / Inf?

In R When we do some operation like Inf + Inf, Inf * Inf gives Inf back, whereas similar ...
1
vote
1answer
22 views

R Combine Multiple Rows of DataFrame by creating new columns and union values

I have a dataframe in R that looks like this ...
0
votes
2answers
42 views

Dataset Merging

I have several datasets (All looks like this). The Problem is, that the same user is on several datasets. I need to merge the different sets in a way, that if the username is the same, the frequencies ...
0
votes
0answers
35 views

Autoencoder in R

I am new in neural network and trying to replicate autoencoder in R from https://statslab.eighty20.co.za/posts/autoencoders_keras_r/ I received an error when executing this line: ...
0
votes
0answers
32 views

Working with Stanford twitter datasets in R

I intend to use frequency data and sentiment analysis on the Stanford twitter data. I have a couple issues though. One is the size of the data, which I want to reduce, but how do i do this? A ...
0
votes
1answer
23 views

LDA as a dimensionality reducer [closed]

I know how to use LDA as a classifier. But how to use Linear Discriminant Analysis as a dimensionality reducer to reduce the number of features and apply logistic regression on top of it. I am using R ...
0
votes
1answer
85 views

How to resolve “invalid number of 'breaks'”

Code: f_custdata <- gsub(".", "", f_custdata) f_custdata <- as.numeric(f_custdata) hist(f_custdata) Error: Error in hist.default(f_custdata) : ...
1
vote
0answers
38 views

Creating word cloud with positive and negative words

Have already load in the lexicon to score my tweets. How do I create a word cloud for the tweets that are negative only? ...
0
votes
0answers
35 views

unused argument error in R

Hi I'm running this code on R studio: datasetrmna <- read_xlsx('datasetrmna', header = TRUE, sep = ';') and I get an error saying unused argument. ...