Click here to Skip to main content
15,892,537 members
Everything / Programming Languages / R

R

R

Great Reads

by Andy Allinger
Add features to k-means for missing data, mixed data, and choosing the number of clusters
by Voevudko A. E., Ph.D.
Demonstrating a few approaches to generating and plotting fractals in R and offering R scripts realizing it.
by Amarnath S
An introduction to data analytics, using R, by taking a quick look at the state of World Health.
by Mr. xieguigang 谢桂纲
R# language is a kind of R liked language implements on .NET environment

Latest Articles

by Andy Allinger
Add features to k-means for missing data, mixed data, and choosing the number of clusters
by ToughDev
More about ST7735 1.8-inch 128×160 Color LCD on a PIC Microcontroller
by Mr. xieguigang 谢桂纲
R# language is a kind of R liked language implements on .NET environment

All Articles

Sort by Updated

R 

11 Dec 2023 by ann1988425
matlab Yr=Y; Us{1}=Yr*C; U=Us{1}; Fxy=Y-Us{1}*C R Yr
10 Dec 2023 by Kenneth Haugland
Have you tried to type "format long" in matlab? What you see in matlab and what is saved might be two different things
13 Aug 2023 by Abhijeet Chauhan 2023
#Permutation test operm10 summary(operm10) LOD thresholds (1000 permutations) lod 5% 3.05 10% 2.69 #Looking for qtls #scanone em method ...
27 Jun 2023 by pandas12345
I have the following code: customerid
7 Jun 2023 by Andy Allinger
Add features to k-means for missing data, mixed data, and choosing the number of clusters
7 May 2023 by ToughDev
More about ST7735 1.8-inch 128×160 Color LCD on a PIC Microcontroller
15 Jan 2023 by katebjork
I get single letter words in my Structural Topic Model after my preprocessing steps. Particularly after I stem my tokens. My code is as follows: #read the csv articletexts
30 Dec 2022 by Member 15880441
Hello everyone! I am currently working on outlier detection for a highly skewed data which is also heavy tailed. I wanted to use the generalized boxplot as mentioned in the research paper of (Bruffaerts, et al., 2014). However, I don't know...
28 Oct 2022 by smartcoder22
Hi all, One of my independent variable in a data that I want to use for Multinomial logistic regression has more than one text values in some of the cells i.e like high,higher or high,higher,highest . Can I use this variable as it is or is...
27 Oct 2022 by MKGoal25
I have a dataframe including 520 individual identification #s and their frequency count over 10 bin/indices. I want to fit nls() for each of them & save their coef and r^2 values each in a new column. structure(list(User.ID = c("37593", "38643",...
22 Oct 2022 by Patrice T
Quote: Twin prime numbers in R programming till 1000 Not a solution to your question. But hope this solution is still interesting. As programmer, you are free to use your brain. You are looking for twin primes numbers. - 2 is the only prime...
22 Oct 2022 by Shubham Guha_1007_IMCA1
Error - unexpected numeric constant idk why, I want to get twin prime numbers but the Boolean value not taking it. What I have tried: isPrime
22 Oct 2022 by Richard MacCutchan
I think some time spent with the documentation would be time well spent. I have never used the R language before today, but I was able to get a working version of your code by simply reading the docs. isPrime
22 Oct 2022 by OriginalGriff
Compiling does not mean your code is right! :laugh: Think of the development process as writing an email: compiling successfully means that you wrote the email in the right language - English, rather than German for example - not that the email...
22 Oct 2022 by Member 14991075
I would like to create a semivariogram, but my code no use. command window shows me: Error in validObject(.Object) : invalid class “SpatialPointsDataFrame” object: invalid object for slot "data" in class "SpatialPointsDataFrame": got class...
20 Oct 2022 by Member 14991075
I would like to create/convert a .r script (in R studio) to an executable - batch(.exe) file. Which command should I use? What I have tried: chmod +x test.R in cmd - command window
20 Oct 2022 by Richard MacCutchan
The chmod command merely sets a file permission, it has no effect on the file contents. You need to check the R documentation to see if there is a command to do it. Alternatively a Google search may find something.
14 Oct 2022 by Fury_5698
I have many csv files with dataframes looking like these. Dummy Data: df1
11 Oct 2022 by Kevin Thomas Oct2022
mariostairs
11 Oct 2022 by Kevin Thomas Oct2022
def staircase(n): for i in range(0,n): for j in range(0,n): if i + j >= n-1: print("#",end='') else: print(" ",end='') print('\n') staircase(4) What I have tried: ...
13 Sep 2022 by Jason Garcia Jr.
'''(r setup, include=FALSE) knitr:opts chunk$set(echo= TRUE) Read in the data provided and save it as a variable called "data" '''(r) ''' use c() and cbind() to add a numerical column from 1:19 to "data". Order it as the first column. '''(r)...
13 Sep 2022 by OriginalGriff
If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]
10 Aug 2022 by Synco-Cybersyn
I purchased 7 coruses from Udemy to go deep in python,R and ia. Could someone help me to say where should i start, then pass and what should i take last and if i have to return one this courses for a refound by redundant information? please.I...
10 Aug 2022 by Patrice T
Quote: I purchased 7 coruses from Udemy to go deep in python,R and ia. Learning some programming languages is nice, but there is also a huge technical backup not linked to a specific language. You have to know that you can do pretty much...
9 Aug 2022 by Richard MacCutchan
See R Tutorial[^] for a nice introduction to learning the language. [edit] Having read your question in more detail I am not sure that it has anything to do with programming. [/edit]
9 Aug 2022 by james Edits
There are two files with data taken from a subset of the UK Met Office’s network of land surface measurement sites. These are: 1. metadata.csv This file contains site names, longitude, latitude and elevation for 20 locations throughout Britain;...
9 Aug 2022 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
3 Aug 2022 by Richard MacCutchan
You need to declare tmpvarname1 and tmpvarname2 in the global space so they can be accessed inside and outside of the loop. You also need to use the global assignment operator (
3 Aug 2022 by rscp1
I have been trying to get this R code to assign integers on the fly. It works when they are less than 99, but the else statement seems to not be working. I keep getting errors stating: object 'tmpvarname2' not found parameters = c(6202, 5, 6401,...
3 Aug 2022 by Mr. xieguigang 谢桂纲
R# language is a kind of R liked language implements on .NET environment
23 Jun 2022 by Boris Gomez
I am developing an application in R shiny and I would like to make a graph dynamic by adding points, error bar, and lines using the ggplot2 package R. The columns of my dataframes have no names because I merge Excel files uploaded by the user...
26 May 2022 by Gerry Schmitz
It's called "binning"; do what you need to do to the data to have it make sense for your particular "model". e.g. Height is almost meaningless (for most) unless it's in terms of short, medium, tall (i.e. range binning). ...
22 May 2022 by Richard MacCutchan
Have you checked the documentation to see if it requires some external library? Quote: Thank you very much, Richard, indeed , I have managed to resolve this, there was a requirement for Janitor package to be installed. I have added these...
22 May 2022 by smartcoder22
Am just starting out in R and machine learning. Am working on a hierarchical clustering problem where after getting clusters of attitudinal variables (e.g preference for a certain choice), I want to do target segmentation by combining the cluster...
12 May 2022 by office offical
#include #include #include static int64_t metallica[] = { 32538, 37741, 89540, 14627, 34272, 58765 }; const static int N = sizeof(metallica)/sizeof(*metallica); static void fail(){ puts("Nope!"); ...
12 May 2022 by Richard MacCutchan
See Basically I need to put correct numbers as input to get "exactly! Good job" answer! Need help to find what will be the inputs and why those inputs works![^].
12 May 2022 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
13 Mar 2022 by loop063
I have a 15x15 matrix with strings of "0"s and "1"s. I need to find the number of columns that have only one "0". Note that the variables in the matrix are strings, not numerics What I have tried: colSums(m1=="1", na.rm=TRUE)
21 Jan 2022 by Member 15500952
Hello - I found TheCyberByte article "How to retrieve CVSS Scores with Bulk CVE Lookup in NIST NVD via Python" using Beautiful Soup particularly helpful. I used a Ubuntu VM (Ubuntu 20.04.3 LTS) and basic text editor (vi) at command line to...
15 Jan 2022 by NewbieAR
I have to call R from python and show the results graphically through R. For example, if we take Apache, to look at different scores in CVSS database; CVE no, the risk scores, severity, etc. components to use - R, python, and graphical console based tool What I have tried: Getting data in R...
13 Jan 2022 by Pizzle15
Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1) What I have tried: I have tried converting the fields to numeric and remove all duplicates
13 Jan 2022 by _Asif_
This error occurs mostly due to non numeric values present in the table. Please check this as it explains a bit detail with real example r - Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1) - Stack Overflow[^]
2 Dec 2021 by MohamedKamalPharm
Discrete event simulation example
28 Nov 2021 by Eliza Romanski
I have a problem which i'm finding tricky to solve . I have a data frame that looks like this : ...
23 Oct 2021 by Kevin Paul 2021
Hi I am working on an Amazon dataset which does not follow the traditional row and column format. Kindly advice on the best way to convert this into a easily manipulatable dataset in R. Thank you Dataset: ...
12 Oct 2021 by chin21504
I am trying to create a new datframe using paste0 function and i need to copy an existing dataframe into it. e.g. ty 1) { Paste0("mynewdata",ty)
23 Sep 2021 by Member 14007867
I have imported a new set of data, it's called "data2". When I put View(data2) a new window opened with all of my data. There are 4 variables in my data: house_size, number_of_beds, price.of.house., and Region (A,B,C,D,E). My mission is that I...
31 Aug 2021 by Member 15336701
I can't figure out how to create letter 'J' and 'K' using point plots in r the following code builds an H. x=c(rep(0,500),seq(0,1,length.out=1000), rep(1,500)) y=c(seq(-1,1,length.out=500),rep(0,1000), seq(-1,1,length.out=500)) z=rbind(x,y)...
19 Apr 2021 by debbie oomen
I'm having a tough time figuring this out and I will try to explain where I need help the best I can. I have a dataframe consisting of participant ID (column 1), possible dates of an appointment for that participant (column 2, ranging from V1 to...
15 Feb 2021 by Gerry Schmitz
Data Analysis in Excel - Easy Excel Tutorial[^]
15 Dec 2020 by OriginalGriff
This is not a code conversion service: we are not here to translate code for you. Even if we did, what you would end up with would not be "good code" in the target language – they are based on very different frameworks, and what makes something...
22 Nov 2020 by Member 14999754
Hello, i tried following ways but none of them worked 1. trying to install rpy2 (version 2.9.4) using anaconda, facing error of python version unsatisfied (when python == 3.8.3 or anything over python==3.7.1). 2. when tried same using pip...
22 Nov 2020 by Richard MacCutchan
rpy2 3.3.6· PyPI[^]
15 Oct 2020 by OriginalGriff
Read the question carefully. Re-read your course notes. Then read this: How to Write Code to Solve a Problem, A Beginner's Guide[^] Then re-read the question and think about the task it describes. Give it a try - this isn't a complicated...