Saturday, 26 November 2016

19 string functions in r Language

substr(,1,5)
nchar()
substr(,nchar()-8,nchar()
how to extract last 2 chars from vector
paste(a,b,sep='')
paste(a,b,"!",sep='')
paste(a,", ",b,"!",sep='')
paste(vector,", ",b,"!",sep='')
paste("x",1:10,sep=",")
grep("Ra",vector)
vector[grep("Ra",vector)]
grep("Ra",vector,value=TRUE)
grep("New",state.name,value=T)
strsplit(a,"   ")
sub("ram","nar",a)
gsub
----------

R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Workspace loaded from ~/.RData]

> vec <-c("ramesh","suresh","naresh","ganesh")
> v<-"hi how are you"
> V1<-"just"
> ?substr
> substr(v,1,5)
[1] "hi ho"
> substr(v,4,20)
[1] "how are you"
> substr(v,4,2)
[1] ""
> substr(v,4,9)
[1] "how ar"
> nchar(v)
[1] 14
> v
[1] "hi how are you"
> nchar(vec)
[1] 6 6 6 6
> vec
[1] "ramesh" "suresh" "naresh" "ganesh"
> v
[1] "hi how are you"
> substr(v,nchar(v)-3,nchar(v))
[1] " you"
> substr(v,nchar(v)-3,nchar(v))
[1] " you"
> substr(vec,1,2)
[1] "ra" "su" "na" "ga"
> paste(v,v1)
Error in paste(v, v1) : object 'v1' not found
> v1
Error: object 'v1' not found
> V1
[1] "just"
> paste(v,V1)
[1] "hi how are you just"
> paste(v,V1,sep=' / ')
[1] "hi how are you / just"
> paste(v,V1,"!",sep=' / ')
[1] "hi how are you / just / !"
> paste(v,V1,"Ram",sep=' / ')
[1] "hi how are you / just / Ram"
> paste(v,",",V1,"Ram",sep=' / ')
[1] "hi how are you / , / just / Ram"
>
> paste(V1,1:10)
 [1] "just 1"  "just 2"  "just 3"  "just 4"
 [5] "just 5"  "just 6"  "just 7"  "just 8"
 [9] "just 9"  "just 10"
> grep("ra",vec)
[1] 1
> grep("esh",vec)
[1] 1 2 3 4
> vesh
Error: object 'vesh' not found
> vec
[1] "ramesh" "suresh" "naresh" "ganesh"
> grep("a",vec)
[1] 1 3 4
> grep("a",vec,value=T)
[1] "ramesh" "naresh" "ganesh"
> state.name
 [1] "Alabama"        "Alaska"      
 [3] "Arizona"        "Arkansas"    
 [5] "California"     "Colorado"    
 [7] "Connecticut"    "Delaware"    
 [9] "Florida"        "Georgia"     
[11] "Hawaii"         "Idaho"       
[13] "Illinois"       "Indiana"     
[15] "Iowa"           "Kansas"      
[17] "Kentucky"       "Louisiana"   
[19] "Maine"          "Maryland"    
[21] "Massachusetts"  "Michigan"    
[23] "Minnesota"      "Mississippi" 
[25] "Missouri"       "Montana"     
[27] "Nebraska"       "Nevada"      
[29] "New Hampshire"  "New Jersey"  
[31] "New Mexico"     "New York"    
[33] "North Carolina" "North Dakota"
[35] "Ohio"           "Oklahoma"    
[37] "Oregon"         "Pennsylvania"
[39] "Rhode Island"   "South Carolina"
[41] "South Dakota"   "Tennessee"   
[43] "Texas"          "Utah"        
[45] "Vermont"        "Virginia"    
[47] "Washington"     "West Virginia"
[49] "Wisconsin"      "Wyoming"     
> grep("V",sate.name,value=T)
Error in grep("V", sate.name, value = T) : object 'sate.name' not found
> grep("V",state.name,value=T)
[1] "Vermont"       "Virginia"   
[3] "West Virginia"
> strsplit(v,"/")
[[1]]
[1] "hi how are you"

> strsplit(v,"      ")
[[1]]
[1] "hi how are you"

> strsplit(V1,"      ")
[[1]]
[1] "just"

> strsplit(V1,"/")
[[1]]
[1] "just"

> sub("a","k",vec)
[1] "rkmesh" "suresh" "nkresh" "gknesh"
> sub("s","z",vec)
[1] "ramezh" "zuresh" "narezh" "ganezh"
> gsub("s","z",vec)
[1] "ramezh" "zurezh" "narezh" "ganezh"

18 random numbers Functions in R language

random numbers
runif(1,0,10)
x<-matrix(100,0,1),ncol=10)
---
set.seed(2)
sample(1:10,5)
sample(x,5)
sample(0:1,100)
sample(0:1,100,replace=T)
sum(sample(0:1,100,replace=T))

state.name
sample(state.name,10)
--
s<-sample(1:5,1000,replace=T,prob=c(.2,.2,.2,.2,.2))
9059868766
venkat
table(s)
---
rnom(1)
-------------

R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Workspace loaded from ~/.RData]

