Re: [R] Subsetting Data

2011-04-28 Thread Jonathan Daily
Try this: sum(dat$Number = 10) On Thu, Apr 28, 2011 at 3:13 PM, Abraham Mathew abmathe...@gmail.com wrote: I'm using the subset() function in R. dat - data.frame(one=c(6,7,8,9,10), Number=c(5,15,13,1,13)) subset(dat, Number = 10) However, I want to find the number of all rows who meet the

[R] Speed up plotting to MSWindows graphics window

2011-04-27 Thread Jonathan Gabris
if sombody could point out something, I would be greatfull. Thanks, Jonathan Gabris __ 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

Re: [R] Speed up plotting to MSWindows graphics window

2011-04-27 Thread Jonathan Gabris
if sombody could point out something, I would be greatfull. Thanks, Jonathan Gabris __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guidehttp://www.R-project.org/posting

Re: [R] setting options only inside functions

2011-04-27 Thread Jonathan Daily
There is probably a more elegant way to do this, but you could write it into dummy1(): dummy1 - function() { ...original function options(old.options) } Alternatively, you could use ?tryCatch with the finally argument as a call to options. HTH, Jon On Wed, Apr 27, 2011 at 9:16 AM, Jannis

Re: [R] Pause the execution of a function

2011-04-27 Thread Jonathan Daily
Try ?scan or ?readLines. On Wed, Apr 27, 2011 at 11:42 AM, Lisa lisa...@gmail.com wrote: Dear all, I am trying to write a script to pause the execution of a function and provide some additional commands to the function and then continue execution of the function. For example, when my

[R] plot() under Rserve

2011-04-26 Thread Jonathan Shore
. Thanks Jonathan -- View this message in context: http://r.789695.n4.nabble.com/plot-under-Rserve-tp3476364p3476364.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Paste problem when looping variable assignments

2011-04-22 Thread Jonathan Daily
The function you are looking for is ?assign. assign(paste(pds_gagehandles[[i]], _pdswy, sep = ), ...) For the reverse, in case you are interested, check out ?get. HTH, Jon On Fri, Apr 22, 2011 at 1:49 PM, armstrwa william.armstr...@noaa.gov wrote: One thing I should have mentioned before is

Re: [R] appending to a vector

2011-04-14 Thread Jonathan P Daily
a for loop, your second example is faster since it does not rewrite x2 each iteration. An excellent reference on this subject and many other R pitfalls is 'The R Inferno' http://lib.stat.cmu.edu/s/Spoetry/Tutor/R_inferno.pdf -- Jonathan P. Daily Technician

Re: [R] Using help in Windows version of R with disabled browser

2011-04-12 Thread Jonathan P Daily
try: options(help_type = 'text') ?options If this works, you can create a site profile (A default is created automatically in windows, if I remember correctly) where you can set this to run in each session. -- Jonathan P. Daily Technician - USGS Leetown

Re: [R] RExcel

2011-04-11 Thread Jonathan P Daily
It is asking the obvious, but did you run the commands from the rcom package after installation (see inline ***s)? -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room

[R] Getting many substrings but only loading the original string one time.

2011-04-11 Thread Jonathan
) result - paste(longerString,collapse='') result [1] ellThisIlo (perhaps the paste command as I've done it is the best way, but depending on how the substrings are reported there may be different ways). Thanks! Jonathan [[alternative HTML version deleted

Re: [R] Getting many substrings but only loading the original string one time.

2011-04-11 Thread Jonathan
, and the large number of substrings to fetch), ie is it much slower than C++, or in the same ballpark? Thanks! Jonathan On Mon, Apr 11, 2011 at 4:14 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote: On 11/04/2011 3:48 PM, Jonathan wrote: Hi All, I'm looking for a way to get many substrings from

Re: [R] Estimates at each iteration

2011-04-08 Thread Jonathan P Daily
called limiter. HtoH, Jon -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word

Re: [R] How to *completely* stop a script after stop()?

2011-04-08 Thread Jonathan P Daily
Would options(error = recover) be of some help? -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do

Re: [R] Using graphics straight from R into published articles

2011-03-29 Thread Jonathan P Daily
I think you should google search Sweave, as well as check out the ?Sweave page. Not to mention the graphics devices that embed quite nicely into documents, like ?postscript. HTH, Jon -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown

