similar to: inverse cumsum

Displaying 20 results from an estimated 1000 matches similar to: "inverse cumsum"

2008 Jun 27
2
NA value
I'm trying to replace NA with 0 value... I've write a loop, but don't work... Where's the problem? > cimfasy_rwl 1991 0.92 0.72 0.50 1.29 0.54 1.22 1992 2.15 1.28 1.23 2.26 1.22 3.17 1993 1.50 0.87 1.68 1.97 0.83 2.55 1994 0.69 0.00 0.76 1.89 0.60 0.87 1995 1.13 1.04
2009 Jun 23
7
first value...
Hi, I've a vector like this: > inc [1] NA NA NA NA NA NA NA [8] NA NA NA NA NA NA NA [15] NA NA NA NA NA NA NA [22] NA NA NA NA NA NA NA [29] NA NA NA NA
2007 Sep 17
3
data frame
Hi everybody, If I've a data frame like this: dataframe a X0 X2 X4 X6 X8 X10 X12 X14 X16 1957 0 0 0 0 0 0 0 0 0 1958 0 0 0 0 0 0 0 0 0 1959 831 0 0 0 0 0 0 0 0 1960 544 282 0 0 0 0 0 0 0 1961 446 365 0 0 0 0 0 0 0 1962 442 473 0 0 0 0 0 0 0 1963 595 468 0 0 0 0 0 0 0 1964
2011 Mar 26
3
round number
Hi, > a <- 4 > a*0.2 [1] 0.8 ok!! Is there a method to obtain this: > a*0.2 [1] 0.80 I need to round the number also with the zero. Thanks in advance, Alfredo
2008 Jun 19
3
colnames of a column
Hi, With this data.frame: > class(rwl) [1] "data.frame" >rwl 0028002F 0028013F 0028032F 1833 3.39 NA NA 1834 3.09 NA NA 1835 3.05 NA NA 1836 3.31 NA NA 1837 2.26 NA NA > colnames(rwl) [1] "0028002F" "0028013F" "0028032F" Ok.... > colnames(rwl[,1]) NULL why??
2008 Jun 24
3
loop with files
I'm trying to make a loop with many files... > library(dplR) > > files <- system("ls *.rwl", intern=TRUE) > > files [1] "cimfasy.rwl" "rocquce.rwl" > for (i in files) {a <- read.rwl(i,header=0)} There are 70 series There are 21 series > class(a) [1] "data.frame" This loop import all the files rwl in a single data.frame ( a
2009 Jun 23
4
vector and NA
Hi, I've a vector like this: ------------------------------------------------------ > inc[,5] [1] NA NA NA NA NA NA NA [8] NA NA NA NA NA NA NA [15] NA NA NA NA NA NA NA [22] NA NA NA NA NA NA
2007 Sep 13
2
loop function
Hi, If I have this values: 21 23 14 58 26 .... How can I sum the values by a progression like this: (21) (21 + 23) (21 + 23 + 14) (21 + 23 + 14 + 58) (21 + 23 + 14 + 58 + 26) (21 + 23 + 14 + 58 + 26....) I've try with the function "loop".... Best Wishes, Alfredo [[alternative HTML version deleted]]
2008 Sep 11
2
count value
Hi, I've this data.frame: > dia X1006109F X1006110F X1006111F X1006112F X1006113F X1006114F X1006115F 1 NA NA NA NA NA 45 NA X1006116F X1006117F X1006118F X1006119F X1006120F X1006122F X1006123F 1 45 NA NA NA 40 NA NA X1006124F X1006125F X1006126F X1006128F X1006203F X1006209F X1006210F
2009 Oct 17
2
sum two columns with same value
Hi, I've two dataframe: > snag_totale AREA snag_ha 1 2 1.628128 2 3 10.274249 3 4 2.778503 4 5 73.764307 5 7 12.015985 > log_totale AREA log_ha 1 1 22.29846 2 2 17.16889 3 3 48.80377 4 4 144.18996 5 5 70.30962 6 6 61.81850 7 7 13.24876 > How can I obtain a new data.frame, by the sum of value "snag_ha" +
2011 Jul 07
3
coefficients lm of data.frame
Hi, I've a data frame like this: > as.data.frame(cbind(rnorm(1:12),rnorm(1:12))) V1 V2 1 -1.30849402 -0.52094136 2 0.96157302 0.76217871 3 -0.44223351 -1.72630871 4 -0.10432438 -1.04732942 5 -1.38748914 0.95877311 6 -0.63965975 0.65494811 7 -0.24058318 0.19496830 8 -0.11172988 1.01680655 9 0.08065333 0.22168589 10 0.25196536 0.84619914 11
2010 Feb 09
1
Superimpose ksmooth() onto barplot
I'd like to superimpose a ksmooth() onto a barplot(). My data is: > d 2009-06-20 2009-06-21 2009-06-22 2009-06-23 2009-06-24 2009-06-25 2009-06-26 2009-06-27 2009-06-28 2009-06-29 2009-06-30 2009-07-01 2009-07-02 Same Breed (B) 12.64 21.08 13.52 12.51 13.71 9.91 14.24 7.18 11.81 5.92 12.04 17.96
2007 Sep 14
6
replace NA value with 0
Hi, how can I replace NA value with 0: 1991 217 119 103 109 137 202 283 240 146 NA 1992 270 174 149 144 166 239 278 237 275 NA 1993 146 111 104 89 98 131 153 148 175 NA 1994 177 123 146 124 121 200 266 191 240 106 1995 145 98 95 89 95 130 183 161 164 129 1996 145 98 89 90 93 138 158 131 161 161 1991 217 119 103 109 137 202 283 240 146 0 1992 270 174 149 144 166 239 278 237
2009 Nov 10
1
aggregate data.frame
Hi, I've two data.frame: ind_comp and dati_area > ind_comp INDEX indice 1 1 0.3081856 2 2 0.1368007 3 3 0.1290952 4 4 0.2905484 5 5 0.2686706 6 6 0.1122784 7 7 0.4493264 8 8 0.1932665 9 9 0.1982783 10 11 0.3724666 > dati_area X_COORD Y_COORD DBH AREA ID ind_comp 1 0.0000000 0.0000000 70.0 1 1 0 2
2010 Feb 18
1
aggregate by column names
Hi, I've this dataframe: V1 V5 V6 1 MOD13Q1_2000049 0.1723 A1 2 MOD13Q1_2000049 0.1824 B1 3 MOD13Q1_2000049 0.1824 C1 4 MOD13Q1_2000049 0.1774 A2 5 MOD13Q1_2000049 0.1953 B2 6 MOD13Q1_2000049 0.1824 C2 7 MOD13Q1_2000065 0.1921 A1 8 MOD13Q1_2000065 0.1938 B1 9 MOD13Q1_2000065 0.2009 C1 10 MOD13Q1_2000065 0.2035 A2 11 MOD13Q1_2000065 0.2157 B2 12
2010 Jan 20
1
sum column by colnames
Hi, I've this dataframes: > data1 1 2 3 4 5 6 5 0.4963017 0 0 0.2481509 1.9852069 0.4963017 10 0.0000000 0 0 0.0000000 0.6317266 0.0000000 15 0.0000000 0 0 0.0000000 0.0000000 0.0000000 20 0.0000000 0 0 3.3955301 0.0000000 0.0000000 25 0.0000000 0 0 0.0000000 0.0000000 0.0000000 30 0.0000000 0 0 0.0000000 0.0000000
2010 Aug 30
1
compare three values
Hi, I've three values. What is the best method to choice the lowest values with an if function? example: a = 3 b = 1 c = 5 if (lowest(a,b,c) is a) {........} if (lowest(a,b,c) is b) {........} if (lowest(a,b,c) is c) {........} Thanks, Alfredo
2008 Mar 06
2
Help with parsing a data file
Hi All, I need to parse data from a file, example shown below. The first two lines can be skipped, the third line contains the column names. The next 13 lines can be skipped. The next line "1991" is a year value, with the following 13 values data for that year. The file then repeats this format with (year, 13 lines of data for that year). I would ideally like to end up with an
2009 Nov 21
2
how to ignore NA when using cumsum?
I would like to cumulatively sum rows in a matrix, in which each row has 1 NA value. The usual "na.rm=TRUE" does not seem to work with the command cumsum. Is there another way to ignore the NAs or do I need to figure out a different way to do this? Here's an example matrix of title "proportion": Ntrail Strail NFJD Baldy Onion Crane [1,]
2011 Jul 18
1
cluster by unique value
Hi, I need to make a cluster classification by the unique values of the data frame. I explain the problem. I need to classify this table, and assign to the same cluster each row that has the same combination of value: > data1 layer_1 layer_2 layer_3 [1,] 0.2460000000 2 -0.1 [2,] 0.5460000000 3 -0.1 [3,] 0.2460000000 2 -0.1 [4,]