Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Psingh12354/R-Program
https://github.com/Psingh12354/R-Program
basic-programming coding r r-beginners r-practice r-programming
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/Psingh12354/R-Program
- Owner: Psingh12354
- License: gpl-3.0
- Created: 2020-08-20T04:17:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-08T08:29:34.000Z (about 4 years ago)
- Last Synced: 2024-11-09T02:46:17.263Z (3 months ago)
- Topics: basic-programming, coding, r, r-beginners, r-practice, r-programming
- Language: R
- Homepage: https://psingh12354.github.io/R-Program/
- Size: 43 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - Psingh12354/R-Program - (R)
README
R-Programs
Here i upload my R program which i have done on my practice session
Codes :
```
# oddx<-seq(1,100,by=2)
print(x)#array 3*3
arr1<-array(c(1:20),dim=c(3,3,2))
print(arr1)# 3d array by dim
arr2<-array(1:24,dim=c(3,3))
print(arr2)# vector on length 4
a<-c('red','blue','green')
print(a)
print(class(a))
print(a[1])# vector with 10th element
a<-c(1,2,3,4,5,6,7,8,9,10)
print(a[1])
print(a[3])
print(a[8])# [1] list
list1=list(2,3,4,5,6,7)
names(list1)<-c("a","b","c","d","e","f")
print(list1)# [2] Matrices
rnames<-c("a","b","c","d")
cnames<-c("x","y","z","w")
m<-matrix(c(1:20),nrow=4,ncol=4,byrow=TRUE,dimnames=list(rnames,cnames))
print(m)# [3] Arrays
rnames<-c("a","b","c")
cnames<-c("x","y","z")
arr1<-array(c(2:20),dim = c(3,3),dimnames = list(rnames,cnames))
print(arr1)
```