Displaying 20 results from an estimated 9000 matches similar to: "(list) object cannot be coerced to type 'double'"
2010 Jan 16
2
Drought severity index: Excel to R
Dear all,
I'm trying to make an R code for the drought severity index (DSI)
developed by Philips and McGregor (1998). You can refer to the
description of the algorithm on page 19 from
http://dissertations.port.ac.uk/229/01/MaloneS.pdf
The code is given in Excel as the following and can be found on page 60
from the same link.
C7 =
IF(C6<0,IF(@SUM(A6:A1)<0,C6+A6,"0"),
2008 Jun 17
2
[Bug 16395] New: glib abort for "double free or corruption" in jpeg code
http://bugs.freedesktop.org/show_bug.cgi?id=16395
Summary: glib abort for "double free or corruption" in jpeg code
Product: swfdec
Version: git
Platform: Other
URL: http://speed.pointroll.com/PointRoll/Media/Banners/Veriz
on/581557/728x90_Initial_11_14_AtomFilms_113007.swf?PRAd
2015 Nov 21
0
[Aarch64 v2 08/18] Add Neon fixed-point implementation of xcorr_kernel.
Used for celt_pitch_xcorr on aarch64, and celt_fir and celt_iir on both armv7 and aarch64.
---
celt/arm/arm_celt_map.c | 17 +++++++++++++
celt/arm/celt_neon_intr.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++-
celt/arm/pitch_arm.h | 31 +++++++++++++++++++++++-
3 files changed, 107 insertions(+), 2 deletions(-)
diff --git a/celt/arm/arm_celt_map.c b/celt/arm/arm_celt_map.c
index
2009 Apr 01
1
[Bug 21004] New: segfault loading www.serjtankian. com in swfdec_buffer_ref at swfdec_buffer.c:269
http://bugs.freedesktop.org/show_bug.cgi?id=21004
Summary: segfault loading www.serjtankian.com in
swfdec_buffer_ref at swfdec_buffer.c:269
Product: swfdec
Version: unspecified
Platform: Other
URL: http://www.serjtankian.com
OS/Version: All
Status: NEW
Severity: critical
Priority:
2006 Oct 15
4
Hide line ends behind unfilled circles?
Dear r-helpers,
xx <- c(0.000, 0.210, 0.714, 0.514, 1.000, 0.190, 0.590, 0.152)
yy <- c(0.000, 0.265, 0.256, 0.521, 0.538, 0.761, 0.821, 1.000)
aa <- c(19, 19, 19, 21, 19, 21, 21, 21)
x0 <- xx[c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 7)]
y0 <- yy[c(1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 7)]
x1 <- xx[c(2, 3, 3, 4, 6, 4, 5, 5, 6, 7, 7, 7, 8, 8)]
y1 <- yy[c(2, 3, 3, 4, 6, 4, 5,
2009 Dec 04
2
Standard deviation for each element in a set of matrices
Hello R-users,
I would like to know how to find the standard deviation for each element
in a set of matrices.
Given the following files,
File1 File2 File3
1 1 1 4 4 4 7 7 7
2 2 2 5 5 5 8 8 8
3 3 3 6 6 6 9 9 9
I want to calculate the standard deviation for every cell in the file
(I'm using gridded data). The desired output is
Output
3 3 3
3 3
2010 Jan 02
1
Question on Reduce + rollmean
Hello useRs,
I'd like to perform a moving average on the dataset, xx. I've tried
combining the functions Reduce and rollmean but it didn't work.
> r <- function(n) rollmean(n, 2) # where 2 = averaging interval
> output < - Reduce("r", x)
Error in f(init, x[[i]]) : unused argument(s) (x[[i]])
Is there anything wrong with the code in the first place?
where
2009 Dec 30
2
select elements and transpose
Hi all,
Given the following,
> xx
[[1]]
V1 V2 V3
[1,] 1 2 3
[2,] 4 5 6
[3,] 7 8 9
[[2]]
V1 V2 V3
[1,]10 11 12
[2,]13 14 15
[3,]16 17 18
[[3]]
V1 V2 V3
[1,]19 20 21
[2,]22 23 24
[3,]25 26 27
how do i extract elements in each file so that after transpose, it looks
something like the following;
1
10
19
2
11
20
3
12
21
and so on..
Thanks..
--
Muhammad
2011 Aug 02
3
Inverse of FAQ 7.31.
Why does R think these numbers ***are*** equal?
In a somewhat bizarre set of circumstances I calculated
x0 <- 0.03580067
x1 <- 0.03474075
y0 <- 0.4918823
y1 <- 0.4474461
dx <- x1 - x0
dy <- y1 - y0
xx <- (x0 + x1)/2
yy <- (y0 + y1)/2
chk <- yy*dx - xx*dy + x0*dy - y0*dx
If you think about it ***very*** carefully ( :-) )
2011 Jun 16
2
Polygon question
Hi all,
I have the following script which fills the values which are less than
the mean of a given timeseries.
If you look closely, the colored regions are "out of line".
Any suggestions how I can rectify this?
Thanks
Muhammad
# -----
#rm(list=ls())
x <- abs(rnorm(100))
tt <- 1:100
m <- mean(x)
w <- which(x>=m)
x1 <- x ; x2 <- x ; x3 <- x
x1[w] <- m
2009 Dec 27
3
Scaling error
Hi useRs,
I ran into an inconsistent output problem again. Here is the simplify
illustration
I've got a matrix as follows
> x
V1 V2 V3
[1,] 1 2 3
[2,] 4 5 6
[3,] 7 8 9
Associated with the matrix is a scaling factor, sca, derived from, say
the mean of the respective columns, V1-V3;
> sca
V1 V2 V3
2.5 1.7 3.6
2010 Jan 06
1
Increment in loop
useRs,
I'm getting limited success in trying to apply increment in a loop.
The following defined function creates a +1 increment
incr <- function(x){
eval.parent(substitute(x <- x + 1))
print(x) }
How do I apply it in a loop on my test dataset, x1, so that the procedure becomes
x1[c(1:2)]
x1[c(2:3)]
x1[c(3:4)]
where x1 =
> m <- matrix(1:3,3,3)
> x1 <- list(m, m+1,
2007 Jun 14
0
Branch 'as' - 7 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c player/Makefile.am
libswfdec/swfdec_movie.c | 14 +++++++++++---
libswfdec/swfdec_player.c | 1 +
libswfdec/swfdec_sprite_movie.c | 4 ++--
libswfdec/swfdec_tag.c | 3 +++
player/Makefile.am | 4 ++--
5 files changed, 19 insertions(+), 7 deletions(-)
New commits:
diff-tree 228be8a9445d25e41ecd7a09102c85609ec81ad7 (from 361883eb263c60510a743ad9e419d263bc898ac8)
2009 Dec 07
1
Output multiple files
Hello,
I want the ouput to take the name of the original file. I have the following code - but the problem is that the output overrides the original file which I desire not.
So given an input file called File1.txt, I want the ouput to be called File1.out.txt, or something along this line. I'm working with many files, fyi.
out=c("file1.txt", "file2.txt",
2009 Dec 20
3
Object of type 'closure' not subsettable
Hi all,
How can I overcome the error "object of type 'closure' not subsettable"
I ran the following script
seq <- paste(seq(1914, 1916, by=1), "*.y", sep=".") # make sequence
c <- 3 # total number of files
d2 <- file # creates dummy file
# Input sequence in loop
for (i in 1:3){
list <- list.files("~/ukcp09/txt/x.djf", seq[[i]])
file
2007 Apr 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_font.c libswfdec/swfdec_loadertarget.c libswfdec/swfdec_movie.h libswfdec/swfdec_pattern.c libswfdec/swfdec_pattern.h libswfdec/swfdec_player.c
libswfdec/Makefile.am | 2
libswfdec/swfdec_color.c | 23 +++
libswfdec/swfdec_color.h | 3
libswfdec/swfdec_font.c | 5
libswfdec/swfdec_loadertarget.c | 2
libswfdec/swfdec_movie.h | 5
libswfdec/swfdec_pattern.c | 229 ++++---------------------------------
libswfdec/swfdec_pattern.h | 24 ++-
2009 Dec 02
2
Arithmetic on multiple files
Dear R-users,
I'd like to perform arithmetic functions on 1000 files containing a
2000x2000 matrix. Can anyone advise?
For example,
File1 File2 Output
1 1 1 4 4 4 5 5 5
2 2 2 + 5 5 5 = 7 7 7
3 3 3 6 6 6 9 9 9
Muhammad
--
Muhammad Rahiz | Doctoral Student in Regional Climate Modeling
Climate Research
2007 Jun 14
0
Branch 'as' - 4 commits - libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite_movie.c player/swfdec_debug_movies.c
libswfdec/swfdec_edittext_movie.c | 9 +++++++--
libswfdec/swfdec_movie.c | 10 ++++------
libswfdec/swfdec_movie.h | 2 ++
libswfdec/swfdec_sprite.c | 2 ++
libswfdec/swfdec_sprite_movie.c | 5 +++--
player/swfdec_debug_movies.c | 2 +-
6 files changed, 19 insertions(+), 11 deletions(-)
New commits:
diff-tree
2010 Jan 29
2
Create matrix with subset from unlist
Hello all,
I'm trying to create a 2x2 matrix, 32 times after unlist() so that I can
convert the list to matrix. I've looked through the R archive but
couldn't find the answer. There is what I've done.
> f <- system("ls *.txt", intern=TRUE)
> x <- lapply(f, read.table)
> x
[[1]]
V1 V2
1 -27.3 14.4
2 29.0 -38.1
[[2]]
V1 V2
1 14.4
2009 Dec 26
1
if else does not return right value
Hi all,
I'm not getting the right results for values that are >99 using the if
else function. The following illustrates the problem
> x <- as.matrix(read.table("test.txt"))
> x
V1 V2 V3
[1,] 47 1 43
[2,] 83 2 42
[3,] 1 3 41
[4,] 39 4 40
[5,] 23 5 39
[6,] 23 6 38
[7,] 39 7 37
[8,] 32 8 36
[9,] 73 9 35
[10,] 124 10 34
Specifying the