similar to: Conditional Weighted Average (ddply or any other function)

Displaying 20 results from an estimated 600 matches similar to: "Conditional Weighted Average (ddply or any other function)"

2007 Apr 14
2
Samba -> WinXP: slow transfers, partial solution
Hello All, I'm running Samba 3.0.24 as PDC and file server on Gentoo Linux, AMD64, 2.6.19 kernel, 100MBit/s network, and experience quite slow file transfers from Samba to WinXP SP2 clients: the speed is varying, but is about 1-2Mb/s at best. I spent quite some time investigating the issue, here are the intermediate results: 1) This happens only when transferring _from_ _Samba_ to
2017 Sep 11
4
Case statement in sqldf
Hi all, I am trying to create a new variable called Fiscal Year (FY) using case expression in sqldf and I am getting a null FY , see the code below . Please advise me as to how I can do this mutation. library(zoo) library(lubridate) library(stringr) library(RH2) library(sqldf) cr$ReportDate = as.Date(cr$ReportDate, format ='%Y-%m-%d') > cr2 = sqldf(" select
2013 Jul 16
2
Problem following an R bug fix to integrate()
I have been told by the CRAN administrators that the following code generated an error on 64-bit Fedora Linux (gcc, clang) and on Solaris machines (sparc, x86), but runs well on all other systems): > fn <- function(x, y) ifelse(x^2 + y^2 <= 1, 1 - x^2 - y^2, 0) > tol <- 1.5e-8 > fy <- function(x) integrate(function(y) fn(x, y), 0, 1,
2007 Nov 21
1
Help Required in using cast (reshape package) function
Hello everyone, I am new to R. I have data in the form of excel pivot table format and I want to cast it into a format which can make it compatible with computation. Since I already have the package in pivot format; I avoid melt function and use the cast directly. I inspect the dataread <- read.csv(".....", header=TRUE) Data in the format Id Region Country Industry
2017 Sep 11
0
Case statement in sqldf
2018-03-3 in your code should be 2018-03-31. The line then'201415' needs to be fixed. When posting please provide minimal self-contained examples. There was no input provided and library statements not relevant to the posted code were included. Fixing the invalid date and bad line, getting rid of those library statements that are unnecessary and providing some test input, it works
2010 Jun 02
1
lattice, xyplot, using "panel.segments" by just addressing one panel
Hi R experts, I'm using the xyplot function in lattice to draw a multipanel plot consiting of 5x6 scatterplots. Now I need to link single points in each of those scatterplots (=panel),but the points, that need linking are different for each panel. I tried to use the panel.segments function for that, but I can't address each panel separately. Links right for panel 1, show up in all other
2006 May 01
4
efficiency in merging two data frames
I have two data sets about lots of companies' stock and fiscal data. One is monthly data with about 144,000 lines, and the other is quaterly with about 56,000. Each data set takes different company code. I need to merge these two together. I read both ask cvs. And the other file with corresponding firm code. Now I have three data sets. return$PERMNO, account$GVKEY. id is the data frames
2005 Apr 04
5
a question about box counting
Hi, I have a set of x,y data points and each data point lies between (0,0) and (1,1). Of this set I have selected all those that lie in the lower triangle (of the plot of these points). What I would like to do is to divide the region (0,0) to (1,1) into cells of say, side = 0.01 and then count the number of cells that contain a point. My first approach is to generate the coordinates of these
2012 Jul 24
19
what best for anti-spam filter?
what anti-spam for you used ? dspam?spammassian? amavisd-new ? what is best ?
2017 Sep 11
0
Case statement in sqldf
> On Sep 11, 2017, at 1:05 AM, Mangalani Peter Makananisa <pmakananisa at sars.gov.za> wrote: > > Hi all, > > I am trying to create a new variable called Fiscal Year (FY) using case expression in sqldf and I am getting a null FY , see the code below . > > Please advise me as to how I can do this mutation. > > library(zoo) > library(lubridate) >
2003 Dec 15
2
Week of the Year date conversion
Hello there fellow R-users, I have received some data which comes in the following format: example1<-"200301" The first 4 digits correspond to the year and the remaining 2 digits correspond to the week of the year. I have tried to convert this to a date by using strptime as follows: strptime(example1,format="%Y%U") where U (looking up strptime) is the week of the
2011 Aug 29
3
gradient function in OPTIMX
Dear R users When I use OPTIM with BFGS, I've got a significant result without an error message. However, when I use OPTIMX with BFGS( or spg), I've got the following an error message. ---------------------------------------------------------------------------------------------------- > optimx(par=theta0, fn=obj.fy, gr=gr.fy, method="BFGS", >
2011 Dec 16
0
crash in using Rcpp and inline packages.
Hi all, I am using c++ functions in R by Rcpp and inline packages. The code is quite simple, but the R session always automatically crash after some running time. Does anyone here familiar with Rcpp and inline? What¡¯s the problem in the following code? I have checked the input values, no NA and other strange value exists. Thank you for your attention! > mkc <- cxxfunction(
2011 Dec 16
0
Fw: crash in using Rcpp and inline packages.
Hi all, I am using c++ functions in R by Rcpp and inline packages. The code is quite simple, but the R session always automatically crash after some running time. Does anyone here familiar with Rcpp and inline? What¡¯s the problem in the following code? I have checked the input values, no NA and other strange value exists. Thank you for your attention! > mkc <- cxxfunction(
2005 Nov 16
3
yay for zfs
This zfs looks great! I really hope this gets put into solaris soon since I don''t think I could live with Solaris express on a production machine. The easy of adding disk and moving directories looks like a life saver, especially for me who deals with trying to store digital media which piles up a couple of gig a day! This message posted from opensolaris.org
2005 Sep 29
2
solution of convolution equation
Hello, May be somebody can help me... I am trying to find a solution of a convolution equation using fft (and unfortunately I do not have a good background for this). So I am just trying to figure out how it can be implemented in R. I have two multidimensional independent variables X and Z and I know their densities fx and fz, which are multidimensional arrays. So I have to find the density of
2012 Jan 13
2
[PATCH 1/2] ext2: tweak the error returned message of resize2fs-M(BZ755729)
Tweak the error message "e2fsck -f" and "e2fsck -fy" to "e2fsck-f" and "e2fsck-fy". Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/ext2.c | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/daemon/ext2.c b/daemon/ext2.c index 79fd354..9fe938e 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c
2017 Mar 19
2
outer not applying a constant function
Hi, the function outer can not apply a constant function as in the last line of the following example: > xg <- 1:4 > yg <- 1:4 > fxyg <- outer(xg, yg, function(x,y) x*y) > fconstg <- outer(xg, yg, function(x,y) 1.0) Error in outer(xg, yg, function(x, y) 1) : dims [product 16] do not match the length of object [1] Of course there are simpler ways to construct a constant
2000 Aug 24
2
Problem with Samba-windows98
Hi all I have a linux(susse) running samba and am trying to connect from windows98. I have no problem seeing the linux computer in the network neigbourhood. I can also see the folders shared from it. When Im accessing a folder I get prompted for password (my login on windows98 is the same as for linux). But it doesnt accept the password "Bad password". When I log in from other
2007 Jul 04
2
probabilty plot
Hi all, I am a freshman of R,but I am interested in it! Those days,I am learning pages on NIST,with url http://www.itl.nist.gov/div898/handbook/eda/section3/probplot.htm, I am meeting a problem about probability plot and I don't know how to plot a data set with R. Could somebody tell me the answer,and a example is the best! I will look forward to your answer. Thank you very much.