> runif(1,1,10)
[1] 8.438811
> runif(1,1,10)
[1] 9.455057
> a= runif(1,1,10)
> a
[1] 1.533825
> a
[1] 1.533825
> a
[1] 1.533825
> a
[1] 1.533825
> a= runif(1,1,10)
> a
[1] 9.062645
> runif(4,1,10)
[1] 9.684915 7.945072 4.608548 8.766813
> runif(5,5,7)
[1] 6.302855 6.136968 6.119193 5.587079 6.033400
> an=matrix(runif(100,1,100),ncol=10)
> an
          [,1]     [,2]      [,3]     [,4]
 [1,] 17.75432 64.42554 33.544375 15.82550
 [2,] 85.59875 94.39768 63.713225 88.41076
 [3,] 83.64417 18.05964  2.511536 70.60304
 [4,] 78.92116 67.10841 64.811331 59.84145
 [5,] 89.59182 25.41236 69.217753 32.94199
 [6,] 97.07366 22.53897 77.627904 98.35555
 [7,] 16.68177 47.42317 51.392915 65.47258
 [8,] 38.17343 82.76507 60.983603 55.72940
 [9,] 19.47498 29.37258 31.161065 84.21841
[10,] 31.23285 74.66430 83.368968 29.16913
           [,5]     [,6]     [,7]     [,8]
 [1,] 86.260574 80.63066 30.94873 76.67941
 [2,] 61.753046 96.18675 20.12761 31.23936
 [3,] 21.795530 23.98979 33.31106 76.12806
 [4,] 24.627176 94.27216 34.70041 25.61517
 [5,]  7.915749 47.21915 37.51370 18.30664
 [6,] 87.660562 28.54266 66.19067 86.56617
 [7,]  8.286705 46.97633 11.86618 14.72213
 [8,]  4.057239 41.99362 27.68719 37.26553
 [9,] 30.313130 39.97871 61.40631 55.42384
[10,] 81.674761 13.22212 49.58386 76.71307
           [,9]    [,10]
 [1,] 98.641094 44.12686
 [2,] 45.728991 63.06460
 [3,] 52.971145 43.99829
 [4,] 59.973548 31.15030
 [5,] 34.073597 39.13850
 [6,]  1.354758 74.34744
 [7,] 41.567044 14.93894
 [8,] 56.111451 26.84879
 [9,] 55.458226 24.62272
[10,] 48.216264 34.75815
> runif(4,1,10)
[1] 3.045298 3.537711 1.005564 4.479743
> runif(4,1,10)
[1] 1.405773 2.423582 9.293291 9.501379
> set.seed(1)
> runif(4,1,10)
[1] 3.389578 4.349115 6.155680 9.173870
> runif(4,1,10)
[1] 2.815137 9.085507 9.502077 6.947180
> set.seed(1)
> runif(4,1,10)
[1] 3.389578 4.349115 6.155680 9.173870
> runif(4,1,10)
[1] 2.815137 9.085507 9.502077 6.947180
> runif(4,1,10)
[1] 6.662026 1.556076 2.853771 2.589011
> runif(4,1,10)
[1] 7.183206 4.456933 7.928573 5.479293
> set.seed(2)
> runif(4,1,10)
[1] 2.663940 7.321366 6.159937 2.512467
> runif(4,1,10)
[1] 9.494554 9.491275 2.162431 8.501039
> runif(4,1,10)
[1] 5.212167 5.949854 5.974067 3.150053
> set.seed(2)
> runif(4,1,10)
[1] 2.663940 7.321366 6.159937 2.512467
> runif(4,1,10)
[1] 9.494554 9.491275 2.162431 8.501039
> runif(4,1,10)
[1] 5.212167 5.949854 5.974067 3.150053
> sample(1:10,5)
[1] 8 2 4 6 7
> sample(1:60,5)
[1] 14 27  5 38 22
> sample(1:60,20)
 [1] 51  9 21 28 59 20 52  8  1 56 41 43 25 30 39
[16] 13 47  7 42 45
> sample(1:60,5)
[1]  7 10 55 46 58
> x<-1:60
> x
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
[16] 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
[31] 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
[46] 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
> sample(x,5)
[1] 21 30 48  1 57
> sample(0:1,5)
Error in sample.int(length(x), size, replace, prob) :
  cannot take a sample larger than the population when 'replace = FALSE'
> sample(0:2,5)
Error in sample.int(length(x), size, replace, prob) :
  cannot take a sample larger than the population when 'replace = FALSE'
> sample(0:2,5,replace=T)
[1] 2 2 0 2 2
> sample(0:2,5,replace=T)
[1] 2 1 2 2 2
> sample(0:2,5,replace=F)
Error in sample.int(length(x), size, replace, prob) :
  cannot take a sample larger than the population when 'replace = FALSE'
> sample(0:1,100,replace=T)
  [1] 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0
 [23] 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 1
 [45] 1 0 0 0 0 1 0 1 1 1 1 0 1 1 0 0 1 1 0 1 1 0
 [67] 1 0 0 1 0 1 0 1 1 1 0 0 0 0 1 0 0 1 1 0 0 0
 [89] 0 0 1 0 1 0 1 0 0 0 1 1
> sum(sample(0:1,100,replace=T))
[1] 48
> table(sample(0:1,100,replace=T))

 0  1
51 49
> table(sample(0:1,100,replace=T))

 0  1
45 55
> table(sample(0:1,100,replace=T))

 0  1
47 53
> table(sample(0:1,100,replace=T))

 0  1
49 51
> state.name
 [1] "Alabama"        "Alaska"      
 [3] "Arizona"        "Arkansas"    
 [5] "California"     "Colorado"    
 [7] "Connecticut"    "Delaware"    
 [9] "Florida"        "Georgia"     
