Stack Exchange Network

Stack Exchange network consists of 174 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
1answer
11 views

Grouping and summing with r

I have a data.frame that contains two columns that I want to group and sum the direct labor for employees. ...
0
votes
0answers
8 views

R - What's the machine learning/non-machine learning way to identify points from intersecting lines in an image?

Let's say I have a image of several intersecting lines (left). Is there a way for R to detect where the lines intersect and overlay points on them (right)?: The goal is to import an image of fish ...
0
votes
0answers
14 views

Predict on sparse categorical data

I have an xgboost model trained on a sparse matrix of a mix of categorical and numeric variables. Passing new data to have the model evaluate doesn't always work because when that new data is ...
0
votes
0answers
18 views

How can I extract bootstrap generated datasets into individual dataframes?

I am having a bit of trouble understanding Bootstrapping and what/how I can manipulate the bootstrap created dataset. This is all in R My original dataset is structured like this: ...
0
votes
0answers
18 views

How to compute a rate equation on bootstrap datasets

I am having a bit of trouble understanding Bootstrapping and what/how I can manipulate the bootstrap created dataset. My original dataset is structured like this: ...
0
votes
0answers
11 views

converting sql to width bins in r

I want to create a histogram out of the range of a column named surfacearea with country data frame. I made an sql file ...
0
votes
1answer
19 views

finding the percentage > x with r

Trying to locate the names of countries in my data.frame where the most spoken language is not an official language. My columns data.frame is World. The column <...
0
votes
0answers
9 views

Working on calculating the correlation and covariance between attributes

Calculate the correlation and covariance between two attributes data.frame is country, two columns are surfacearea and population. My code is: ...
0
votes
0answers
14 views

Trouble with grouping by and counting in r

I have a data.frame called world. This data frame lists countries in column name.y, I have a column for languages named languages. I need to List the names of countries where more than 4 languages ...
0
votes
1answer
31 views

error trying to build a histogram using r with the rStudio application

Using ggplot2 I am attempting to create a histogram. I have a column that is full on the continents. I need to add all the continents which I attempted to do with the aggregate function. ...
1
vote
1answer
24 views

RNN package and problems with “Predictr”

I have two questions about how to use R's RNN package, specifically the trainr and predictr functions. Let's suppose I have a time series of 4000 steps for 5 different variables. How should this be ...
0
votes
1answer
14 views

found \N in my data does not count as missing values in r

So scrolling through my columns I find \N embedded. I need to count them, but I get an error. Would it be considered a missing value, it's new to me. ...
-1
votes
1answer
18 views

Looking for second opinion on checking that attribute in data frame is unique using r

Check whether attribute name in city is unique (i.e. each city has a different name). data_frame is city with a column called name. ...
1
vote
1answer
126 views
+50

Select behavior dependant with other factors and its formalization

I'm studying occurence of Behavior11, Behavior12,Behavior2,...
-1
votes
1answer
21 views

rStudio changing lower case to upper case

trying to convert column from lower to upper not working #Change all city name in city to uppercase. city %>% `colnames<-`(tolower(names(name))) %>% head
0
votes
1answer
19 views

merging 3 csv files with r

I have 3 csv files I would like to combine with rStudio, but get an error. Any assistance is appreciated. code looks like this. ...
1
vote
1answer
65 views
+50

A few questions to understand a random forest blog

I'm trying to understand a nice blog on the trade-off between sensitivity versus specificity with the random forest and logistic regression models. I have a few questions: 1) The blog used a 10 fold ...
0
votes
0answers
21 views

which algorithm to use for classification

I am a student and for this question is for my project. I have a dataset with 45000 rows, 16 variables + class variable. The classification is a binary classification with Yes and No. the problem is ...
-1
votes
1answer
28 views

How can I run tidyverse package? [on hold]

I installed the package "tidyverse", but when I am trying to run it, it give me this answer: package or namespace load failed for ‘tidyverse’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck ...
-1
votes
0answers
6 views

Clustering using subtractive clustering technique in R [on hold]

can anyone please help to perform subtractive clustering technique in R with an example
0
votes
1answer
11 views

Mutate with custom function in R does not working

I have a data frame, containing a column "Frequency". Freaquency column has value like "Year", "Week", "Month" etc. Now I want to create a new column based on Frequency column where "Year" ...
0
votes
1answer
28 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
18 views

Caret + RStudio: Error “Please make sure `y` is a factor or numeric value” when training

I'm new to Caret and I've been trying a couple things to get the hang of things. But this error happened to me and I'm not sure why. I've been trying to train a model with some data I got from "...
1
vote
1answer
47 views

R mice doesn't give a 'valid' sollution

EDITED: See below for additional information.. TL;DR: How can I add missing data in a dataset like the sample in a way that it doesn't deviate much from the original dataset. ORIGINAL: I have a ...
-1
votes
1answer
24 views

Error while using predictive modeling [on hold]

I want to know that which model to use for predictive analysis if both my independent and dependent variables are categorical. Thank you.
1
vote
1answer
16 views

How to make a Power Spectral Density Plot in R

I have a time series point process representing neuron spikes. I have computed and plotted autocovariance using acf but now I need to plot the Power Spectral ...
0
votes
0answers
15 views

