similar to: Sum(..) in apply()

Displaying 20 results from an estimated 3000 matches similar to: "Sum(..) in apply()"

2013 Jul 20
1
how to calculate the average values of each row in a matrix
Hello, I have a matrix (class matrix) composed of GridCell (row and column). The matrix value is the beta diversity index value between two grids. Now I would like to get the average value of each GridCell. Please kindly advise how to make the calculation. Thank you. Elaine The matrix looks like (cited from Michael Friendly) I would like to get the average value of each color. Obs
2007 Jul 23
11
Memory problem with GridCell*Editor
Alex, I was getting the following crashes when editing cells in a grid: ./init.rb:1072:in `main_loop'': undefined method `begin_edit'' for "_p_wxEvent":String (NoMethodError) from ./init.rb:1072 but only after the first App GC mark phase. So I changed all the GridCell*Editor.i files from GC_MANAGE to GC_MANAGE_AS_EVENT. Which stopped the crashing. My question
2012 Feb 03
3
[fields] image.plot abends with NAs in image.plot.info
summary: image.plot-ing two sets of netCDF data, with the second derived from the first. First plots to PDF as expected (title, data, legend). Second plots the data and title, but abends before drawing the legend, with > Error in if (del == 0 && to == 0) return(to) : > missing value where TRUE/FALSE needed > Calls: plot.layers.for.timestep -> image.plot -> seq ->
2017 Jul 05
4
expand gridded matrix to higher resolution
Hi all, (if me email goes out as html, than my email client don't do as told, and I apologies already.) We need to downscale climate data and therefore first need to expand the climate from 0.5deg to the higher resolution 10min, before we can add high resolution deviations. We basically need to have the original data at each gridcell replicated into 3x3 gridcells. A simple for loop can do
2017 Jul 05
0
expand gridded matrix to higher resolution
Hi Peter, apply(t(apply(mm,1,rep,each=3)),2,rep,each=3) Jim On Wed, Jul 5, 2017 at 5:20 PM, Anthoni, Peter (IMK) <peter.anthoni at kit.edu> wrote: > Hi all, > (if me email goes out as html, than my email client don't do as told, and I apologies already.) > > We need to downscale climate data and therefore first need to expand the climate from 0.5deg to the higher
2017 Jul 05
0
expand gridded matrix to higher resolution
You probably ought to be using the raster package. See the CRAN Spatial Task View. -- Sent from my phone. Please excuse my brevity. On July 5, 2017 12:20:28 AM PDT, "Anthoni, Peter (IMK)" <peter.anthoni at kit.edu> wrote: >Hi all, >(if me email goes out as html, than my email client don't do as told, >and I apologies already.) > >We need to downscale climate
2005 Mar 22
4
Review: Asterisk at CeBIT 2005 / Asterisk at Linux-Tag 2005
For all who are interested: A quick review of CeBIT 2005. :-) CeBIT was a very successfull event. Most of the time, the asterisk-booth was crowded with more people than we could talk to. We had with us a demo-installation including different IP-phones, digital and analog phones as well as a Siemens HiPATH PBX to which our Asterisk-server served as a VoIP-gateway, and many people were impressed
1997 Jul 08
3
so-called snprintf() in db-1.85.4
Hi, There is a severe problem with the db-1.85.4 library''s Linux port that can be found on sunsite.unc.edu under /pub/Linux/libs/db-1.85.4-src.tar.gz (sp?): This library contains a "snprintf" function which breaks down to a common sprintf, ignoring the size parameter. Obviously, this was thought to be a terribly bad work-around for C libraries which don''t contain an
2009 Jan 08
2
Excluding data with apply
Dear all, 'Apply' is a great thing for running functions on rows or columns of a matrix: X <- rnorm(20, mean = 0, sd = 1) dim(X) <- c(5,4) apply(X,2,sum) Is there a way to use apply for excluding rows or columns from a matrix to run functions on the remaining rows or columns? I know, I could do this with a 'for' loop, but 'apply' would be much easier and
2006 Oct 02
2
CentOs4.3
How can I efficiently search for programs and packages that are available as part of the CentOs4.3 distribution? I am using CentOs4.3 and need to install packages that are apparently not part of this distribution. What RedHat version do I have to consider if I want to use rpm's for RedHat instead? Dirk
2004 Mar 29
4
strange thing with sd
Dear R people I came across a strange thing: sd(rep(0.01, 15)) #0 sd(rep(0.001, 15)) #4.489023e-19 sd(rep(0.00001, 15)) #0 sd(rep(0.00000001,15)) #1.712427e-24 sd(rep(0.01, 13)) #1.805557e-18 sd(rep(0.001, 13)) #4.513894e-19 sd(rep(0.00001, 13)) #0 sd(rep(0.00000001,13)) #0 sd(rep(5.01, 15)) #0 sd(rep(5.001, 15)) #4.489023e-19 sd(rep(5.00001, 15))
2002 Aug 23
3
y-axis with "break"
Dear R-users I would like to draw a barplot with a special y-axis. Most of my data points are in the range from -50 to 50, apart from one value that is 550. I would now like to have a y-axis from -50 to 50, then a "break" and the "rest" of the y-axis, let's say from 500 to 600. In order to make clear what I'm trying to do, I attached a figure. Is it possible to do
2009 Jul 31
1
SVG output on Windows OS
How may one save a graphic as svg on Windows? The svg() command is recognized and functions well on Linux, etc., but not on Windows, it seems. I'm trying to use Hadley Wickam's ggplot2 and I would like to be able to save created charts as svg for later input into Illustrator. I am able to accomplish this workflow under Linux, but I don't know how to get R to recognize the svg() command
2005 Sep 09
2
test for exponential,lognormal and gammadistribution
hello! i don't want to test my sample data for normality, but exponential- lognormal- or gammadistribution. as i've learnt the anderson-darling-test in R is only for normality and i am not supposed to use the kolmogorov-smirnov test of R for parameter estimates from sample data, is that true? can you help me, how to do this anyway! thank you very much! nadja
2010 Jun 26
1
predict newdata question
Hi: I am using a subset of the below dataset to predict PRED_SUIT for the whole dataset but I am having trouble with 'newdata'. The model was created with 153 records and want to predict for 208 records. wolf2 <- structure(list(gridcell = c(367L, 444L, 533L, 587L, 598L, 609L, 620L, 629L, 641L, 651L, 662L, 674L, 684L, 695L, 738L, 748L, 804L, 805L, 872L, 919L, 929L, 938L, 950L, 958L,
2000 Apr 04
2
customizing help()
Hi I tried to customize help(), so it starts the compiled html help, and searches in all packages. I wrote the following function: > my.help function(topic){ help(topic, package=.packages(all=T), lib.loc=.lib.loc, chmhelp=T) } When I use it with >my.help(help) give the following error: Error in help(topic, package = .packages(all = T), lib.loc = .lib.loc, : No documentation
2007 Jan 23
1
libMrm.so.3
I need to install libMrm.so.3 on my computer that has Centos4.3. However, I am not experienced with Centos4.3 so far. I do not know where to find this library for Centos4.3 and how to install it. Is there something like apt? Using system-config-packages I cannot find any intelligent way to search for programs and package. Dirk
2008 Nov 21
1
Equivalent to apply(x[,2:5],1,sum) for dataframe
What's the most correct way of doing the equivalent to apply(x[,2:5],1,sum) if x is dataframe in which the only numeric fields are in columns 2:5 ? (using apply returns a character vector) Thanks Agus -- Dr. Agustin Lobo Institut de Ciencies de la Terra "Jaume Almera" (CSIC) LLuis Sole Sabaris s/n 08028 Barcelona Spain Tel. 34 934095410 Fax. 34 934110012 email: Agustin.Lobo at
2002 Jan 08
3
write.table - format
Hello there I ` m a newbie in R and have a question about the output of write.table My command looks like this: write.table(datatr$V1[data.chull],file="outr.txt", quote = FALSE, sep = "\t") In the outputfile (outr.txt) I have an "x" in the left corner and a new row with numbers for each column(1,2,3...). I just want the values in my file. What should I change in
2006 Mar 27
2
apply(ing) to sum subset of a vector
Dear R users I am trying to sum selective elements of a vector but my solution is not cutting it. Example: > g <- 1:5; > from <- 1:3; > to <- 3:5; from to 1 3 2 4 3 5 so I expect 3 sums from g 1+2+3 that is 1 to 3 of g 2+3+4 that is 2 to 4 of g 3+4+5 that is 3 to 5 of g my solution will not work. sum.em <- function(g, c1, c2)