Re: [R] approximating matrix columns

2012-06-05 Thread eliza botto
Dear Rui, i am greatful for everything you did. bret advised me to use dput(), which i did. yes! i forgot to complement him. i literally feel sorry for that. i hope you wont mind and continue extending your help. regards and love for every one eliza botto waters inn > Date: Tue, 5 Jun 2012 12:4

Re: [R] approximating matrix columns

2012-06-05 Thread Rui Barradas
Hello, Try apply(mat, 2, approx, method=”linear”, n=365) This reads "apply to each column (dimension = 2) of mat the function approx with extra args method and n". Three notes. 1. Your data does NOT have three list, it IS one list with three vectors. 2. 'matrix' is a function so choose somet

[R] approximating matrix columns

2012-06-05 Thread eliza botto
Dear Gunter Berton and all, As you can see, my data has three lists each containing 366 entries. I converted them into the matrix. I now want to approx./interpolate 366 entries over 365 intervals, Which means I want to have a matrix with 365 entries. I used approx(matrix, method=”linear”,

Re: [R] approximating matrix columns

2012-06-04 Thread Bert Gunter
1. Please follow the posting guide and provide a small reproducible example. See ?dput to provide data. 2. Please do not double post. -- Bert On Mon, Jun 4, 2012 at 4:47 PM, eliza botto wrote: > >  Dear R users, >  we generally apply approx() command to a list data. how can we apply this > com

[R] approximating matrix columns

2012-06-04 Thread eliza botto
Dear R users, we generally apply approx() command to a list data. how can we apply this command to a matrix, so that we can approximate 366 readings from certain number of each column over 365 intervals?? more precisely, i want to interpolate 366 discharge readings, in each 8 columns of a mat