Choosing model for predictive analysis in R

I have a quick question here: I am new to R and have used titanic dataset for predicting the survival rate using random forest model, SVM. Also the "Survived" Variable has only two values(Yes or No). ...
-1
votes
1answer
28 views

How to Plot a two line graph out of three tabular columns in R

This definitely not what I wanted. I'm learning to plot, but I want my x value to be dates and my y value to be line graphs telling the story of projected vs performed values. So far here is what I ...
1
vote
1answer
33 views

removing percentage signs with rStudio

I am learning rStudio and have a tutorial that wants me to remove the percent sign. The code they want me to use is: ...
1
vote
1answer
21 views

error length > 1 and only the first element will be used?

I'm new i data mining and R, and i'm working with a dataset and trying to remove the "white space" elements. i tried to create a function to do that. ...
2
votes
1answer
47 views

Visualizing word embeddings

I am working on a text-classification problem, and trying to understand how to work with the tensorboard projector for an embeddings layer in Keras. Borrowing an example from the Deep Learning with R ...
0
votes
0answers
16 views

Is there anything like an GUI/IDE for data science - automatically generating graphs and statistics etc?

In software development, IDE's (interactive development environments) help programmers by automatically generating a lot of useful stuff while debugging - variable values, call stacks, call graphs, ...
2
votes
1answer
42 views

Binary classification model with time series as variables

This is probably a simple question. Assume I'm interested in modelling a binary variable, with various covariates, including ones that are time series observations. In the usual modelling approach, ...
0
votes
0answers
11 views

LDA topics and differences between groups

I´m using Topicmodels(R-Package) and I want to observe differences between groups (I have a variable named "age groups"). I have thousands of customer reviews and now that I have 30 topics using ...
1
vote
0answers
43 views

Using a custom R generator function with fit_generator (Keras, R)

I'd like to train a convolutional network to solve a multi-class, multi-label problem on image data. Due to the nature of the data, and for reasons I'll spare you, it would be best if I could use a ...
1
vote
0answers
24 views

How can I create a function that returns a vector in R? [migrated]

I want to create a function that returns its result as a vector. More specifically, a function that returns the divisors of an input value and places them inside a vector. ...
1
vote
1answer
68 views

SVM model classifying into one class only, after standardization

I'm trying to use SVM in R (e1071 package) to classify samples as normal or tumor. I have two separate data sets - Training (~50 samples, 100 features) and Test (~60 samples). These data sets are ...
0
votes
1answer
17 views

[R]Fuzzy C-Means, different between ppclust vs e1071?

no. of cluster = 10, data points = 6000 library(ppclust) cm <- fcm(x,centers = cen) takes ~ 10 minutes ...
0
votes
2answers
28 views

Finding interaction

How do you find the interaction between a continuous and a categorical variable? I have tried using ggPredict but it doesn't seem to work if there are more levels. ...
1
vote
2answers
37 views

How to model & predict user activity/presence time in a website

I need to make a prediction model based on some historical data from a website's user login system. Suppose my dataset has some features like user login time and logout time for each day for a ...
1
vote
0answers
30 views

Increase Specificity of a model using SMOTE arguments from DMwR package in R when training data is unbalanced

I'm working on a binary classification problem and training data which I'm using is unbalanced. I used SMOTE function from DMwR ...
1
vote
1answer
28 views

Pandas, R, and interoperable data frame formats

I want to have a single format which is compatible both with R and Python's Pandas (and preferably, other things like Stata and SAS), for which I will not ever need to impute whether things are ...
1
vote
1answer
17 views

How do I use the model generated by the R package poLCA to classify new data as belonging to one of the classes?

For example in the election example from the documentation, https://cran.r-project.org/web/packages/poLCA/poLCA.pdf If I create a new set of answers to the questions, how can I use the poLCA model to ...
0
votes
1answer
10 views

Standardizing Vegas odds for a randomForest

I'm sorry I don't have reproducible code, but I have a pretty specific question that I can't find an answer to. I'm using randomForest to project NBA statistics. ...
3
votes
2answers
48 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
46 views

Can I use categorical and numerical data variable at the same time in randomForest in r?

I have data in which few columns contain categorical data whereas remaining columns contain numerical data. I want to use random forest regressor from the randomForest library in r. So does this ...
3
votes
3answers
56 views

Folds in Cross validation

I am performing 10-folds cross-validation to evaluate the performances of a series of models (variable selection + regression) with R. I created manually the folds with this code. At the moment I'm ...
1
vote
0answers
23 views

randomForest in R - skip test

I am working with package randomForestin R for predicting a price in an hourly basis. For creating the model, after partitioning the dataframe, I use the following ...
0
votes
0answers
38 views

R package used for Sampling techinque such as over,Under, both, SMOTE to balance multi-class target variable

given below is an example of my data frame. Target Class 0 0 0 0 0 0 0 1 1 2 3 3 4 1 3 4 Now my target class ...
2
votes
1answer
49 views

I need to force my random forest model to learn one crucial relationship between features. How can I achieve that?

Say, given 10 independent features as input to my RF model, when feature 1 and feature 3 are 100 (or less), my model output must be 5 despite the values of the other features. How can I teach that ...