Re: [R] R - Reading a horizontally arranged csv file, replacing values and saving again

2018-10-04 Thread Manoranjan Muthusamy
t in a similar format with > > writeYourFormat <- function (data, connection = stdout()) > { > stopifnot(is.list(data), !is.null(names(data))) > cat(file = connection, sep = "\n", paste(sep = ",", names(data), > vapply(data, paste, colla

Re: [R] R - Reading a horizontally arranged csv file, replacing values and saving again

2018-10-03 Thread Manoranjan Muthusamy
le(file=stdout(), t(df), quote=FALSE, na="", sep=",") > V1,V2,V3,V4 > Text,Abe,Ben,,David > Age,19,,12,10 > > > > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > On Mon, Oct 1, 2018 at 2:24 AM, Manoranjan Muthusamy < > ranj

[R] R - Reading a horizontally arranged csv file, replacing values and saving again

2018-10-01 Thread Manoranjan Muthusamy
I have a horizontally arranged CSV file ( samplefile.csv) with headers are in the first column. Also, each row has a different number of columns. I want to read this CSV file, replace one of the cell value and save again as a CSV file

[R] R_using non linear regression with constraints

2017-06-18 Thread Manoranjan Muthusamy
I am using nlsLM {minpack.lm} to find the values of parameters a and b of function myfun which give the best fit for the data set, mydata. mydata=data.frame(x=c(0,5,9,13,17,20),y = c(0,11,20,29,38,45)) myfun=function(a,b,r,t){ prd=a*b*(1-exp(-b*r*t)) return(prd)} and using nlsLM myfit=nlsLM

Re: [R] R_Calculating Thiessen weights for an area with irregular boundary

2015-04-23 Thread Manoranjan Muthusamy
It certainly is! Thank you. Cheers, Mano On Thu, Apr 23, 2015 at 12:02 AM, Rolf Turner wrote: > On 22/04/15 22:43, Manoranjan Muthusamy wrote: > > > > 4. >> How can I show the Dirichlet tile names (i.e. 1,2,3,,8) in the >> plot? >> > > There

Re: [R] R_Calculating Thiessen weights for an area with irregular boundary

2015-04-22 Thread Manoranjan Muthusamy
the "boundary polygon" (i.e. observation window). > > (4) If my guess is correct, the following should accomplish the desired > task: > > require(spatstat) # You will (probably) need to install spatstat first. > W <- owin(poly=bdry) > X <- as.ppp(pts,W=W) > plot(X)

[R] R_Calculating Thiessen weights for an area with irregular boundary

2015-04-21 Thread Manoranjan Muthusamy
Hi R users, I want to calculate Thiessen weights to compute areal rainfall from number of point measurements. I am using R and thanks to some previous question in the same topic, I got to know that I can usedeldir. But the problem is my boundary polygon is not a rectangle; it's an irregular polygo

Re: [R] Extracting values from a ecdf (empirical cumulative distribution function) curve

2013-11-01 Thread Manoranjan Muthusamy
* > > Bill Dunlap > > Spotfire, TIBCO Software > > wdunlap tibco.com > > ** ** > > *From:* Manoranjan Muthusamy [mailto:ranjanmano...@gmail.com] > *Sent:* Friday, November 01, 2013 4:38 AM > *To:* William Dunlap; dulca...@bigpond.com > *Cc:* Rui Barradas; r-he

Re: [R] Extracting values from a ecdf (empirical cumulative distribution function) curve

2013-11-01 Thread Manoranjan Muthusamy
> X <- c(101, 103, 107, 111) >> f <- ecdf(X) >> inv_f <- inv_ecdf(f) >> inv_f(seq(0, 1, by=1/8)) >[1] NA NA 101 102 103 105 107 109 111 > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com > > > > -Original

Re: [R] Extracting values from a ecdf (empirical cumulative distribution function) curve

2013-10-31 Thread Manoranjan Muthusamy
t; inv_ecdf <- function(f){ > x <- environment(f)$x > y <- environment(f)$y > approxfun(y, x) > } > > g <- inv_ecdf(f) > g(0.5) > > > Hope this helps, > > Rui Barradas > > Em 31-10-2013 12:25, Manoranjan Muthusamy escreveu:

[R] Extracting values from a ecdf (empirical cumulative distribution function) curve

2013-10-31 Thread Manoranjan Muthusamy
Hi R users, I am a new user, still learning basics of R. Is there anyway to extract y (or x) value for a known x (or y) value from ecdf (empirical cumulative distribution function) curve? Thanks in advance. Mano. [[alternative HTML version deleted]] _