[R-es] help: Función solve
Marcuzzi, Javier Rubén
javier.ruben.marcuzzi en gmail.com
Sab Nov 10 03:57:23 CET 2012
Hola, yo lo probé pero en mi computadora el siguiente código anda.
A <- matrix(c(1, 1, 1, 1, 1,
4, 5, 6, 7, 8,
0, 0, 0, 1,-1,
0, 0, 0, 0, 1,
1, 0, 0, 0, 0
), nrow=5,byrow=T )
A
b <- c(40+1, 208, 0, 2, 14) # Jugar con los dos utlimos parametros hasta
b
x <- solve(A,b)
x[1]
RStudio 0.97.168
> version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 2
minor 15.2
year 2012
month 10
day 26
svn rev 61015
language R
version.string R version 2.15.2 (2012-10-26)
nickname Trick or Treat
-----Mensaje original-----
From: Javier Villacampa González
Sent: Friday, November 09, 2012 3:41 PM
To: r-help-es en r-project.org
Subject: [R-es] help: Función solve
Pues yo empleo windows7 RStudio y al final del mail teneis los parametros.
Ahora me surje otra pregunta. Personalmente me gustaría utilizar los
valores de este vector como parametros en una fucnión de tipo rep("hola
mundo", x[1]).
Por ultimo me gustaría notar que si hago esto el número de repeticiones se
corresponde con los valores de la función as.integer.
Vean, vean.
> x[1] 14 16 7 2 2
> as.integer(x)[1] 13 16 6 2 2
Muchas gracias a todos por la ayuda.
> sessionInfo()R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252
LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
[5] LC_TIME=Spanish_Spain.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lme4_0.999999-0 Matrix_1.0-6 lattice_0.20-6
loaded via a namespace (and not attached):
[1] grid_2.15.1 languageR_1.4 MuMIn_1.7.11 nlme_3.1-104
stats4_2.15.1 tools_2.15.1
[[alternative HTML version deleted]]
_______________________________________________
R-help-es mailing list
R-help-es en r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es
Más información sobre la lista de distribución R-help-es