[11] "Hawaii"         "Idaho"       
[13] "Illinois"       "Indiana"     
[15] "Iowa"           "Kansas"      
[17] "Kentucky"       "Louisiana"   
[19] "Maine"          "Maryland"    
[21] "Massachusetts"  "Michigan"    
[23] "Minnesota"      "Mississippi" 
[25] "Missouri"       "Montana"     
[27] "Nebraska"       "Nevada"      
[29] "New Hampshire"  "New Jersey"  
[31] "New Mexico"     "New York"    
[33] "North Carolina" "North Dakota"
[35] "Ohio"           "Oklahoma"    
[37] "Oregon"         "Pennsylvania"
[39] "Rhode Island"   "South Carolina"
[41] "South Dakota"   "Tennessee"   
[43] "Texas"          "Utah"        
[45] "Vermont"        "Virginia"    
[47] "Washington"     "West Virginia"
[49] "Wisconsin"      "Wyoming"     
> sample(state.name,5)
[1] "Mississippi"   "Virginia"   
[3] "Massachusetts" "Alaska"     
[5] "Oklahoma"   
> sample(0:1,100,replace=T)
  [1] 0 1 0 0 0 1 0 0 1 1 1 1 0 1 0 1 0 0 0 1 1 1
 [23] 1 0 0 0 0 1 0 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1
 [45] 0 0 0 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 0 1 0
 [67] 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 1
 [89] 0 1 0 1 1 0 0 0 1 1 1 0
> sample(0:5,100,replace=T)
  [1] 2 5 3 0 1 3 2 2 0 5 4 4 2 3 2 5 3 5 0 4 0 2
 [23] 1 3 4 0 0 5 1 3 4 4 4 2 3 0 1 0 5 1 3 4 1 2
 [45] 2 1 5 0 2 5 3 3 5 3 0 0 0 3 0 0 0 2 4 0 0 5
 [67] 3 0 3 5 5 3 3 4 3 0 0 5 5 4 0 5 2 4 0 4 0 4
 [89] 1 0 5 3 2 0 2 2 5 0 5 5
> table(sample(0:5,100,replace=T))

 0  1  2  3  4  5
19 16 17 21 10 17
> sample(0:5,100,replace=T,prob=c(.2,.2,.2,.2,.2))
Error in sample.int(length(x), size, replace, prob) :
  incorrect number of probabilities
> sample(1:5,100,replace=T,prob=c(.2,.2,.2,.2,.2))
  [1] 1 1 3 2 4 2 5 4 5 2 1 2 5 1 2 4 4 1 4 2 5 5
 [23] 4 4 1 2 3 2 3 4 1 4 2 3 2 5 4 3 2 3 1 4 3 1
 [45] 3 3 3 1 2 2 2 1 2 2 5 4 3 2 5 1 3 5 1 5 3 1
 [67] 1 5 5 4 2 5 2 4 5 5 5 5 4 4 1 4 1 5 3 1 5 4
 [89] 2 1 4 4 2 2 2 3 3 1 4 1
> a=sample(1:5,100,replace=T,prob=c(.2,.2,.2,.2,.2))
> table(a)
a
 1  2  3  4  5
31 17 22 15 15
> table(a)
a
 1  2  3  4  5
31 17 22 15 15
> a=sample(1:5,100,replace=T,prob=c(.2,.2,.2,.2,.2))
> a
  [1] 2 4 2 3 5 2 5 3 3 4 3 1 4 3 2 5 4 2 1 4 1 4
 [23] 1 2 3 5 4 4 4 2 4 2 2 2 3 4 4 2 4 3 5 1 3 1
 [45] 1 4 1 1 1 5 3 2 3 3 1 2 1 5 5 5 5 4 4 4 5 1
 [67] 2 2 1 3 5 5 4 3 5 5 5 4 1 4 3 1 2 5 1 3 2 2
 [89] 5 1 5 2 1 4 1 5 2 2 1 1
> table(a)
a
 1  2  3  4  5
22 21 16 21 20
> a=sample(1:5,100,replace=T,prob=c(.6,.1,.1,.1,.1))
> a
  [1] 1 1 5 1 1 2 1 1 4 1 1 5 3 1 1 1 1 1 1 1 1 1
 [23] 1 4 3 1 5 3 2 1 1 1 5 2 1 2 1 3 2 1 1 2 2 1
 [45] 1 1 3 1 2 1 1 1 1 1 5 2 1 2 4 1 1 5 1 1 2 4
 [67] 1 1 1 1 1 5 1 1 1 3 1 1 3 2 3 1 1 1 1 1 1 1
 [89] 1 1 1 1 1 1 1 1 1 1 1 1
> table(a)
a
 1  2  3  4  5
69 12  8  4  7
> a=sample(1:5,100,replace=T,prob=c(.2,.4,.1,.1,.1))
> table(a)
a
 1  2  3  4  5
23 41  7 15 14



17 matrics statistics functions In R language


matrics statistics
min()
max()
range()
sd()
rowMeans()
colMeans()
apply(,2,FUN=sd)
cor()
table()
summary()
summary(t())
-----------------
> View(newdata)
> View(temp1)
> temp1
       vijayawad hyderabad delhi
Nov/12        88        62    90
Nov/13        85        61    92
Nov/14        83        54    91
Nov/15        81        60    89
Nov/16        78        65    90
> temp2
       Chennai Pune Bengalore
Nov/12      99   62        90
Nov/13      85   61        92
Nov/14      83   54        71
Nov/15      81   60        89
Nov/16      66   88        90
> ftemp
       vijayawad hyderabad delhi Chennai Pune
Nov/12        88        62    90      99   62
Nov/13        85        61    92      85   61
Nov/14        83        54    91      83   54
Nov/15        81        60    89      81   60
Nov/16        78        65    90      66   88
Nov/17        98        78    66      55   99
       Bengalore
Nov/12        90
Nov/13        92
Nov/14        71
Nov/15        89
Nov/16        90
Nov/17        66
> View(ftemp)
> min(ftemp)
[1] 54
> max(ftemp)
[1] 99
> range(ftemp)
[1] 54 99
> range(ftemp)[1]
[1] 54
> range(ftemp)[2]
[1] 99
> sd(ftemp)
[1] 14.23778
> rowMeans(ftemp)
  Nov/12   Nov/13   Nov/14   Nov/15   Nov/16
