Can a C program be written in R programming language?

0 votes
I have a C program which I want to write using R programming language. Is this possible? I have already coded the algorithms in C language, can I directly convert them to R or do I have to build my code again using R?
Jan 4, 2019 in Data Analytics by Tyrion anex
• 8,360 points
108 views

3 answers to this question.

0 votes
Yes, you can convert a C program to an R program. R provides 1000s of packages with pre defined algorithm, you don't even have to code your algorithms, you only have to load the libraries.
answered Jan 4, 2019 by Sophie may
• 9,940 points
0 votes

Yes, you can convert c program to R-program easily. For example, you have C programming that you think to change in R programming. you want to call from an R script. Specifically, you wish to pass data from R into the C, and using function call you can function return the results to r environment

syntax:-ComputeFunctionR(ScalarParam, InputVector)

answered Mar 27, 2019 by SA
• 1,050 points
0 votes

If you have a algorithm you can easily wirte the code in any language the condition is you may know about the language. Algorithm never changes only implementation changes in different language. So if want to code in R language from c language it is quiet easy unless you may know the R programming language.

answered Apr 9, 2019 by anonymous

Related Questions In Data Analytics

0 votes
1 answer

How can I read a .csv file in R language?

read.csv () function is used to read ...READ MORE

answered Jun 11, 2018 in Data Analytics by zombie
• 3,750 points
85 views
0 votes
2 answers

What are the rules to define a variable name in R programming language?

The same rules almost follow for all ...READ MORE

answered Aug 26, 2019 in Data Analytics by anonymous
• 32,440 points
291 views
0 votes
1 answer

Check if a matrix is diagonalizable in R Programming Language

On a given matrix, a, the first way ...READ MORE

answered Dec 24, 2018 in Data Analytics by Tyrion anex
• 8,360 points
74 views
0 votes
1 answer

How can I delete multiple values from a vector in R?

The %in% operator tells  which elements are ...READ MORE

answered Apr 26, 2018 in Data Analytics by shams
• 3,580 points
1,226 views
0 votes
2 answers

How to sort a data frame by columns in R?

You can use dplyr function arrange() like ...READ MORE

answered Aug 21, 2019 in Data Analytics by anonymous
• 32,440 points
232 views
+9 votes
3 answers

Which is a better initiative to learn data science: Python or R?

Well it truly depends on your requirement, If ...READ MORE

answered Aug 8, 2018 in Data Analytics by Anmol
• 3,680 points
121 views
0 votes
1 answer

How can I perform word stemming in R

The tm package in R provides the stemDocument() function to stem the ...READ MORE

answered Aug 20, 2018 in Data Analytics by Anmol
• 3,680 points
131 views
0 votes
1 answer

How to know the type of an object?

To find the type of an object ...READ MORE

answered Sep 19, 2018 in Data Analytics by Anmol
• 3,680 points
50 views
0 votes
1 answer

Can we have an if loop inside a for loop in R programming?

You're If loop doesn't have any condition ...READ MORE

answered Dec 21, 2018 in Data Analytics by Sophie may
• 9,940 points
62 views
0 votes
1 answer

How to create a 2D array of vectors of different lengths in R programming?

You can try making a list of matrices ...READ MORE

answered Feb 1, 2019 in Data Analytics by Sophie may
• 9,940 points
61 views