Re: [R] Looking for package to solve for exponent using newton's method

2013-10-10 Thread Ken Takagi
Thanks! That's just what I needed. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducibl

[R] Looking for package to solve for exponent using newton's method

2013-10-10 Thread Ken Takagi
Hi, I'm looking for an R function/package that will let me solve problems of the type: 13 = 2^x + 3^x. The answer to this example is x = 2, but I'm looking for solutions when x isn't so easily determined. Looking around, it seems that there is no algebraic solution for x, unless I'm mistaken. Do

Re: [R] Calculating the mean in one column with empty cells

2012-10-05 Thread Ken Takagi
fxen3k gmail.com> writes: > > Hi all, > > I recently tried to calculate the mean and the median just for one column. > In this column I have numbers with some empty cells due to missing data. > So how can I calculate the mean just for the filled cells? > I tried: > mean(dataSet2$ac_60d_4d_aft

Re: [R] Multiple Ploting Colors

2010-07-12 Thread Ken Takagi
Richardson, Patrick vai.org> writes: > > I'm trying to use multiple plotting colors in my code. My first "ifelse" statement successfully does what I > want. However, now I want anything less than -4.5 to be green and the rest black. I want another "col" > argument but can only use one. How could

Re: [R] How do I move axis labels closer to plot box?

2010-07-12 Thread Ken Takagi
chen jia fisher.osu.edu> writes: > Check out the ?par(). Specifically mgp. HTH, Ken __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

Re: [R] Multiple Ploting Colors

2010-07-12 Thread Ken Takagi
Richardson, Patrick vai.org> writes: > > I'm trying to use multiple plotting colors in my code. My first "ifelse" statement successfully does what I > want. However, now I want anything less than -4.5 to be green and the rest black. I want another "col" > argument but can only use one. How could

Re: [R] Trimming in R

2010-07-07 Thread Ken Takagi
David Winsemius comcast.net> writes: > > > On Jul 7, 2010, at 9:23 AM, Andrew Leeser wrote: > > > I am looking for a way to trim leading and trailing spaces in a > > character > > string in R. For example: > > > > " this is random text" > > > > should become: > > > > "this is r

Re: [R] Excel date to R format

2010-04-13 Thread Ken Takagi
One useful package is "chron": example: library(chron) #convert excel time to date time format etime = 39965.0004549653 orig =chron("12/30/1899"); # "origin" of excel time. date.time = orig + etime; substr(as.character(date.time), 2, 18) # as character without parentheses. HTH, Ken __