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]]