81.83333 79.33333 72.66667 76.66667 79.50000
  Nov/17
77.00000
> colMeans(ftemp)
vijayawad hyderabad     delhi   Chennai
 85.50000  63.33333  86.33333  78.16667
     Pune Bengalore
 70.66667  83.00000
> sd(ftemp)
[1] 14.23778
> apply(ftemp,2,sd)
vijayawad hyderabad     delhi   Chennai
 7.007139  8.041559 10.013324 15.471479
     Pune Bengalore
18.239152 11.384200
> apply(ftemp,1,sd)
  Nov/12   Nov/13   Nov/14   Nov/15   Nov/16
15.82930 14.54189 15.80717 13.39652 11.72604
  Nov/17
18.17691
> cor(ftemp)
           vijayawad  hyderabad      delhi
vijayawad  1.0000000  0.7347158 -0.8522797
hyderabad  0.7347158  1.0000000 -0.9007808
delhi     -0.8522797 -0.9007808  1.0000000
Chennai   -0.3219236 -0.7367826  0.7380108
Pune       0.4647732  0.9131535 -0.7723986
Bengalore -0.6242896 -0.3845032  0.7158291
             Chennai       Pune  Bengalore
vijayawad -0.3219236  0.4647732 -0.6242896
hyderabad -0.7367826  0.9131535 -0.3845032
delhi      0.7380108 -0.7723986  0.7158291
Chennai    1.0000000 -0.8679834  0.5393731
Pune      -0.8679834  1.0000000 -0.3583157
Bengalore  0.5393731 -0.3583157  1.0000000
> table(ftemp)
ftemp
54 55 60 61 62 65 66 71 78 81 83 85 88 89 90 91
 2  1  2  2  2  1  3  1  2  2  2  2  2  2  4  1
92 98 99
 2  1  2
> summary(ftemp)
   vijayawad       hyderabad         delhi    
 Min.   :78.00   Min.   :54.00   Min.   :66.00
 1st Qu.:81.50   1st Qu.:60.25   1st Qu.:89.25
 Median :84.00   Median :61.50   Median :90.00
 Mean   :85.50   Mean   :63.33   Mean   :86.33
 3rd Qu.:87.25   3rd Qu.:64.25   3rd Qu.:90.75
 Max.   :98.00   Max.   :78.00   Max.   :92.00
    Chennai           Pune         Bengalore 
 Min.   :55.00   Min.   :54.00   Min.   :66.0
 1st Qu.:69.75   1st Qu.:60.25   1st Qu.:75.5
 Median :82.00   Median :61.50   Median :89.5
 Mean   :78.17   Mean   :70.67   Mean   :83.0
 3rd Qu.:84.50   3rd Qu.:81.50   3rd Qu.:90.0
 Max.   :99.00   Max.   :99.00   Max.   :92.0
> summary(t(ftemp)
+ )
     Nov/12          Nov/13          Nov/14   
 Min.   :62.00   Min.   :61.00   Min.   :54.00
 1st Qu.:68.50   1st Qu.:67.00   1st Qu.:58.25
 Median :89.00   Median :85.00   Median :77.00
 Mean   :81.83   Mean   :79.33   Mean   :72.67
 3rd Qu.:90.00   3rd Qu.:90.25   3rd Qu.:83.00
 Max.   :99.00   Max.   :92.00   Max.   :91.00
     Nov/15          Nov/16         Nov/17
 Min.   :60.00   Min.   :65.0   Min.   :55
 1st Qu.:65.25   1st Qu.:69.0   1st Qu.:66
 Median :81.00   Median :83.0   Median :72
 Mean   :76.67   Mean   :79.5   Mean   :77
 3rd Qu.:87.00   3rd Qu.:89.5   3rd Qu.:93
 Max.   :89.00   Max.   :90.0   Max.   :99
>

16 rbind function in matrix R language

15 cbind function in matrix R language

matrix operations

ram<-matrix(c(88,85,83,81,78,62,61,54,60,65,90,92,91,89,90),ncol=3)
colnames(ram)<-c("vijayawad","hyderabad","delhi")
rownames(ram)<-paste("11/",12:16,sep='')

c
rbind()

ndata<-matrix(c(98,78,66,55,99,66),nrow=1)
rownames(ndata)<-"11/17"
colnames(ndata)<-c(colnames(tem1),colnames(temp2))
rbind<-(cbind(temp1,temp2),ndata)


R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> temp2
Error: object 'temp2' not found
> temp2<-matrix(c(99,85,83,81,66,62,61,54,60,88,90,92,71,89,90),ncol=3)
> rownames(temp2)<-paste("Nov/",12:16,sep='')
> colnames(temp2)<-c("Chennai","Pune","Bengalore")
> temp1<-matrix(c(88,85,83,81,78,62,61,54,60,65,90,92,91,89,90),ncol=3)
> colnames(temp1)<-c("vijayawad","hyderabad","delhi")
> rownames(temp1)<-paste("Nov/",12:16,sep='')
> temp2
       Chennai Pune Bengalore
Nov/12      99   62        90
Nov/13      85   61        92
Nov/14      83   54        71
Nov/15      81   60        89
Nov/16      66   88        90
> temp1
       vijayawad hyderabad delhi
Nov/12        88        62    90
Nov/13        85        61    92
Nov/14        83        54    91
Nov/15        81        60    89
Nov/16        78        65    90
> cbind(temp1,temp2)
       vijayawad hyderabad delhi Chennai Pune
