Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
11 kB
1
Indexable
Never
> class (x)
[1] "numeric"
> class( hoy2)
[1] "Date"
> rm(9)
Error in rm(9) : ... must contain names or character strings
> rm(contador)
> rm(acumulador)
Warning message:
In rm(acumulador) : object 'acumulador' not found
> rm(acumulado)
> rm(altura )
> rm(*.* )
Error: unexpected '*' in "rm(*"
> rm(all)
Warning message:
In rm(all) : object 'all' not found
> rm(Codigos)
> rm(edad)
> rm(n)
> rm(q)
> rm(sexo)
> rm(w)
> ls()
 [1] "dia"          "edat"         "hoy"         
 [4] "hoy2"         "i"            "MisDatos"    
 [7] "muestra"      "osteoporosis" "quadrat"     
[10] "x"            "X"           
> rm(list = ls() )
> numeros <- c( 14,25,9,60)
> semana <-C("lunes","marte","miercoles","jueves")
Error in C("lunes", "marte", "miercoles", "jueves") : 
  object not interpretable as a factor
> semana <-c("lunes","marte","miercoles","jueves")
> semana <-c("lunes","martes","miercoles","jueves")
> semana <-c("Lunes","Martes","Miercoles","Jueves","Viernes")
> semana[1]
[1] "Lunes"
> semana[3
+        ] 
[1] "Miercoles"
> semana[      5]
[1] "Viernes"
> sum( (num[1]+num[3]/num[2] )
+  (num[1]+num[3]/num[2] 
+ 
+  (numeros[1]+numeros[3]/numeros[2] 
+ 
+ numeros[1]     
Error: unexpected symbol in:
"
numeros"
> num[1]     
Error: object 'num' not found
>  (numeros[1]+numeros[3]/(numeros[2]) 
+ resultado <-( (numeros[1]+numeros[3])/numeros[2] )     
Error: unexpected symbol in:
" (numeros[1]+numeros[3]/(numeros[2]) 
resultado"
> resultado <- (numeros[1]+numeros[3])/numeros[2]      
> numeros <- c( 14,25,9,60)
> numero[1]
Error: object 'numero' not found
> numeros[1]
[1] 14
> numeros[1]+numeros[3]
[1] 23
> ( numeros[1]+numeros[3] ) / numeros[2]
[1] 0.92
> resultado <-( numeros[1]+numeros[3] ) / numeros[2]
> numero2<-1:10
> class(numero2)
[1] "integer"
> numeros3<-24:36
> numeros4<- -40:-5
> class (numeros)
[1] "numeric"
> class (numeros3)
[1] "integer"
> -5:5
 [1] -5 -4 -3 -2 -1  0  1  2  3  4  5
> numeros55<-5:5
> resultado2<sum(numeros55(1,length(muneros55)),2)
Error: object 'resultado2' not found
> resultado2<-sum(numeros55(1,length(muneros55)),2)
Error in numeros55(1, length(muneros55)) : 
  could not find function "numeros55"
> resultado2<-sum(numeros55(1,length(nuneros55)),2)
Error in numeros55(1, length(nuneros55)) : 
  could not find function "numeros55"
> resultado2<-sum(numeros55(1,length(numeros55)),2)
Error in numeros55(1, length(numeros55)) : 
  could not find function "numeros55"
> resultado2<-sum(numeros55(1,length(numeros55)),2)
Error in numeros55(1, length(numeros55)) : 
  could not find function "numeros55"
> resultado2<-sum(numeros55(1,length(numeros55)),2)
Error in numeros55(1, length(numeros55)) : 
  could not find function "numeros55"
> numeros55
[1] 5
> numeros55 <-5:5:1
> numeros55 
[1] 5 4 3 2 1
> numeros55 <-5:5
> numeros55 
[1] 5
> -5:5:1
[1] -5 -4 -3 -2 -1  0  1
Warning message:
In -5:5:1 : numerical expression has 11 elements: only the first used
> -5:10:1
[1] -5 -4 -3 -2 -1  0  1
Warning message:
In -5:10:1 : numerical expression has 16 elements: only the first used
> -5:1:5
 [1] -5 -4 -3 -2 -1  0  1  2  3  4  5
Warning message:
In -5:1:5 : numerical expression has 7 elements: only the first used
> 1:10
 [1]  1  2  3  4  5  6  7  8  9 10
> -5:10
 [1] -5 -4 -3 -2 -1  0  1  2  3  4  5  6  7  8  9
[16] 10
> -5:5
 [1] -5 -4 -3 -2 -1  0  1  2  3  4  5
> numeros55<-5:5
> resultado2<-sum(numeros55(1,length(numeros55)),2)
Error in numeros55(1, length(numeros55)) : 
  could not find function "numeros55"
> numeros55(1,length(numeros55)),2
Error: unexpected ',' in "numeros55(1,length(numeros55)),"
> sum(numeros55)
[1] 5
> mean(numeros)
[1] 27
> max(numeros)
[1] 60
> length(numeros55)
[1] 1
> length(numeros)
[1] 4
> numeros3
 [1] 24 25 26 27 28 29 30 31 32 33 34 35 36
> length(numeros3)
[1] 13
> mio<-1:10
> mio
 [1]  1  2  3  4  5  6  7  8  9 10
> summary(numeros)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   9.00   12.75   19.50   27.00   33.75   60.00 
> length(numeros55)
[1] 1
> numeros55
[1] 5
> numeros55<--5:5
> numeros55
 [1] -5 -4 -3 -2 -1  0  1  2  3  4  5
> length(numeros55)
[1] 11
> numeros55(1,length(numeros55)),2)
Error: unexpected ',' in "numeros55(1,length(numeros55)),"
> 1:length(numeros55):2
[1] 1 2
Warning message:
In 1:length(numeros55):2 :
  numerical expression has 11 elements: only the first used
> length(numeros55):2
 [1] 11 10  9  8  7  6  5  4  3  2
> alumno1 = [ 6 , 4.5 , 7.2 , 8.6] 
Error: unexpected '[' in "alumno1 = ["
> alumno1 = 6 , 4.5 , 7.2 , 8.6 
Error: unexpected ',' in "alumno1 = 6 ,"
> alumno1 = c(6 , 4.5 , 7.2 , 8.6) 
> alumno2 = c(9.5 , 8.6 , 6.5 , 3.7)
> alumno3 = C( 5.5 , 8.2 , 7.7 , 9)
Error in C(5.5, 8.2, 7.7, 9) : object not interpretable as a factor
> alumno3 = c( 5.5 , 8.2 , 7.7 , 9)
> alumnototal=alumno1+alumno2+alumno3
> alumnototal=alumno1[]+alumno2[]+alumno3[]
> alumnototal=c(alumno1+alumno2+alumno3)
> alumnototal=c(alumno1)+c(alumno2)+c(alumno3)
> alumnototal=c(alumno1,alumno2,alumno3)
> summary(alumnototal)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  3.700   5.875   7.450   7.083   8.600   9.500 
> max(alumnototal)
[1] 9.5
> densidad<-density(alumnototal)
> densidad

Call:
	density.default(x = alumnototal)

Data: alumnototal (12 obs.);	Bandwidth 'bw' = 1.016

       x                 y            
 Min.   : 0.6512   Min.   :0.0003936  
 1st Qu.: 3.6256   1st Qu.:0.0148862  
 Median : 6.6000   Median :0.0808851  
 Mean   : 6.6000   Mean   :0.0839469  
 3rd Qu.: 9.5744   3rd Qu.:0.1438475  
 Max.   :12.5488   Max.   :0.1932564  
> mean(alumnostotal)
Error in mean(alumnostotal) : object 'alumnostotal' not found
> mean(alumnototal)
[1] 7.083333
> max(alumnototal)
[1] 9.5
> median(alumnototal)
[1] 7.45
> quantile(alumnototal)
   0%   25%   50%   75%  100% 
3.700 5.875 7.450 8.600 9.500 
> View(densidad)
> View(densidad)
> View(densidad)
> View(densidad)
> densidad

Call:
	density.default(x = alumnototal)

Data: alumnototal (12 obs.);	Bandwidth 'bw' = 1.016

       x                 y            
 Min.   : 0.6512   Min.   :0.0003936  
 1st Qu.: 3.6256   1st Qu.:0.0148862  
 Median : 6.6000   Median :0.0808851  
 Mean   : 6.6000   Mean   :0.0839469  
 3rd Qu.: 9.5744   3rd Qu.:0.1438475  
 Max.   :12.5488   Max.   :0.1932564  
> 
> x <- "0.316362437326461129"
> write_clipboard(x)
Error in write_clipboard(x) : could not find function "write_clipboard"
> clipwoard
Error: object 'clipwoard' not found
> if(4>3) {}
NULL
> if(4>3) {
+     "verdadero"
+ }
[1] "verdadero"
> if(4<3) {
+     "verdadero"
+ }
> clipboard()
Error in clipboard() : could not find function "clipboard"
> write_clipboard(x, ...)
Error in write_clipboard(x, ...) : 
  could not find function "write_clipboard"
> write_clipboard(x)
Error in write_clipboard(x) : could not find function "write_clipboard"
> n<-8
> if (n) {
+   "n mayor de 6"
+ } else {
+   "n menor de 6"
+ }
[1] "n mayor de 6"
> n<-3
> if (n) {
+   "n mayor de 6"
+ } else {
+   "n menor de 6"
+ }
[1] "n mayor de 6"
> library(clipr)
Welcome to clipr. See ?write_clip for advisories on writing to the clipboard in R.
> ?write_clip
> text<-"hola mundo"
> write_clip(text)
> min (alumno1)
[1] 4.5
> if min (alumno1) > 5 {
Error: unexpected symbol in "if min"
> if min(alumno1) > 5 {
Error: unexpected symbol in "if min"
> if (min(alumno1)) > 5 {
Error: unexpected '>' in "if (min(alumno1)) >"
> if (alumno3[3]) > 5 {
Error: unexpected '>' in "if (alumno3[3]) >"
> alumno3 = c( 5.5 , 8.2 , 7.7 , 9)
> if (alumno3[3]) > 5 {
Error: unexpected '>' in "if (alumno3[3]) >"
> if (alumno3[3] > 5) {
+   "materia aprobada"
+ } else {
+   "materia no aprobada"
+ }
[1] "materia aprobada"
> 
>   "curso progresa"
[1] "curso progresa"
> if (mean(alumnototal) > 6) {
+   "curso progresa"
+ } else {
+   "curso no progresa"
+ }
[1] "curso progresa"
> mean(alumnototal)
[1] 7.083333
> nota<-5.6
> 
> if (nota < 5) {
+   "Suspenso"
+ } else if (6<nota<7) {
Error: unexpected '<' in:
"  "Suspenso"
} else if (6<nota<"
> nota<-4
> 
> if (nota<5) {
+   "Suspenso"
+ } else if (6<nota<7) {
Error: unexpected '<' in:
"  "Suspenso"
} else if (6<nota<"
> nota<-4
> 
> if (nota<=5) {
+   "Suspenso"
+ } else if (6<nota<7) {
Error: unexpected '<' in:
"  "Suspenso"
} else if (6<nota<"
> nota<-4
> 
> if (nota<=5) {
+   "Suspenso"
+ } 
[1] "Suspenso"
> nota<-4
> 
> if (nota<=5) {
+   "Suspenso"
+ } else if (6<nota<7) {
Error: unexpected '<' in:
"  "Suspenso"
} else if (6<nota<"
> nota<-4
> 
> if (nota<=5) {
+   "Suspenso"
+ } elseif (6<nota<7) {
Error: unexpected symbol in:
"  "Suspenso"
} elseif"
> nota<-4
> 
> if (nota<=5) {
+   "Suspenso"
+ } else if (6<nota<7) {
Error: unexpected '<' in:
"  "Suspenso"
} else if (6<nota<"
> nota<-4
> 
> if (nota<=5) {
+   "Suspenso"
+ } else  (6<nota<7) {
Error: unexpected '<' in:
"  "Suspenso"
} else  (6<nota<"
> nota<-8
> 
> if (nota<=5) {
+   "Suspenso"
+ } else if (nota<6) {
+    "Suficiente"
+ } else if (nota<7) {
+    "Bien"
+ } else if (nota<9) {
+   "Notable"
+ } else if (nota<10) {
+   "Sobresaliente"
+ }
[1] "Notable"
> nota<-4
> 
> if (nota<=5) {
+   "Suspenso"
+ } else if (nota<6) {
+    "Suficiente"
+ } else if (nota<7) {
+    "Bien"
+ } else if (nota<9) {
+   "Notable"
+ } else if (nota<10) {
+   "Sobresaliente"
+ }
[1] "Suspenso"
> nota<--4
> 
> if (nota<=5) {
+   "Suspenso"
+ } else if (nota<6) {
+    "Suficiente"
+ } else if (nota<7) {
+    "Bien"
+ } else if (nota<9) {
+   "Notable"
+ } else if (nota<10) {
+   "Sobresaliente"
+ }
[1] "Suspenso"
>
semana <-c("Lunes","Martes","Miercoles","Jueves","Viernes")
semana[1]
semana[3       ] 
semana[      5]
 (numeros[1]+numeros[3]/(numeros[2]) 
resultado <- (numeros[1]+numeros[3])/numeros[2]      
alumno1 = c(6 , 4.5 , 7.2 , 8.6) 
alumno2 = c(9.5 , 8.6 , 6.5 , 3.7)
alumno3 = c( 5.5 , 8.2 , 7.7 , 9)
alumnototal=c(alumno1,alumno2,alumno3)
summary(alumnototal)
max(alumnototal)
densidad<-density(alumnototal)
x <- "0.316362437326461129"
write_clipboard(x)
n<-3
if (n) {
  "n mayor de 6"
} else {
  "n menor de 6"
}
alumno1 = c(6 , 4.5 , 7.2 , 8.6) 
alumno2 = c(9.5 , 8.6 , 6.5 , 3.7)
alumno3 = c( 5.5 , 8.2 , 7.7 , 9)

if (alumno3[3] > 5) {
  "materia aprobada"
} else {
  "materia no aprobada"
}

if (mean(alumnototal) > 6) {
  "curso progresa"
} else {
  "curso no progresa"
}
mean(alumnototal)

nota<--4

if (nota<=5) {
  "Suspenso"
} else if (nota<6) {
   "Suficiente"
} else if (nota<7) {
   "Bien"
} else if (nota<9) {
  "Notable"
} else if (nota<10) {
  "Sobresaliente"
}