Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
How to remove double inverted commas in R matrix?
To remove double inverted commas in R matrix, we can follow the below steps −
First of all, create a matrix.
Then, use print function along with quote argument.
Example
Create the matrix
Let’s create a matrix as shown below −
MOutput
On executing, the above script generates the below output(this output will vary on your system due to randomization) −
[,1] [1,] "russia" [2,] "russia" [3,] "russia" [4,] "qatar" [5,] "india" [6,] "qatar" [7,] "qatar" [8,] "india" [9,] "china" [10,] "india" [11,] "india" [12,] "uk" [13,] "russia" [14,] "india" [15,] "qatar" [16,] "india" [17,] "china" [18,] "qatar" [19,] "qatar" [20,] "china" [21,] "india" [22,] "russia" [23,] "china" [24,] "qatar" [25,] "qatar"Remove double inverted commas
Using print function along with quote argument to remove double inverted commas −
MOutput
[,1] [1,] russia [2,] russia [3,] russia [4,] qatar [5,] india [6,] qatar [7,] qatar [8,] india [9,] china [10,] india [11,] india [12,] uk [13,] russia [14,] india [15,] qatar [16,] india [17,] china [18,] qatar [19,] qatar [20,] china [21,] india [22,] russia [23,] china [24,] qatar [25,] Qatar
Advertisements