Nov/12        88        62    90      99   62
Nov/13        85        61    92      85   61
Nov/14        83        54    91      83   54
Nov/15        81        60    89      81   60
Nov/16        78        65    90      66   88
       Bengalore
Nov/12        90
Nov/13        92
Nov/14        71
Nov/15        89
Nov/16        90
> temp12<-cbind(temp1,temp2)
> temp12
       vijayawad hyderabad delhi Chennai Pune
Nov/12        88        62    90      99   62
Nov/13        85        61    92      85   61
Nov/14        83        54    91      83   54
Nov/15        81        60    89      81   60
Nov/16        78        65    90      66   88
       Bengalore
Nov/12        90
Nov/13        92
Nov/14        71
Nov/15        89
Nov/16        90
> newdata<-matrix(c(98,78,66,55,99,66),nrow=1)
> newdata
     [,1] [,2] [,3] [,4] [,5] [,6]
[1,]   98   78   66   55   99   66
> rnames(newdats)<-"Nov/17"
Error in rnames(newdats) <- "Nov/17" : object 'newdats' not found
> rnames(newdata)<-"Nov/17"
Error in rnames(newdata) <- "Nov/17" : could not find function "rnames<-"
> rname(newdata)<-"Nov/17"
Error in rname(newdata) <- "Nov/17" : could not find function "rname<-"
> rownames(newdata)<-"Nov/17"
> newdata
       [,1] [,2] [,3] [,4] [,5] [,6]
Nov/17   98   78   66   55   99   66
> colnames(newdata)<-c(colnames(temp12))
> newdata
       vijayawad hyderabad delhi Chennai Pune
Nov/17        98        78    66      55   99
       Bengalore
Nov/17        66
> rbind(temp12,newdata)
       vijayawad hyderabad delhi Chennai Pune
Nov/12        88        62    90      99   62
Nov/13        85        61    92      85   61
Nov/14        83        54    91      83   54
Nov/15        81        60    89      81   60
Nov/16        78        65    90      66   88
Nov/17        98        78    66      55   99
       Bengalore
Nov/12        90
Nov/13        92
Nov/14        71
Nov/15        89
Nov/16        90
Nov/17        66
> ftemp<-rbind(temp12,newdata)
> ftemp
       vijayawad hyderabad delhi Chennai Pune
Nov/12        88        62    90      99   62
Nov/13        85        61    92      85   61
Nov/14        83        54    91      83   54
Nov/15        81        60    89      81   60
Nov/16        78        65    90      66   88
Nov/17        98        78    66      55   99
       Bengalore
Nov/12        90
Nov/13        92
Nov/14        71
Nov/15        89
Nov/16        90
Nov/17        66
> c(ftemp)
 [1] 88 85 83 81 78 98 62 61 54 60 65 78 90 92 91
[16] 89 90 66 99 85 83 81 66 55 62 61 54 60 88 99
[31] 90 92 71 89 90 66
> length(ftemp)
[1] 36
>


14 Matrix functions in r languge

a

matrix(c(7,89,9,9,4,2),nrow=2,ncol=3)


t(a)

v<-1:5
dim(v)

dim(t(v))

a[1,3]
a[,2]
a[1,]
----------
a<-matrix(seq(1,21,1),nrow=7)

a[c(2,5),]
---
diag(5)
---
a*2
-
a**2
a+b
---
dim(b)[1]
--nrow(b)
ncol(b)
---
all(a==B)
--

B[4,1] <-100
----
a==b




 

13 statistical functions In R Language

statistical functions

sum()
length()
min
max
min(a,b)
range()
range()[1]
range()[2]
Mean

It is calculated by taking the sum of the values and dividing with the number of values in a data series.

mean()
median()
The median is the value separating the higher half of a data sample, a population, or a probability distribution, from the lower half.
mad()
In statistics, the median absolute deviation (MAD) is a robust measure of the variability of a univariate sample of quantitative data. It can also refer to the population parameter that is estimated by the MAD calculated from a sample.
var()
Variance

