Let us find the number of bars by creating a function bar_count bar_count
Data Science · R
1 Answer
·
1.7K Views
·
Answered ✓
N
Asked by: Naina pandey · 6 years ago
Sapply() takes list as an input but returns an output as vectors.Let us explain with an example x
Data Science · R
1 Answer
·
1.3K Views
·
Answered ✓
L
Asked by: Lucas BROWN · 6 years ago
To get the parent directory in R, we can use getwd() as follows working_dir
Data Science · R
1 Answer
·
1.5K Views
·
Answered ✓
L
Asked by: Lucas BROWN · 6 years ago
A matrix is a representation of an array of numbers in n dimensional format that are again represented as rows and columns. From a matrix, we can…
Data Science · R
1 Answer
·
1.6K Views
·
Answered ✓
G
Asked by: Gayatri Jaiteley · 6 years ago
Let us take and example of a text file scan("example.txt", what="character", sep=NULL) But this piece of code returns a vector but we want as a…
Data Science · R
1 Answer
·
1.6K Views
·
Answered ✓
T
Asked by: Tanya verma · 6 years ago
while loops are a while to have your program continuously run some block of code until a condition is met (made TRUE). The syntax is: while…
Data Science · R
1 Answer
·
1.5K Views
·
Answered ✓
T
Asked by: Tanya verma · 6 years ago
Vectors are the commonly used data objects used in R and there are many types as integer, logical, character, double, complex and raw. Let us define…
Data Science · R
1 Answer
·
1.7K Views
·
Answered ✓
F
Asked by: Fujiwara Ban · 6 years ago
For doing this we have to select a dataframe for selecting rows and columns. A data frame is a structure having 2 dimensions which contains data in…
Data Science · R
1 Answer
·
1.4K Views
·
Answered ✓
L
Asked by: Liam SMITH · 6 years ago
Let us create a function which returns TRUE and FALSE based on the condition num_check
Data Science · R
1 Answer
·
2.4K Views
·
Answered ✓
N
Asked by: Nabha shahin · 6 years ago
For merging two or more vectors, we use append() function which is a built in function in R. Let us define two vectors v=c(10,20,30,40)…
Data Science · R
1 Answer
·
1.0K Views
·
Answered ✓
J
Asked by: James WILLIAMS · 6 years ago
In R, matrix can be created by many ways Let us create a matrix in the most simple way matrix(1:9, nrow = 3, ncol = 3) Output In
Data Science · R
1 Answer
·
1.1K Views
·
Answered ✓
J
Asked by: James WILLIAMS · 6 years ago
A data frame is a structure having 2 dimensions which contains data in the form or rows and columns.It is like a spreadsheet or dictionaries of…
Data Science · R
1 Answer
·
1.1K Views
·
Answered ✓
B
Asked by: bhagwati dubey · 6 years ago