[R-es] ayuda con dos sencillos problemas.

Marcuzzi, Javier Rubén javier.ruben.marcuzzi en gmail.com
Vie Ene 4 00:52:51 CET 2013


Estimado Victor

Creo que la ayuda de Carlos es muy buena, voy a explicarte lo que
prentendi en mi correo anterior.

Tomando como ejemplo las temperatura a lo largo del año en mi zona
geográfica (Santa Fe, Argentina), en Enero es verano, unos 40 grados, en
Junio unos 0 o -2 grados, en Diciembre unos 35 grados.

Pensando en una gráfica, en el eje X los números 1,2,3,...,12 de acuerdo
al mes. En las Y la temperatura. La gráfica tendía una forma de "V".

Suponiendo una regresión (por decir algo), tiene temperaturas altas para
los números bajos y altos (en meses) y bajos para el mes (6). Eso es un
problema, pero si lo paso a factores "as.factor(X)", el problema
desaparece, porque cada mes es un factor, se podría separar en las
cuatro estaciones, etc. (siempre como factor).

El resto creo que es superponer al material que indico Carlos.

Javier Marcuzzi.
 
El mié, 02-01-2013 a las 19:04 +0100, Víctor Macía escribió:
> Hola gente. Me presento, me llamo Vctor y soy bastante novato en R. Me piden hacer dos sencillos problemas pero como no tengo mucha idea no s por dnde tirar ni mirar informacin para hacerlos.
> 
> Os explico,
> 
> 1.- el primero es definir las caractersticas de dos tipos de datos: o 
> bien lists y vectors o bien character y factors. Decir sus ventajas y 
> desventajas y poner una serie de ejemplos. He visto algo por internet 
> pero la informacin es bastante escasa y poco clara (sobre todo en 
> castellano). Os copio lo que me piden en el enunciado:
> 
> Either: Describe the differences between the R list and vector (i.e. 1-dimensional array) data types. Outline
> the advantages and disadvantages of both data types, and give examples of where each might be appropriately
> used.
> Or: Describe the differences between the R character and factor data types. Outline the advantages and
> disadvantages of both data types, and give examples of where each might be appropriately used.
> Max 2000 words.
> 
> 2.-
>  el segundo es de programacin propiamente dicha. Me dan un listado de 
> datos de una votacin en Londres y tengo que hacer dos diferentes 
> funciones: una para dibujar crculos en cada barrio proporcionales a los
>  votos del partido ganador, y otra para manejar la leyenda. Tambin os copio el enunciado:
> 
> 1. In essay form, describe the functionality of the code you have written, providing an overview of the
> code, the features of R exploited in the code and also also emphasising the reasons for choosing the
> techniques you have used, the individual R functions that you have written: max 2000 words.
> 2. Provide documentation of each function you have written (in a similar style to the R help system).
> 3. Provide a listing of the code you have written, making full use of #-style comments in the code.
> 4. Provide a demonstration of the code being used, by showing one or more examples.
> 
> Write a function to draw a proportional circles map for a given variable, and SpatialPolygonsDataFrame
> 
> You can make use of the file londonvotes.RData in the assignment folder - this contains a number of numeric
> variables: Majority, Electorate, Candidate.Votes, Total.constituency.votes, and others.
> Note that there is also a legend on this map. Create another function, that, given a location to draw the
> legend, the values to show on the legend and the variable being mapped, will add the legend to the map.
> 
> Si me pudierais echar una mano os lo agradecera muy mucho. 
>  		 	   		  
> 	[[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