The variance is a numerical measure of how the data values is dispersed around the mean. In particular, the sample variance is defined as:
sd()
In statistics, the standard deviation (SD, also represented by the Greek letter sigma σ or the Latin letter s) is a measure that is used to quantify the amount of variation or dispersion of a set of data values.[
corelation
a mutual relationship or connection between two or more things.
cor(,)
covariance is a measure of how much two random variables change together.
cov()
--------
table()
table() function uses the cross-classifying factors to build a contingency table of the counts at each combination of factor levels.

12 seq rep and all functions in r language


R seq Function

seq() function generates a sequence of numbers.

seq(from = 1, to = 1, by = ((to - from)/(length.out - 1)),
    length.out = NULL, along.with = NULL, ...)


• from, to: begin and end number of the sequence
• by: step, increment (Default is 1)
• length.out: length of the sequence

seq(from=:,to,by)

seq(5)
1:5
seq(5)==1:5
all(seq(5)==1:5 )
!all(seq(5)==1:5 )
rep(1,5)
rep("a",50)

11 vector in r language

10 mathametical operatins in r Language

09 what are data sets In R language

08 workspace operators help example many more

07 datatypes and functions

06 Creating Assiging numeric varibles in R language

05 how to install packages

04 How to Navigate R studio - R స్టూడియో ని నావిగేట్ చేయటం ఎలా ?

03 how to install R studio - R స్టూడియో ని ఇన్స్టాల్ చేయటం ఎలా ?

02 how to Install R language -R లాంగ్వేజ్ సాఫ్ట్వేర్ ని install చేయటం ఎలా ?

01 what is R programming In Telugu - R ప్రోగ్రామింగ్ అంటే ఏమిటి ??


R is a programming language and software environment for statistical computing and graphics supported by the R Foundation for Statistical Computing

R Language Training Videos telugu


what is r language

R is a programming language and software environment for statistical computing and graphics supported by the R Foundation for Statistical Computing. The R language is widely used among statisticians and data miners for developing statistical software and data analysis. Polls, surveys of data miners, and studies of scholarly literature databases show that R's popularity has increased substantially in recent years.https://en.wikipedia.org/wiki/R_(programming_language)

R Language Training Videos telugu

Monday, 21 November 2016

Location service In AngularJs Telugu

Scope And rootScope In AngularJs Telugu

MVC Program AngularJs In Telugu

Ng model directive Classes And Status In Telugu

Type validation for application data Using ng model Telugu

Ng model Directive Two Way Binding In AnGularJs Telugu

What is AngularJS Modules In Telugu

Creating the own filters using filter factory function In Ajs Telugu

Click the table headers to change the sorting order Ajs Telugu

Filter an Array Based on User Input In AnjularJs Telugu

Filter Filter In AngularJs In Telugu

Currency Filter In AngularJs Telugu

OrderBy Filter In AngularJs Telugu

Lowercase And uppercase Filters In ANgularJs Telugu

Controllers Code In External Js File In AngularJs In Telugu

Controller with Methods In AnjularJs In Telugu

AngularJS controllers Introduction In Telugu

How Create New Directives in AngularJs In Telugu

What Is Ng repeat directive in AngularJS Telugu

using AngularJS directives Example (Telugu) Program Item Cost Calulator

AngularJS is a MVC based framework In Telugu

AngularJS Arrays in Telugu And AJS Expressions vs JS Expressions

AngularJS Expressions Part 03 Telugu Objects and Strings

AngularJS Expressions Part 02 Telugu

AngularJS Expressions Part 01 Telugu

Ng Init directive in AngularJs Telugu

Basic Concepts In AJS and First Program In Telugu

how to include angularjs CDN in html Telugu

Website made with AngularJs And Editor We are using In Telugu

What is AngularJS In Telugu

Tuesday, 8 November 2016

Seo and Digital marketing training videos in Telugu



Seo and Digital marketing training videos in Telugu

Seo and Digital marketing training Course Modules


Html module

Blogger Module Seo and Digital marketing training

Wordpress Module in vlrtraining

onpage seo ofpage seo web master tools
 Analytics Google Adsense Google adwords
youtube Twitter Module
Search Tips




>


Html & Css

  • What is Html and Xhtml -- Telugu 01
  • Structure and NotepadPlus Editor in Html -- Telugu...
  • Title and Headings in Html -- Telugu 03
  • P and BR elements in Html -- Telugu 04
  • em Strong and Comments in HTML-- Telugu 05
  • Link Tag in HTML -- Telugu 06
  • How to create self links or book marks in page -- ...
  • Email link and Title and Target attributes in HTML...
  • Image Tag and Src, Alt, Height and Width Attribute...
  • Style Attribute in Image Tag -- Telugu 10
  • Link Tag in Imag Tag -- Telugu 11
  • How to use Map Tag in HTML -- Telugu 12
  • Table Tag and tr, td ,Border, th ,style in HTML --...
  • Border collapse, Text align, Border Spacing proper...
  • Colspan, Rowspan, Caption Tags in HTML -- Telugu 1...
  • List Tag in HTML -- Telugu 16
  • CSS Introduction in -- Telugu 17
  • Lineheight, Hex Color Properties in HTML -- Telugu...
  • Font Style and Font Weight Property in CSS -- Telu...
  • Text Indent and Background Color and Text Align Pr...
  • Background Image Property -- Telugu 21
  • Background Propertys Continution -- Telugu 22
  • Padding Property in CSS -- Telugu 23
  • Border Property in CSS -- Telugu 24
  • Margin Property in CSS -- Telugu 25
  • Height and Width Properties of an Element -- Telug...
  • Stylinig Links in CSS -- Telugu 27
  • How to Style the Tables using CSS properties in HT...
  • How to Styling Unordered List in HTML using CSS pr...
  • How to Write Multiple Selectors in One Time and Sp...
  • What is div element and How to set Style for div -...
  • What is Class Selector and Syntax and Example in C...
  • What is ID Selector and How to use in HTML page De...
  • What is Child Selector in CSS and How to use it --...
  • What are Pseudo Elements in CSS How to Apply Part ...
  • What are Pseudo - Elements in CSS How to Apply Par...
  • Internal, External, Inline Styles inCSS and HTML p...
  • Internal, External, Inline Styles in CSS and HTML ...
  • Internal, External, Inline Styles in CSS and HTML ...
  • What is the mean of cascade in CSS how the rules a...
  • Absolute, Relative, Fixed Positions in CSS -- Telu...
  • Max Height and Width Properties in CSS -- Telugu 0...
  • How to Create Text Box and Input Tag Maxlength in ...
  • How to Put Radio Buttons and Check Boxes in HTML -...
  • How to Create Drop Downlist in HTML select and Opt...
  • How to Create Text Area in HTML forms -- Telugu 04...
  • More HTML form Elements -- Telugu 044
  • Host Site Using ftp -- Telugu 045

Blogger Videos

  • What is blogger and how to take blogger account in.01..
  • How to create blog in blogger Telugu-02
  • What is blog dash board in blogger in Telugu-03
  • Creating another blog in blogger in Telugu-04
  • How to backup template in blogger Telugu-05
  • Customize template in blogger part1 Telugu-06
  • Customize template in blogger part 2 Telugu-07
  • Title ,Description,Privacy settings in blogger Tel08...
  • How to set custom domain in blogger Telugu-09
  • How to add Blog Authors and admin in blogger Telug..10.
  • How to restrict blog readers in blogger Telugu-11
  • Posts and comment settings in blogger telugu-12
  • Language settings in blogger Telugu-13
  • Search preferences settings in blogger Telugu-14
  • Other settings in blogger Telugu-15
  • Installing Google Analytics in blogger Telugu-16
  • Difference between posts and pages in blogger Telu..17.
  • How to create post in blogger Telugu-18
  • How to insert image and video in blogger Telugu-19...
  • How to write lables and description in blogger Tel.20..
  • Fevicon ,navbar and hedder settings in blogger Tel.21..
  • Gadgets in Blog Layout in Blogger Telugu 22
  • Gadgets in Blog Layout 2 in Blogger Telugu 23
  • How to Create Page How Add Menu Items in Blogger T..24.
  • Comments Adsense and Stats in Blogger Telugu 25
  • How to Install Custome Template in Blogger telugu 26-...
  • How to Change Images in Slider in Blogger Template 27...
  • How to Change Images and Content in Blogger Templa.28..
  • How to Add Scocial Links in Blogger Template Telug..29.
  • How to Add Drop Down Menu in Blogge Telugu- 30
  • blogger post title before blog title 31

Wordpress training in telugu

  • What is wordpress Telugu- 01
  • Two ways to create website in wordpress Telugu-02
  • Websites developed using wordpress Telugu-03
  • How to install wordpress in local system part 1 Te...
  • How to install wordpress in local system part 2 Te...
  • How to install wordpress in hosting account Telugu...
  • How to install wordpress in hosting account Telugu...
  • How to access and information about wordpress webs...
  • Admin panel in wordpress Telugu-08
  • Wordpress toolbar in Telugu-09
  • What is post and how to create post in wordpress T...
  • Post editor in wordpress Telugu-11
  • Writing the content in wordpress post and format t...
  • Wordpress editor shortcuts for writing content Tel...
  • How to put links in wordpress editor Telugu-14
  • Whai is tags and categories in wordpress post Telu...
  • How to use revision tool or panel in wordpress pos...
  • How to use publish panel in wordpress or options i...
  • What are post formats in wordpress Telugu-18
  • What is Excerpt in wordpress post and how to trunc...
  • How to put images into wordpress post Telugu-20
  • How to delete and move images in wordpress post Te...
  • How to insert videos from youtube in wordpress pos...
  • What is featured image in wordpress post or page T...
  • Insert image gallery into wordpress post Telugu-24...
  • How to create page Telugu-25
  • Wordpres admin area in Telugu-26
  • Customize the wordpress website change active them...
  • Customize the wordpress Look header color and site...
  • Customize the wordpress Menus Telugu-29
  • Add widgets using customize in wordpress Telugu-30...
  • Add menus to widgets using customize in wordpress ...
  • How to set static front page in WordPress Telugu-3...
  • What is plugin and how to install in wordpress Tel...
  • Editing own profile in wordpress Telugu-34
  • How to set profile image in wordpress Telugu-35
  • Create and maintain and roles of users in wordpres...
  • General settings in wordpress Telugu-37
  • Reading and writing settings in wordpress Telugu-3...
  • Media and peramlinks in wordpress Telugu-39
  • Comment setting in wordpress Telugu-40
  • How to backup wordpress website manuvally Telugu-4...
  • How to restore wordpress website Telugu-42
  • BackUpWordPress plugin in wordpress Telugu-43
  • Manuvally upload plugins into wordpress website Te...
  • Akismet plugin in wordpress Telugu-45
  • Protect your text in wordpress no select in Telugu...
  • Prevent download images plugin wordpress Telugu-47...
  • Secure html5 video player plugin Telugu-48
  • Limit the login attempts in wordpress Telugu-49
  • What is bruteforce attack in wordpress Telugu-50
  • One time password plugun in wordpress Telugu-51
  • Secure ftp in wordpress Telugu-52
  • Wordpress security tips Telugu-54
  • W3 Total Cache plug in wordpress Telugu-56
  • Contact us page plugin in wordpress Telugu-57

Google Search Tips

  • Google Search Tips In Telugu Part 01
  • Google Search Tips In Telugu Part 02
  • Google Search Tips In Telugu Part 03
  • Google Search Tips In Telugu Part 04
  • Google Search Tips In Telugu Part 05
  • Google Search Tips In Telugu Part 06
  • Google Search Tips In Telugu Part 07
  • Google Search Tips In Telugu Part 08
  • Google Search Tips In Telugu Part 09
  • Google Search Tips In Telugu Part 10
  • Google Search Tips In Telugu Part 11
  • Google Search Tips In Telugu Part 12
  • Google Search Tips In Telugu Part 13
  • Google Search Tips In Telugu Part 14

on page optimization SEO

  • What Is SEO / Search Engine Optimization?
  • What SEO Used to Be Versus What SEO Is Now
  • How Internet Search Engines Work
  • Different types of keywords in seo
  • SEO Competitive Analysis & Research
  • what is alexa rank And How to check website worth
  • how to use keyword planner for seo
  • how to use screaming frog seo spider
  • url  Structure and domain name
  • on page seo title tag Optimization
  • on page seo meta tags optimization
  • url optimization
  • content optimization
  • image tag optimization
  • anchor text optimization
  • importance of canonical tag
  • over View onpage seo
  • importance of robots txt file in seo How to create
  • GZIP Compression 

Off-Page SEO


  • About keyword research Brain stroming
  • Domain Name,Website Design,Niche or Micro Niche
  • Google keyword position checker
  • Keyword Density,Prominence,Proximity
  • keyword research using google trends 
  • How to submit to search engines 
  • ping submission sites
  • blog directory submission 
  • comment posting in edu and gov sites
  • domain authority and page authority in seo
  • finding competitors back-links and do ofpage
  • Forum posting
  • More on backlinks creations
  • Off Page Article Submissions
  • Off Page Blog Commenting to Create Backlinks
  • Off Page Nofollow Dofollow Links
  • over view of onpage and offpage
  • over view of onpage and ofpage part2
  • SeoQuake SEO toolbar 
  • Panda and Penguin Google Algorithms
  • how to check your site penalized by google  
  • HOW TO RECOVER FROM PENGUIN
  • how to recovery from panda penality
  •  

Webmaster tools

Google webmaster tools training videos



    Introduction to google,bing, yandex,baidu webmasters
    how to verify website in google webmaster tools
    Search Console Dashboard and Messages
    website settings in search console
    search appearance tab in google search console
    what is Structured Data for seo
    Structured Data tab in search console
    Rich Cards Search Console Telugu
    How to use Data Highlighter in Search Console Telugu
    HTML Improvements Search Console Telugu
    Accelerated Mobile Pages AMP Telugu
    Search Analytics In Search Console Telugu Google webmaster tools in Telugu
    Links to Your Site Search Console
    Internal Links Search Console Telugu
    Manual Actions In webmaster Tools telugu
    International Targeting Search Console Telugu
    Mobile Usability Search Console
    Index Status,Blocked Resources,Remove URLs
    Crawl Errors Search Console
    Crawl Stats in Google Web Master Tools
    Fetch as Google WebMaster Tools
    robots txt Tester
    Sitemaps in webmastertools
    URL Parameters,Security Issues,Other Resources

BIng webmaster tools training videos

    How to verify website in bing webmaster
    Dash board and profile in bing webmaster tools
    Sitemaps,Submit URLs,Ignore URL Parameters Bing Webmasters
    Crawl Control,Deep Links,Block URLs,Page Preview
    Disavow Links,Geo Targeting,Verify Ownership,Connected Pages
    Page Traffic,Page Mobile Friendliness,Index Explore
    Search Keywords,SEO Reports,Inbound Links,Crawl Information
    Mobile Friendliness Test,Keyword Research,Fetch as Bingbot
    Markup Validator,SEO Analyzer,Verify Bingbot
    Security,Messages in Bing webmaster Tools

Yandex webmaster tools training videos



    how to register yandex webmaster tools
    how to verify website in yandex webmaster tools
    Troubleshooting,Search queries Yandex
    Indexing tab in yandex webmaster tools
    Links , Site information Yandex webmaster
    Tools Yandex webmaster Telugu


Youtube Optimization

  • what is youtube and use
  • how much earn using youtube
  • Youtube channel ideas
  • create youtube channel
  • youtube chanel art and chanel icon
  • youtube settings
  • how to verify youtube account
  • title description tags
  • how to add anotations to video
  • cards in youtube
  • sco score vid iq
  • video manager and play list
  • community settings
  • how to monetize youtube channel
  • youtube channel settings
  • youtube analytics part 1
  • youtube analytics part 2
  • final words on youtube
  •  

Google adwords

  • what is google adwords
  • sample adwords ads in google
  • keyword search in adwords keyword planner
  • how to set up adwords account 
  • how to set up add campaign in adwords
  • how to set up ad campaign in adwords part 2
  • how to set up ad campaign in adwords part 3
  • how to create ad groups and ads
  • how to monitor ads
  • how to link up adwords to analytics account
  • conversions In google adwords
  • Set bid adjustments to increase or decrease

Google Analytics

  •  what is google analytics 
  • how to integrate analytics to website
  •  About interface
  • Acquisition Group in google analytics
  • Audience tab in google analytic s
  • Behavior group in analytics
  • table view in google analytics
  • how to create filters and dont track my ip 
  • More on filters 
  • how to define goals
  • how to define goals part 2
  • how to filter the data
  • Metrics and Dimensions in Google Analytics
  • segmentation in google analytics
  • Traffic sources in analytics
  • create users and final words

Google Adsense

  • adsense acount reports
  • adsense settings
  • adsense tips how to create website
  • google adsense and how it display ads
  • how to apply adsense using website
  • How to Implemt add code
  • rules for applying the adsense

Google plus

  •  how to create Plus Page
  • how to create collections
  • how to create G plus profile
  • how to edit google plus profile
  • Google Plus Settings
  • how to add business to google maps
  • how to add business to google maps part 2
  • how to create community

Twitter Training

  • 01 what is Twitter HD
  • 02 How to Make a Twitter Account HD
  • 03 profile settings in twitter HD
  • 04 profile settings in twitter HD
  • 05 how to tweet and re tweet HD
  • 06 how to get followers on twitter HD
  • 07 how to use tools to improve your twitter follow...
  • 08 how to add widget to your website HD
  • 09 twitter more HD
  • 10 how to increase more followers HD
  • 11 twitter ads to get followers HD

Monday, 7 November 2016

about keyword research Brain stroming HD

conversions In google adwords HD

how to create ad groups and ads HD

how to link up adwords to analytics account HD

how to monitor ads HD

how to set up ad campaging in adwords HD

how to set up ad campaging in adwords part 2 HD

how to set up ad campaging in adwords part 3 HD

how to set up adwords account HD

keyword search in adwords keyword planner HD

sample adwords ads in google HD

Set bid adjustments to increase or decrease HD

what is google adwords HD

rules for applying the adsense HD

Friday, 4 November 2016

Google Search Tips

Html & Css

html and css training videos in telugu