Re: [R] passing arguments via ...

2011-03-29 Thread Jonathan P Daily
? -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it. - Jubal Early, Firefly r

[R] glm with within-subject factors

2011-03-28 Thread Jonathan Flowers
(rep(c(Tom,Nic,Bil,Jon,Jil),2)),X1=rep(c(A,B),5),X2=rep(sapply(1:5,function(x) rnorm(1)),each=2)) Can someone suggest an approach to test for an effect of X1 and X2 on counts? Best, Jonathan [[alternative HTML version deleted]] __ R-help@r

Re: [R] ) Error in eval(expr, envir, enclos) : object '' not found

2011-03-23 Thread Jonathan P Daily
It looks like your column name has periods in it somewhere. Is your header separated by something other than commas? look at: names(data.sex) or test by age %in% names(data.sex) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road

[R] filtering data frame on multiple columns

2011-03-22 Thread Dry, Jonathan R
Hello I want to filter a data frame called 'filtEXP' for rows where column 'max' 6 OR column 'FC' 4 and am trying various permutations of the below to no avail: filtEXP2 - filtEXP[filtEXP$max 6,] || filtEXP[filtEXP$FC 4,] Any ideas?

Re: [R] memory increasing

2011-03-22 Thread Jonathan P Daily
. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it. - Jubal Early, Firefly r-help

Re: [R] Understanding tryCatch

2011-03-18 Thread Jonathan P Daily
tryCatch will only execute it's error function on errors. If you are getting warnings, you may find it helpful to set: options(warn = 2) ?options tryCatch(warning(!), error = function(x) print(Error!)) -- Jonathan P. Daily Technician - USGS Leetown Science

Re: [R] a question

2011-03-16 Thread Jonathan P Daily
-- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it. - Jubal Early, Firefly r-help-boun

Re: [R] Scope of variable?

2011-03-16 Thread Jonathan P Daily
?cat cat prints text, and returns an invisible NULL. Also, it is general practice to assign values using '-' even inside of functions, for reasons detailed in ?- -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV

[R] (no subject)

2011-03-15 Thread Jonathan P Daily
to do this? Thanks, Jon PS I apologize if this double-sends, but I am having mail client issues. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does

Re: [R] Keyboard Input

2011-03-15 Thread Jonathan P Daily
through the results of a large simulation. As I think about it more, though, it is probably going to be easier to dump the data into files and look through it outside of R. Thanks anyways, Jon -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649

Re: [R] indeterminate for loop

2011-03-15 Thread Jonathan P Daily
?while You don't want a for loop. You need a while loop. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have

Re: [R] Keyboard Input

2011-03-15 Thread Jonathan P Daily
Solved. Thanks. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue

Re: [R] tryCatch - Continuing for/next loop after error

2011-03-10 Thread Jonathan P Daily
-- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it. - Jubal

Re: [R] tryCatch - Continuing for/next loop after error

2011-03-10 Thread Jonathan P Daily
: -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it. - Jubal Early

Re: [R] tryCatch - Continuing for/next loop after error

2011-03-10 Thread Jonathan P Daily
I did not know that. When reading the help topic for the first time myself, I think I assumed that it returned no value since it had no Value section, and I haven't used it in a way that it would return a value. -- Jonathan P. Daily Technician - USGS Leetown

Re: [R] sum of variables in function

2011-03-10 Thread Jonathan P Daily
How about: x - rnorm(1000) fn - function(k) sum(x[1:k]*(x[k+1] + x[k+2])) vals - sapply(1:100, fn) vals -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its

Re: [R] Complex sampling?

2011-03-09 Thread Jonathan P Daily
-- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it. - Jubal

Re: [R] generate 3 distinct random samples without replacement

2011-03-07 Thread Jonathan P Daily
would this work? s - sample(d1, 300, F) D - data.frame(a = s[1:100], b = s[101:200], c = s[201:300]) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty

Re: [R] Probabilities greather than 1 in HIST

2011-03-03 Thread Jonathan P Daily
If you read ?hist, you will answer your own question. The issue in your code is the parameter prob = T, which does nothing. By default, hist reports density. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV

Re: [R] Vector manipulations

