[R] solve the equation in R

2012-05-17 Thread Pei-Ling Lin
Hi all, I need to solve this following equation which the unknown value (here is a) is on the exponent place, could anybody please help me to figure it out? I tried to use lm.sol() or solve() function but it doesn't work.. Thanks for help, Peiling (x, y) = (2.21, 1.01) y = 1 + x

[R] Stripes in the plot

2010-10-12 Thread Pei-ling
I'm trying to plot the spatial distribution of the precipitation within an area. However, I think some thing wrong with the way to create the matrix for the precipitation data, so it came out lots of stripes. Could somebody help to see what's the problem? Here's the code: