Questions tagged [r]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
358 views

Why does Caret featurePlot returns returns NULL?

I am trying to use featurePlot of caret in R. This is the code I am using: ...
0
votes
1answer
13 views

Perform bootstrapping of an ordinary linear regression model, using B=100 bootstrap resamples of my dataset, and getting RMSE

So Im studying machine learning through R, and Im working with the boston data set from the library MASS. I am practicing bootsrapping. I already carried out analysis to determine how ,many distinct ...
0
votes
0answers
6 views

droplevels not dropping anything

I am trying to use droplevels. First I create a subsect of my dataset where the value of attribute Rat must be different from 1 or 5. That value must be a factor. Then, I can see levels are "1", "2", "...
0
votes
1answer
18 views

Is my bayes classification right or meaningful?

I have this dataset and I am learning about Bayes Classifier. After data cleaning, I have tried to use bayes classifier on it. I used R with this code: ...
0
votes
1answer
14 views

Running a query in R after establishing dbconnect

I do not seem to figure out what is wrong it the following statment. The connection to the DWH is establishe but the query statement in R seems not to work, with the following error : ...
0
votes
1answer
60 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: ...
1
vote
1answer
19 views

should we include or exclude a variable in a logistic regression based on the description below?

should we include or exclude a variable in a logit regr. model which will only obtain values if a certain event takes place otherwise will show N/A? this variable tells whether or not a product will ...
1
vote
1answer
124 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 ...
0
votes
0answers
8 views

how to interpret rattle cluster data plot

For example, this plot. It's the data plot of a clustering result.
0
votes
0answers
16 views

What is considered best practice when importing data in a 'pipeline'?

Let's say I have some sort of process that takes data from a CSV that is located on my local machine. This process will eventually need to be scheduled via some cron job. I need to import that data ...
0
votes
1answer
34 views

Median of a list of frequencies [closed]

I have a list of groups and the frequencies of every group. E.g. ...
0
votes
2answers
38 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 ...
1
vote
1answer
50 views

Randomizing selection in R

I am trying to create a comparison group. So far this group contains 45 data points and I need to populate the remaining 55 (for a total of 100 data points). These remaining 55 need to be a ...
1
vote
0answers
37 views

Problem in performing LOOCV

I am trying to run LOOCV on my regression model. I tried to run it in r and encountered the following warning message: ...
1
vote
1answer
25 views

Mirror column plot with different y-axis in ggplot

I am trying to convert this plot Into a mirror column plot I have two datasets: school_purchases recent_school_shootings I am not very experienced with visualisation but this is my approach ...
4
votes
6answers
56k views

How to count observations per ID in R?

I have a large amount of Data where I have to count meassurments per one ID. What I already did was creating a Data Frame over all Files and I omited the NAs. This part works properly. I was wondering ...
0
votes
1answer
38 views

In a Time Series Problem, is it possible to forecast quantities by learning the patterns of other items? What are my options?

Suppose I own a store that sells a variety of apples and I have the following stats each month. Report Date Type of Apple (TA) Quantity Available(QA) Quantity Sold in the Past 30 days(QS30) ...
1
vote
0answers
19 views

Multi Class Perceptron

I'm trying to implement multiclass perceptron in R. ...
0
votes
0answers
12 views

Getting an error when reading a graph into R

I am trying to read network data in R using the following code: g = read_graph('dolphins.gml', format = 'gml') This brings up the following error message: ...
1
vote
2answers
32 views

What's my target variable?

I am beginner in data science. I have this "aids" dataset from "mdhglm" package in R. dataset = aids, info = Repatead Measures on AIDS Data ...
1
vote
1answer
15 views

Memory allocating error with coxph model

I'm working with cox models and as I am adding more variables, I am facing a memory issue. I tried to subset my dataframe by selecting columns which have variables of interest but even then I am ...
1
vote
1answer
318 views

SMOTE for regression

I am looking into upsampling an imbalanced dataset for a regression problem (Numerical target variables) in python. I attached paper and R package that implement SMOTE for regression, can anyone ...
0
votes
1answer
24 views

Is it appropriate to run correlation on continuous y value with discrete x value?

I am dealing with temperature data that are measured in different distances away from the forest edge (0m, 10m,30m,50m,80m) and I would like to find out whether the temperature will drop as the ...
3
votes
1answer
308 views

k-Nearest Neighbours with time series data - how to obtain whole-time-period estimators

I have a large dataset for the activities performed by multiple staff in a factory over a long period of time - 01/01/2017 - present. The activities performed by different staff are recorded at each ...
0
votes
2answers
19 views

Leave - one - out - Cross Validation KNN R

I have a dataset and I divided it into test data and train data. Can anyone suggest how to perform LOOCV for KNN regression? Is there any library? ...
2
votes
1answer
214 views