2011-03-02 Thread Jonathan P Daily
Is this what you want? I don't know what your v looks like, but this won't work if there are cases in which v won't sum to exactly x. x - 20 v - sample(0:1, 100, T) w - v[1:which(cumsum(v)==x)] -- Jonathan P. Daily Technician - USGS Leetown Science Center

Re: [R] bootstrap resampling - simplified

2011-03-02 Thread Jonathan P Daily
. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it. - Jubal

Re: [R] bootstrap resampling - simplified

2011-03-02 Thread Jonathan P Daily
(bigsamp == x)[1:5])))[1:20] samp - bigsamp[idx] I apologize for my lack of clarity, though after reading the original post I'm not sure which solution the OP was looking for. Cheers, Jon -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649

Re: [R] bootstrap resampling question

2011-03-01 Thread Jonathan P Daily
: bigsamp - sample(1:20, 100, T) idx - sort(unlist(sapply(1:20, function(x) which(bigsamp == x)[1:5])))[1:20] samp - bigsamp[idx] -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still

[R] regression with categorical nuisance variable

2011-02-28 Thread Jonathan DuBois
Hi, I am new to R, so I am unsure of the formula to set up this analysis. I would like to run a linear model with a continuous dependent variable (brain volume) and a continuous independent variable (age) while controlling for a categorical nuisance variable (gender). Age and brain volume are

Re: [R] Variable names AS variable names?

2011-02-25 Thread Jonathan P Daily
To access a variable by a character string name, try for(code in codes) { dat - get(code) [stuff] } Other options include ?assign if you need to manipulate the original, or ?with to use the subject of codes as an environment. -- Jonathan P. Daily Technician

Re: [R] Running code sequentially from separate scripts (but not functions)

2011-02-24 Thread Jonathan P Daily
(code3.r) # Use this to run anytime eval(run1) eval(run2) eval(run3) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself

Re: [R] create dummy variables by for loop

2011-02-24 Thread Jonathan P Daily
See inline below. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue

Re: [R] Using string to call/manipulate an object

2011-02-23 Thread Jonathan P Daily
-- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it. - Jubal Early

Re: [R] R script HELP!

2011-02-18 Thread Jonathan P Daily
It looks to me like when you assign ID_min and ID_max that you want them to be vectors. In R, this is accomplished by ?c. Example: ID_min - c(976834501, 290018099.3145, 1000) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road

Re: [R] R script HELP!

2011-02-18 Thread Jonathan P Daily
. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it. - Jubal Early, Firefly r-help-boun...@r

[R] quick question about binary data

2011-02-15 Thread Jonathan Hughes
might not be the same). Thanks!Jonathan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] CDF of Sample Quantile

2011-02-14 Thread Jonathan P Daily
-- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it. - Jubal Early, Firefly r-help-boun...@r

[R] summing values for specific variables

2011-02-13 Thread Jonathan Salerno
This is a seemingly simple problem, but I'm unable to make any progress. I have a large dataset, within it there is a column of location names, some of which repeat; the adjacent column lists values for each location name. I need to sum the values which correspond to the same location name,

Re: [R] help - the condition has length 1 and only the first element will be used

2011-02-10 Thread Jonathan P Daily
The issue here is that if only accepts a single True/False argument. Try these functions: ?ifelse ?all ?any -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its

[R] Applying 'cbind/rbind' among different list object

2011-02-06 Thread B. Jonathan B. Jonathan
Hi, I am wondering whether we can apply 'cbind/rbind' on many **equivalent** list objects. For example please consider following: list1 - list2 - vector(list, length=2); names(list1) - names(list2) - c(a, b) list1[[1]] - matrix(1:25, 5) list1[[2]] - matrix(2:26, 5) list2[[1]] - 10:14

[R] Multiple line-plots from one data file using factor

2011-02-04 Thread jonathan byrne
. I managed to get something to work using a for loop and some conditionals but I was wondering if there is a better way using factor or some other R method? Any help improving my R coding would be greatly appreciated! Thanks Jonathan [[alternative HTML version deleted

[R] better way to iterate matrix multiplication?

2011-02-01 Thread Jonathan Knibb
I'm simulating a Markov process using a vector of proportions. Each value in the vector represents the proportion of the population who are in a particular state (so the vector sums to 1). I have a square matrix of transition probabilities, and for each tick of the Markov clock the vector is

Re: [R] R-/Text-editor for Windows?

2011-01-31 Thread Jonathan P Daily
if you just use RTerm/RGui by replacing all the instances of Console with the appropriate R executable. [1]www.autohotkey.com [2]sourceforge.net/projects/console -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430

Re: [R] R-/Text-editor for Windows?

2011-01-28 Thread Jonathan P Daily
hand, geany is cross platform. As always, EMACS + ESS and Vim are also options. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing

Re: [R] Quantile Regression: Extracting Residuals

2011-01-19 Thread Jonathan P Daily
Try looking here: ?rq.object ?residuals R has excellent documentation that can answer many such questions with less than a minute of reading. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724

[R] get list element names within lapply / sapply call

2011-01-15 Thread Jonathan Flowers
within in the function? For example, mylist - list(a=c(1,2),b=c(3,4),c=c(5,6)) sapply(mylist,function(x){ #get name of list elements (a, b, c) #then do other stuff }) Thanks for your suggestions. Jonathan [[alternative HTML version deleted

Re: [R] get list element names within lapply / sapply call

2011-01-15 Thread Jonathan Flowers
Thanks Gene. I'll look into the Browse option. Best, Jonathan On Sat, Jan 15, 2011 at 4:36 PM, Gene Leynes gleyne...@gmail.comgleynes%...@gmail.com wrote: I one tried to write a function to do that, but it wasn't worth it / didn't work I found this to be a better solution: mynames

[R] filtering a dataframe with a vector of rownames

2011-01-14 Thread Jonathan Hughes
(a, c, d) rows.to.keep-which(rownames(data)==names.to.keep) But it didn't work. Any suggestions? thanks a lot. Jonathan. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

Re: [R] filtering a dataframe with a vector of rownames

2011-01-14 Thread Jonathan Hughes
Thank you so much! jonathan Date: Fri, 14 Jan 2011 10:47:57 -0800 From: spec...@stat.berkeley.edu To: jonathan.hughes...@live.com CC: r-help@r-project.org Subject: Re: [R] filtering a dataframe with a vector of rownames Jonathan - To make your approach work, you'd need to replace

Re: [R] Question about histogram

2011-01-13 Thread Jonathan P Daily
that a randomly chosen computer is running Ubuntu? Density is more universal, IMO. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room

Re: [R] how to wrap a long line in R scripts?

2011-01-10 Thread Jonathan P Daily
a - rey lo ong charrr Although the indentation is just personal preference. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480

Re: [R] how to wrap a long line in R scripts?

2011-01-10 Thread Jonathan P Daily
, pch = 5, cex = .75) num - ((a1 + a2 + a3)/b1 + (a4 + a5 + a6)/b2) / b3 -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does

Re: [R] how to wrap a long line in R scripts?

2011-01-10 Thread Jonathan P Daily
charrr, sep = ) print(a) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue

Re: [R] matrices call a function element-wise

2011-01-03 Thread Jonathan P Daily
IIRC, R is perfectly able to call matrices as vectors, so you might be able to do this: FT - function(i) fisher.test(matrix(c(A[i],B[i],C[i],D[i]),2)) E - sapply(1:100, FT) Though I don't know how much time you will save. -- Jonathan P. Daily Technician

Re: [R] randomForest speed improvements

2011-01-03 Thread Jonathan P Daily
analysis. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue

Re: [R] matrices call a function element-wise

2011-01-03 Thread Jonathan Christensen
Hi, I would recommend reformatting the data as a 2x2x1000 array and using apply. Jonathan On Mon, Jan 3, 2011 at 7:57 AM, zhaoxing731 zhaoxing...@yahoo.com.cn wrote: Hello I have 4 1000*1000 matrix A,B,C,D. I want to use the corresponding element of the 4 matrices. Using the for loop

Re: [R] Windows editor suggestions - autosave

2010-12-29 Thread Jonathan P Daily
for myself in AutoHotKey in about 2 mins), it has a ton of other options and is cross-platform. Geany: www.geany.org -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room

Re: [R] subset question

2010-12-29 Thread Jonathan Flowers
Try subd - d[, gene == c(i1,i2,i3)] On Wed, Dec 29, 2010 at 4:55 PM, ANJAN PURKAYASTHA anjan.purkayas...@gmail.com wrote: Hi, I'm having a problem with a step that should be pretty simple. I have a dataframe, d, with column names : gene s1 s2 s3. The column gene stores an Id; the rest of

Re: [R] Faster way to do it??...using apply?

2010-12-28 Thread Jonathan P Daily
I don't know if it's any faster, but it is also possible this way: y - ifelse(x ==1, round(runif(x)), sign(x)) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when

Re: [R] levelplot blocks size

2010-12-27 Thread jonathan
to solve my problem. Thanks, Jonathan -- View this message in context: http://r.789695.n4.nabble.com/levelplot-blocks-size-tp3089972p3165638.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https

[R] Fitting mixtures with non-linear parameters constraints

2010-12-26 Thread Jonathan Rosenblatt
Dear R users Does anyone happen to know a function to fit a Gaussian mixture using *non-linear* constraints between the parameters? (An EM the allows that will do the job obviously). Thank you in advance -- Jonathan Rosenblatt www.john-ros.com __ R

Re: [R] levelplot blocks size

2010-12-26 Thread jonathan
, so say 0=x10, 0=y10 is one point in the lower left, rather than having 100 points for each x,y value. The same strategy should then be applied to the whole graph. Any ideas how to achieve this? I'm sure this is quite a common thing to do want to with heatmaps?? Thanks, Jonathan -- View

Re: [R] Fitting a Triangular Distribution to Bivariate Data

2010-12-23 Thread Jonathan P Daily
)) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue it. - Jubal Early, Firefly r-help-boun...@r

Re: [R] How to optimize function parameters?

2010-12-20 Thread Jonathan P Daily
as a wrapper to many optimization algorithms and offers methods to compare them side-by-side. Good luck, Jon -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty

Re: [R] How to optimize function parameters?

2010-12-20 Thread Jonathan P Daily
If you can somehow add the sign of the output to the root square error, nlm, nlminb, and many options within optimx accept bounds. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480

Re: [R] levelplot blocks size

2010-12-19 Thread jonathan
Sorry to bump this up again, but I've been continuing to look for a solution to this including a look into stats.bin but I still can't find any solution to do this within R. Any help would be much appreciated! Thanks, Jonathan -- View this message in context: http://r.789695.n4.nabble.com

Re: [R] levelplot blocks size

2010-12-19 Thread jonathan
to go about rounding the values? Thanks, Jonathan -- View this message in context: http://r.789695.n4.nabble.com/levelplot-blocks-size-tp3089972p3094797.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Alter plot point size by value of the plot value

2010-12-17 Thread Jonathan P Daily
Assuming your plot values are X and Y: cex.val - 1 + (Y 1E-6)*.5 - (Y 1E-3)*.5 plot(X, Y, cex = cex.val) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its

Re: [R] editor for MacOS

2010-12-17 Thread Jonathan Marc Bearak
Are text completions turned on under BBEdit:Preferences:Editing--General? Jonathan On Dec 17, 2010, at 5:10 PM, huang min wrote: I tried Jonathan's applescript. It doesn't work too. For the R.plist, did you get the auto-completion etc? It seems only the syntax coloring works. Huang

Re: [R] editor for MacOS

2010-12-17 Thread Jonathan Marc Bearak
the option you mention. Huang On Sat, Dec 18, 2010 at 7:06 AM, Jonathan Marc Bearak jonathan.bea...@gmail.com wrote: Are text completions turned on under BBEdit:Preferences:Editing--General? Jonathan On Dec 17, 2010, at 5:10 PM, huang min wrote: I tried Jonathan's applescript

Re: [R] Integrate two function in R

2010-12-16 Thread Jonathan P Daily
As a minor plug for my favorite non stat-based mathematics software, sagemath also has a rudimentary R interface built-in -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still

Re: [R] Help about nlminb function

2010-12-15 Thread Jonathan P Daily
or having variables on very different scales. Since you did not follow the posting guide (important part *'d below), my only suggestion is to ?nlminb -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480

Re: [R] Help about nlminb function

2010-12-15 Thread Jonathan P Daily
. Try changing parametres[,3] -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word

Re: [R] from table to matrix

2010-12-14 Thread jonathan
a filled.contour plot on the data. I think this is the same as what Jessica is asking... Regards and many thanks, Jonathan UCL Computer Science -- View this message in context: http://r.789695.n4.nabble.com/from-table-to-matrix-tp3087972p3088096.html Sent from the R help mailing list archive

Re: [R] from table to matrix

2010-12-14 Thread jonathan
run this I'm not getting anything =/ Any tips? Jonathan -- View this message in context: http://r.789695.n4.nabble.com/from-table-to-matrix-tp3087972p3088161.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

Re: [R] from table to matrix

2010-12-14 Thread jonathan
other operating systems but that's the basic idea. Jonathan -- View this message in context: http://r.789695.n4.nabble.com/from-table-to-matrix-tp3087972p3088187.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] from table to matrix

2010-12-14 Thread jonathan
is in there... and I should be good to go! Hope that you got your stuff to work Jessica, and thanks to everyone for your help :-) I'm sure I will be posting here again very soon! Jonathan -- View this message in context: http://r.789695.n4.nabble.com/from-table-to-matrix-tp3087972p3088230.html Sent from

Re: [R] Integration with LaTex and LyX

2010-12-13 Thread Jonathan P Daily
?Sweave LyX is a bit harder, although you can probably export LyX docs to a *.tex and Sweave those fairly painlessly. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still

Re: [R] Converting data.frame from long to wide format

2010-12-08 Thread Jonathan Christensen
Matt, library(reshape2) wide.df - dcast(df, y ~ x) Works great for me. Jonathan On Wed, Dec 8, 2010 at 7:26 PM, Matthew Pettis matthew.pet...@gmail.com wrote: Hi, I was wondering if there is an easy way that I am missing for turning a long dataframe into a wide one.  Below is sample code

Re: [R] string

2010-12-07 Thread Jonathan P Daily
?paste collapse = T may be necessary. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we

[R] More elegant magnitude method

2010-12-07 Thread Jonathan P Daily
){ + length(charToRaw(format(trunc(x), scientific = F)))-1} a - 123456789 b - 1E15 c - 12.345 scl(a) [1] 8 scl(b) [1] 15 scl(c) [1] 1 Thanks -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724

Re: [R] More elegant magnitude method

2010-12-07 Thread Jonathan P Daily
What a brain fart... Thanks! -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's

Re: [R] Optimize multiple variable sets

2010-12-06 Thread Jonathan P Daily
+ 1*x, at x = 0. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word... imbue

Re: [R] Optimize multiple variable sets

2010-12-06 Thread Jonathan P Daily
. As for the returned x issue, you are correct that it is a 'tol' issue: reducing tol to something reasonably low approximates the min fairly well. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room

Re: [R] difference between linear model scatterplot matrix

2010-12-03 Thread Jonathan Christensen
to interpret your parameter estimates in the presence of collinearity. Jonathan On Fri, Dec 3, 2010 at 7:42 AM, Francesco Nutini nutini.france...@gmail.com wrote: Dear R-users, I'm studing a DB, structured like this (just a little part of my dataset

Re: [R] rpart results - problem after oversampling

2010-12-02 Thread Jonathan P Daily
of them now. So the choice of which 6 to split is arbitrary. (Someone with more knowledge of rpart's guts feel free to correct me). -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room

Re: [R] Sequence for repeated numbers

2010-12-01 Thread Jonathan P Daily
, grade) dat - dat[order(grade),] -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room, the thing itself have purpose? Or do we, what's the word

[R] Perl cut equivalent in R

2010-12-01 Thread Jonathan Flowers
Does anyone know of a command in R that is equivalent to the =cut function in Perl? Thanks. Jonathan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Perl cut equivalent in R

2010-12-01 Thread Jonathan Flowers
, but cut is a handy solution. Thanks. On Wed, Dec 1, 2010 at 6:31 PM, Sarah Goslee sarah.gos...@gmail.com wrote: It would help if you told us what you wanted this function to do, and provided an example. Not everyone speaks Perl. Sarah On Wed, Dec 1, 2010 at 6:10 PM, Jonathan Flowers

Re: [R] Two dimensional Array defined on intevals

2010-11-29 Thread Jonathan P Daily
Does this work for you? g - function(x,y) ifelse(x .5, 0, 2) + ifelse(y .5, 1, 2) -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road Kearneysville WV, 25430 (304) 724-4480 Is the room still a room when its empty? Does the room

<    1   2   3   4   5   6   >