Missing population values in census data

I have population data from Census.gov: Total US population by age by year from 1940 through 2010 Depending on the range of decades, the data is missing discrete population values for ages greater ...
0
votes
1answer
544 views

Error loading tidyverse in R Studio - No broom package

I'm getting numerous errors when trying to install packages, namely tidyverse and ggplot. The error is of the form are always in the form: ...
0
votes
1answer
34 views

Does Python have R's tidytext equivalent?

I can't seem to find a tidytext (R library) equivalent in Python. Text mining in Python seems quite weak compared to R.
0
votes
1answer
34 views

Merging three different customer segmentation systems into one

I have been given a task where I have three existing customer segmentation systems (rule based e.g. if customer spends X in Y amount of time AND whatever then put in top spender segment is one segment,...
1
vote
1answer
44 views

Relating changes of a value in time to known events

I work with two datasets. The first dataset contains fluor values measured every minute. The second dataset contains certain events and their time. We know that these events cause peaks in fluor ...
1
vote
1answer
27 views

Regime detection to identify transitions between habitats

The following figure represents the concentration of a substance (referred to as Element in the code) measured in an organism throughout its life. There are ...
0
votes
0answers
27 views

R: Rates of change from an initial value

I have a collection of csvs and must produce yearly rates of change per group within each csv, as well as a rate of change compared to the initial value. I am using the function below to calculate ...
0
votes
1answer
14 views

How to run a model stored as a .Rda file?

I am using an already written R code which has a line of code as shown below ...
0
votes
0answers
14 views

Same values for PCA Loadings results

I've recently performed a Principle component analysis for my masters thesis where I have 25 network datasets, formatted into graphs and applied 5 measurements to each graph. The measurements were ...
3
votes
1answer
9k views

Plot of ACF & PACF

There are 96 observations of energy consumption per day from 01/05/2016 - 31/05/2017. I am trying an ARIMA model in R to be fitted to these time series observations. I have chosen the frequency of ...
0
votes
0answers
37 views

Multioutput classification: How do I get probabilities of continuous dependent variables?

I'm new to ML and want to try several methods on my data set to compare it and develop a better feeling for the individual approaches. My data set has several independent variables which I want to ...
0
votes
1answer
480 views

faster alternatives to sparse.model.matrix?

I have a large dataset that is entirely categorical. I'm trying to train with it using xgboost, so I must first convert this categorical data to numerical. So far I've been using sparse.model.matrix() ...
0
votes
1answer
530 views

Coloring labels using scatterplot3d in R

I am trying to visualize data using R and scatterplot3d. I have loaded data and used: ...
3
votes
2answers
79 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
7 views

Plot ROC curves in R conditional on a fixed-effect

I have a model of the form mylogit <- glm(y~x+as.factor(year)+as.factor(city), data=d, family="binomial") How can I plot the ROC curve (or get the ROC score) ...
1
vote
2answers
76 views

I want to be able to collapse and sum values dependent on the gene name

I have a table that looks like this: I want add together all the values for each gene for each column. For example, for LINC01128, it should read: ConN1 ConN2 ConN3 StN1 StN2 ...
1
vote
2answers
30 views

Clustering on categorical attributes

I have a dataset with only 2 categorical attributes out of 9. How can I get a clustering analysis on it? I am using R. Do you have any advices about instructions, how to do it, topics, ...? here's my ...
0
votes
0answers
13 views

What is meant by coefficient of determination? Further, is there any difference between r and muliple correlation coefficient?

In the article, Daniel J. Ozer says I demonstrate that D'An￾drade and Dart's conclusion does not require rejecting the variance as a measure of varia￾tion. I describe instead a second model for ...
0
votes
0answers
11 views

PCA and clustering, regression tree with categorical attributes using R

I am trying to analyze a dataset which has 7 categorical attributes out of 9. Can you please help me? I don't know how to find right instructions to do it. I only learnt how to do it with numeric-only ...
0
votes
1answer
24 views

breaking joined words into meaningful ones during text mining

I'm performing an aspect-based sentiment on consumer complaints. I'm tokenizing at the sentence level. ...
4
votes
2answers
630 views

How can I use two different datasets as a training model for svm

I know that you're supposed to scale your test data using the parameters (mean and stdev) from your training data. This is relatively simple; but what if the number of samples is limited in one ...
1
vote
1answer
47 views

Trouble doing a simple Box Plot

This is a problem that I keep having when trying to do a boxplot in R. From what I can see the code I am using should work, not ...
0
votes
1answer
29 views

Test data for statistical t-test in Python

first of all sorry if this is not the proper place to ask but i have been trying to create some dummy variables in order to run a students t-test as well as a welch t-test and then run a monte-carlo ...

1
2 3 4 5
25