Re: [R] predict.lm with new regressor names

2010-12-16 Thread Anirban Mukherjee
Thanks very much Dennis and Michael. That makes sense. I had some very sloppy code which did the equivalent of y-rnorm(100) x-list() x[[1]]-rnorm(100) x[[2]]-rnorm(100) lm.yx-lm(y~x[[1]]+x[[2]]) To predict from lm.yx, I was trying to feed predict.lm a data.frame with columns called x[[1]] and

[R] Error: package 'RODBC' was built before R 2.10.0: please re-install it

2010-12-16 Thread taby gathoni
Hi all, Am trying to install RODBC so that I can read excel 2007 files directly into R without converting into .csv or .txt formats. I am getting the  error: Error: package 'RODBC' was built before R 2.10.0: please re-install it The reason why i want to read the files directly is because  i

[R] extracting IDs from topGO results

2010-12-16 Thread Paul Rigor
Hello, So I'm working on extracting IDs from a topGO result object. I have a list of terms ranked by p values. However, does the result object contain indices to the original list of gene ids per go term? The documentation was a bit unclear. Thanks, Paul [[alternative HTML version

[R] gafit() - specifying range for results

2010-12-16 Thread zbynek.jano...@gmail.com
I have a problem regarding gafit() from gafit package. Is it possible to specify range of possible results of the function? I am using it for automated fitting if variogram model, which has 3 parameters. None of them can be negative, however some data samples lead to negative values. There are

Re: [R] Using Metafor package: how to backtransform model coefficients when Freeman Tukey double arcine transformation is used

2010-12-16 Thread Viechtbauer Wolfgang (STAT)
Dear Patricia, I was recently asked the exact same question, so the answer is yes, but it takes a little bit of extra work and the newest version of the metafor package (version 1.5-0, which was submitted to CRAN yesterday and which should hopefully be ready for download in a few days). I'll

Re: [R] Error: package 'RODBC' was built before R 2.10.0: please re-install it

2010-12-16 Thread Uwe Ligges
On 16.12.2010 09:17, taby gathoni wrote: Hi all, Am trying to install RODBC so that I can read excel 2007 files directly into R without converting into .csv or .txt formats. I am getting the error: Error: package 'RODBC' was built before R 2.10.0: please re-install it So why haven't you

[R] R 2.12.1 is released

2010-12-16 Thread Peter Dalgaard
I've rolled up R-2.12.1.tar.gz a short while ago. This is an update release, which fixes a number of mostly minor issues, and some consolidation within the area of reference classes. The most serious issues were probably that we were not catching misspelled NAMESPACE directives and not catching

[R] plot.ca with labelled axes?

2010-12-16 Thread Manderscheid Katharina
hi all, maybe my last post was to short and cryptic. i conducted a correspondence analysis with ca(my.data) and would like to have the x and y axis labelled with the eigenvalues of the dimensions? the argument xlab/ylab does not work... thanks for suggestions, kat

[R] Is there a join() function in R ? OR: simulating Combining ggplot2 and Google Maps by David Kahle

2010-12-16 Thread christiaan pauw
Hi everybody Im on R version 2.11.1 on Mac OS X I am working through David Kahle's example of using ggplot2 with Rgooglemaps (found here: https://github.com/hadley/ggplot2/wiki/Crime-in-Downtown-Houston,-Texas-:-Combining-ggplot2-and-Google-Maps). Excellent page by the way. I have downloaded

[R] How can I draw a line in empirical distribution function?

2010-12-16 Thread kiotoqq
I've got the graphic with this: a=c(120,40,75,85,55,75,55,90,90,55,155) plot(ecdf(a)) How can I draw lines to show the lower quatile and upper quartil? I only know there is the argument lines(), but I don't know how to use it -- View this message in context:

Re: [R] Is there a join() function in R ? OR: simulating Combining ggplot2 and Google Maps by David Kahle

2010-12-16 Thread Michael Bedward
Hi Christiaan, That looks like the join function in the plyr package. Michael On 16 December 2010 22:06, christiaan pauw cjp...@gmail.com wrote: Hi everybody Im on R version 2.11.1  on Mac OS X I am working through David Kahle's example of using ggplot2 with Rgooglemaps (found here:

Re: [R] How can I draw a line in empirical distribution function?

2010-12-16 Thread zbynek.jano...@gmail.com
I believe that functions yline {fields} xline {fields} are what you´re looking for try to type yline(c(.25,.75)) That shoud do that Best Regards Zbynek Janoska -- View this message in context:

[R] Adding graphs to a map

2010-12-16 Thread driechel
I have been searching for a while how to do this but I have no clue. So I have a shape file, with 10 points where some water quality is measured. In an csv file I have these values. I would like to couple this measurements (in boxplot) to each point in the shapefile and connect the name of the

[R] Integrate two function in R

2010-12-16 Thread Alaios
Hello I have two function in R like g(x)=2x-3 and s(x)=5x^2+2 and I want to find the integrafl of the g(x)*s(x) inside the interval of [a,b] Could you please help me find the proper function? I would like to thank you in advance for your help Regards Alex [[alternative HTML

Re: [R] Reg : null values in kmeans

2010-12-16 Thread Jannis
Hi Raji, I am quite sure that kmeans in general is not able to handle missing values so most probably there wont be an option for this in R. Either you omit the observations with NAs as William proposed or you search for some algorithm that can handle missing values (not sure whether there is

[R] adding more columns in big.matrix object of bigmemory package

2010-12-16 Thread utkarshsinghal
Hi all, Is there any way I can add more columns to an existing filebacked big.matrix object. In general, I want a way to modify an existing big.matrix object, i.e., add rows/columns, rename colnames, etc. I tried the following: library(bigmemory) x =

Re: [R] Integrate two function in R

2010-12-16 Thread Ben Bolker
Alaios alaios at yahoo.com writes: Hello I have two function in R like g(x)=2x-3 and s(x)=5x^2+2 and I want to find the integrafl of the g(x)*s(x) inside the interval of [a,b] Analytically or numerically? It sounds like you want the answer analytically, in which case R can't do

Re: [R] extracting IDs from topGO results

2010-12-16 Thread Ben Bolker
Paul Rigor pryce at ucla.edu writes: So I'm working on extracting IDs from a topGO result object. I have a list of terms ranked by p values. However, does the result object contain indices to the original list of gene ids per go term? The documentation was a bit unclear. My guess is that

Re: [R] Integrate two function in R

2010-12-16 Thread Ben Bolker
Ben Bolker bbolker at gmail.com writes: Analytically or numerically? It sounds like you want the answer analytically, in which case R can't do it, but it is an easy integral g(x)*s(x) = 10*x^3-15*x^2+4*x-6 indefinite integral = 10/3*x^4 -15/3*x^3 + 4/2*x^2 - 6*x + C oops, the

Re: [R] Is there a join() function in R ? OR: simulating Combining ggplot2 and Google Maps by David Kahle

2010-12-16 Thread christiaan pauw
Thanks Michael I update plyr and it works now. regards, Christiaan On 16 December 2010 13:40, Michael Bedward michael.bedw...@gmail.comwrote: Hi Christiaan, That looks like the join function in the plyr package. Michael [[alternative HTML version deleted]]

Re: [R] Integrate two function in R

2010-12-16 Thread David Winsemius
On Dec 16, 2010, at 7:27 AM, Alaios wrote: Hello I have two function in R like g(x)=2x-3 and s(x)=5x^2+2 and I want to find the integrafl of the g(x)*s(x) inside the interval of [a,b] Could you please help me find the proper function? It depends on what you are doing: None of what

[R] Convert tileplot's trellis to shapefile/ Add values to voronoi polygon

2010-12-16 Thread pearl may dela cruz
I would like to create a voronoi map that can show me point values like the ones in colum street_cle. I was able to do it in tileplot(latticeExtra) like the ones attached, and with the following commands: xy=list(x=x2$X, y=x2$Y) xy$street_cle - x2$street_cle tileplot(street_cle~ x*y, xy)

Re: [R] Integrate two function in R

2010-12-16 Thread Eduardo de Oliveira Horta
I guess what you have is g - function(x){ 2*x-3 } s - function(x){ 5*x^2+2 } and what you want is f-function(x){ g(x)*s(x) } integrate(f,a,b) Try that and see if it works. If not (that is, if your actual g and s are not as in the example), maybe you'll have to do this:

Re: [R] Integrate two function in R

2010-12-16 Thread Kjetil Halvorsen
see inline. On Thu, Dec 16, 2010 at 10:11 AM, Ben Bolker bbol...@gmail.com wrote: Alaios alaios at yahoo.com writes: Hello I have two function in R like g(x)=2x-3 and s(x)=5x^2+2 and I want to find the integrafl of the g(x)*s(x) inside the interval of [a,b]  Analytically or

[R] Reset R to a vanilla state

2010-12-16 Thread Holger Hoefling
Hi all, I need some help with R. I am looking for a function that puts R back into a vanilla state (exactly the same when I just started it). Specifically I want all objects in the workspace removed and all non-base packages detached and unloaded; all base packages that are loaded on startup

[R] test whether all elements of a vector are identical

2010-12-16 Thread Jannis
Dear list, this might be an easy one, but I could figure out a solution (or how to google the right term). Is there any way to test whether all elements of a vector are identical? For numeric vectors I would use sum(diff(vector)==0)==0 but I have character vectors. Any Ideas? Cheers

Re: [R] Numbers in a string

2010-12-16 Thread Dieter Menne
Petr Savicky wrote: One of the suggestions in this thread was to use an external program. A possible solution without negation in Perl is @a = (AB15E9SDF654VKBN?dvb.65 =~ m/[0-9]/g); print @a, \n; 15965465 Which is gsub([^0-9], , AB15E9SDF654VKBN?dvb.65) as Henrique

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 a

Re: [R] test whether all elements of a vector are identical

2010-12-16 Thread Tal Galili
How about: length(unique(vector)) 1 ? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] test whether all elements of a vector are identical

2010-12-16 Thread Jannis
Thanks Tal. Sometimes easy solutions are close by but hard to find when one is focused on the wrong direction :-)! Jannis Tal Galili schrieb: How about: length(unique(vector)) 1 ? Contact Details:--- Contact me:

Re: [R] How can I draw a line in empirical distribution function?

2010-12-16 Thread Dieter Menne
zbynek.jano...@gmail.com wrote: I believe that functions yline {fields} xline {fields} are what you´re looking for try to type yline(c(.25,.75)) It work, but one should avoid pulling in a special package for such a job. xline is defined as function (x, ...) { abline(v = x, ...)

Re: [R] Reset R to a vanilla state

2010-12-16 Thread Georg Ruß
On 16/12/10 15:12:47, Holger Hoefling wrote: Specifically I want all objects in the workspace removed rm(list=ls()) should do this trick. and all non-base packages detached and unloaded You may obtain the list of loaded packages via (.packages()) Store this at the beginning of your session,

[R] Help on neural network

2010-12-16 Thread sadanandan
Hi all, I am trying to develop a neural network(Multilayer perceptron) with the package 'NEURALNET'. I have some doubts on it, 1. Whether this procedure taken care about categorical input variables- The reason is I could not find any option to describe type of variable in the arguments? 2.The

[R] Optimal method to scan cells and set flag

2010-12-16 Thread Jon Erik Ween
Hi I am still working on my large dataset (sample attached) that contains a series of binary variables (flags, yes/no) regarding affected brain areas (Lica,LAtChor,LA1 ,etc). I need to scan these columns, if value = Y for Lxxx set LesionSide to L, if Y for Rxxx set to R and B if both. There

[R] defining a formula method for a weighted lm()

2010-12-16 Thread Michael Friendly
In the vcdExtra package on R-Forge, I have functions and generic methods for calculating log odds ratios for R x C x strata tables. I'd like to define methods for fitting weighted lm()s to the resulting loddsratio objects, but I'm having problems figuring out how to do this generally. #

[R] How to save play back an entire R session?

2010-12-16 Thread Roy Shimizu
I know that at the end of an R session I'm given the option to save the current *state* of the session. But I would like to save the entire sequence of inputs that took place during the session, so that I can play them back later, and not only be left in the same state I was at the time of saving

Re: [R] test whether all elements of a vector are identical

2010-12-16 Thread David Winsemius
On Dec 16, 2010, at 9:17 AM, Jannis wrote: Dear list, this might be an easy one, but I could figure out a solution (or how to google the right term). Is there any way to test whether all elements of a vector are identical? ?identical For numeric vectors I would use

[R] How to covernt this list to data.frame?

2010-12-16 Thread Fabrice Tourre
using dget to try this data. dget(probesnum)-a some data length is 3, some is 4. thanks. __ 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] test whether all elements of a vector are identical

2010-12-16 Thread baptiste auguie
Hi, The fastest way seems to be, all(x[1] == x) HTH, baptiste On 16 December 2010 15:17, Jannis bt_jan...@yahoo.de wrote: Dear list, this might be an easy one, but I could figure out a solution (or how to google the right term). Is there any way to test whether all elements of a

Re: [R] Reset R to a vanilla state

2010-12-16 Thread jim holtman
exit from the current session and startup a new one. On Thu, Dec 16, 2010 at 9:12 AM, Holger Hoefling hhoef...@gmail.com wrote: Hi all, I need some help with R. I am looking for a function that puts R back into a vanilla state (exactly the same when I just started it). Specifically I want

Re: [R] How to save play back an entire R session?

2010-12-16 Thread Duncan Murdoch
On 16/12/2010 9:43 AM, Roy Shimizu wrote: I know that at the end of an R session I'm given the option to save the current *state* of the session. But I would like to save the entire sequence of inputs that took place during the session, so that I can play them back later, and not only be left

Re: [R] How to save play back an entire R session?

2010-12-16 Thread David Winsemius
On Dec 16, 2010, at 9:43 AM, Roy Shimizu wrote: I know that at the end of an R session I'm given the option to save the current *state* of the session. But I would like to save the entire sequence of inputs that took place during the session, so that I can play them back later, and not only

Re: [R] Reset R to a vanilla state

2010-12-16 Thread David Winsemius
On Dec 16, 2010, at 10:01 AM, jim holtman wrote: exit from the current session and startup a new one. Possibly with an additional step of deleting .Rdata from the working directory. On Thu, Dec 16, 2010 at 9:12 AM, Holger Hoefling hhoef...@gmail.com wrote: Hi all, I need some help

Re: [R] test whether all elements of a vector are identical

2010-12-16 Thread David Winsemius
On Dec 16, 2010, at 9:56 AM, baptiste auguie wrote: Hi, The fastest way seems to be, all(x[1] == x) I'm sure that is more efficient than this methods: patt - paste(^,x[1],$, sep=) length( grep(patt, x) == length(x) ) ... but sometimes it helps to have strategies that might generalize to

Re: [R] test whether all elements of a vector are identical

2010-12-16 Thread David Winsemius
On Dec 16, 2010, at 10:19 AM, David Winsemius wrote: On Dec 16, 2010, at 9:56 AM, baptiste auguie wrote: Hi, The fastest way seems to be, all(x[1] == x) I'm sure that is more efficient than this methods: patt - paste(^,x[1],$, sep=) length( grep(patt, x) == length(x) ) Wrong position

[R] editor for MacOS

2010-12-16 Thread Troels Ring
Dear friends - I'm using Tinn-R in Windows and find it OK. My son is running MacOS and is just starting using R and I know nothing about MacOS and R but we seem to have difficulties in finding something similar to Tinn for MaC. What are your suggestions? Thanks a lot! Troels Ring, MD Aalborg,

Re: [R] Reset R to a vanilla state

2010-12-16 Thread Holger Hoefling
Hi, I am writing code in Emacs using org-mode and babel. I have a number of code blocks that are tangled into several files with some files spanning several code blocks. Each of these files is supposed to run independently of each other on a clean version of R, however I also want to be able to

Re: [R] editor for MacOS

2010-12-16 Thread Marc Schwartz
On Dec 16, 2010, at 9:41 AM, Troels Ring wrote: Dear friends - I'm using Tinn-R in Windows and find it OK. My son is running MacOS and is just starting using R and I know nothing about MacOS and R but we seem to have difficulties in finding something similar to Tinn for MaC. What are your

Re: [R] Reset R to a vanilla state

2010-12-16 Thread Marc Schwartz
If you are using Emacs/ESS/org-mode etc., you may be better of posting to the ESS-Help list, where there are folks that I know of who are engaged in using org-mode for R coding and documentation. They may be able to offer some insights into their practices. More info at:

[R] Subarray specification problem

2010-12-16 Thread Roy Shimizu
Hi. I'm new to R, and I'm still learning R's system for addressing subsets of data structures. I'm particularly interested in the problem of selecting subarrays based on complex criteria involving the dimnames (as opposed to the values of the cells) of the array. Here's an example of such a

Re: [R] Adding graphs to a map

2010-12-16 Thread Greg Snow
The symbols function can add symbols (including boxplot style boxes) to an existing plot (your map for example). The subplot function in the TeachingDemos package can add entire plots (including boxplots) to an existing plot. Both the above work with base graphs only, not grid (lattice,

Re: [R] editor for MacOS

2010-12-16 Thread David L. Van Brunt, Ph.D.
Frankly, the built-in R editor for OS X is far better than the built-in editor for Windows, in my opinion having used both. I've never found the need for something like TinnR on the Mac side-- but I have used TextWrangler on occasion and enjoyed the syntax highlighting, line numbering, etc.

Re: [R] editor for MacOS

2010-12-16 Thread peter dalgaard
On Dec 16, 2010, at 16:54 , Marc Schwartz wrote: On Dec 16, 2010, at 9:41 AM, Troels Ring wrote: Dear friends - I'm using Tinn-R in Windows and find it OK. My son is running MacOS and is just starting using R and I know nothing about MacOS and R but we seem to have difficulties in

Re: [R] How to save play back an entire R session?

2010-12-16 Thread Rob Goedman
Roy, In addition to previous responses, another way of achieving this is to only work from scripts. I rarely type anything directly into R, just edit scripts in an editor and then execute the entire script (or parts of the script) from within the editor. This way of working provides backup,

Re: [R] How to save play back an entire R session?

2010-12-16 Thread Greg Snow
To just save a copy of all the commands issued you can use the savehistory function (this is documented on the same page as history, so David's answer would have lead you there as well). If you want to save all the outputs from you session you can use the sink function. You can save a

Re: [R] Numbers in a string

2010-12-16 Thread Petr Savicky
On Thu, Dec 16, 2010 at 06:17:45AM -0800, Dieter Menne wrote: Petr Savicky wrote: One of the suggestions in this thread was to use an external program. A possible solution without negation in Perl is @a = (AB15E9SDF654VKBN?dvb.65 =~ m/[0-9]/g); print @a, \n; 15965465

Re: [R] editor for MacOS

2010-12-16 Thread Marc Schwartz
On Dec 16, 2010, at 10:26 AM, peter dalgaard wrote: On Dec 16, 2010, at 16:54 , Marc Schwartz wrote: On Dec 16, 2010, at 9:41 AM, Troels Ring wrote: Dear friends - I'm using Tinn-R in Windows and find it OK. My son is running MacOS and is just starting using R and I know nothing about

Re: [R] Numbers in a string

2010-12-16 Thread William Dunlap
In S+ strsplit() has a keep=TRUE/FALSE argument to specify whether to return the substrings that match the pattern or to return the substrings between matches to the pattern (the default). E.g., strings - c(abcde. 11 abc 5.31e+34, (1.45), AB15E9SDF654VKBN?dvb.65) number.pattern -

[R] find closest match between two vectors

2010-12-16 Thread Jannis
Dear list, I hope I can define my problem in an understandable manner. I seek some funktion that finds me the index of the value in a vector 1 that is the least bigger then the value in another vector 2. And this for all values in vector 2. For example: vector 1 : c(1,2,6) vector 2 :

Re: [R] find closest match between two vectors

2010-12-16 Thread David Winsemius
On Dec 16, 2010, at 12:31 PM, Jannis wrote: Dear list, I hope I can define my problem in an understandable manner. I seek some funktion that finds me the index of the value in a vector 1 that is the least bigger then the value in another vector 2. And this for all values in vector 2.

Re: [R] find closest match between two vectors

2010-12-16 Thread Phil Spector
Jannis - One approach is as follows: one = c(1,2,6) two = c(0,0.5,1,2,3,8) findit = function(x,vec){ + y = vec - x + y[y=0] = NA + if(all(is.na(y)))NA else which.min(y) + } sapply(two,findit,one) [1] 1 1 1 2 3 NA - Phil Spector

Re: [R] How to save play back an entire R session?

2010-12-16 Thread Roy Shimizu
Thank you all. I experimented with the various suggestions you proposed. Saving the session history is indeed easy (savehistory). The problem is the playback. I didn't find a reliable method. Plus, I now realize that the very idea of playing back a saved session is, in general, a bad one,

Re: [R] Question

2010-12-16 Thread csrabak
Em 14/12/2010 12:46, Matthew Rosett escreveu: How do I determine if my data deviate from the normal distribution? The sample size is 1000 (weights of people). As others already posted about the Statistical theoretic aspects of it, I want to add that weights of people are not normal distributed

[R] Please help with one problem

2010-12-16 Thread diavolo_vam
It is interesting to graph the distribution of the standardized average as n increases. Do this when the Xi are uniform on [0; 1]. Look at the histogram when n is 1, 5, 10 and 25. Do you see the normal curve taking shape? (A rule of thumb is that if the Xi are not too skewed, then n 25 should

[R] xyplot

2010-12-16 Thread Rasanga Ruwanthi
Hi   I am using following code to produce a xyplot for some longitudinal data. There are 2 panels. It produced all longitudinal trajectories with mean profile. But since the dataset it very large plot looks very messy. I want to show, say 10 randomly selected individual longitudinal

Re: [R] legend not appearing in Word document

2010-12-16 Thread Robert Baer
On 12/12/2010 8:59 AM, Tim Clark wrote: I need help with using graphics in Word 2007 that will later be converted into a pdf document. I have tried several formats and found that I get the best quality of graphics using .wmf, .eps format, but when I convert it to .pdf I get a bunch of lines

Re: [R] 300 dpi and eps:

2010-12-16 Thread Philipp Pagel
Can someone recommend some paper that makes clear the relation and distinctions between vector and raster graphics, but especially with some practical examples in regard to what is the relation between page (height and width) and dpi. I'm not aware of a paper, but it's really not rocket

Re: [R] Please help with one problem

2010-12-16 Thread Sarah Goslee
My first instinct is to suggest that you ask your professor or TA for help, since this looks remarkably like a homework problem. We are not here to do your work for you. Failing that, what have you tried? Have you gotten error messages or otherwise gone wrong? We will help with specific R

Re: [R] How to save play back an entire R session?

2010-12-16 Thread Philipp Pagel
Saving the session history is indeed easy (savehistory). The problem is the playback. I didn't find a reliable method. Well, you could simply source() the .Rhistory file (or the file you saved under some other name). But as you already poitned out - it's better to go with scripts to begin

Re: [R] xyplot

2010-12-16 Thread Andrew Miles
Try sample() which will allow you to randomly select 10 ID's from your ID variable, which you can then plot. Andrew Miles On Dec 16, 2010, at 10:49 AM, Rasanga Ruwanthi wrote: Hi I am using following code to produce a xyplot for some longitudinal data. There are 2 panels. It produced

Re: [R] Question

2010-12-16 Thread Bert Gunter
... Depends on the sampled population. If all children under 6, I'd expect it to be quite skew. If all second graders, I would expect it to be more symmetric. Though, sadly these days, there's probably a long tail to the right, at least in developed countries and especially here in the U.S..

[R] Compare two dataframes

2010-12-16 Thread Mark Na
Hello, I have two dataframes DF1 and DF2 that should be identical but are not (DF1 has some rows that aren't in DF2, and vice versa). I would like to produce a new dataframe DF3 containing rows in DF1 that aren't in DF2 (and similarly DF4 would contain rows in DF2 that aren't in DF1). I have a

Re: [R] Please help with one problem

2010-12-16 Thread diavolo_vam
Hello Sarah, Thank you for your post, but this is one task from simpleR book, and I want to understand the lesson. If you don`t want to help me, OK no problem, but if anyone can help let do it. -- View this message in context:

Re: [R] Please help with one problem

2010-12-16 Thread Jeff Newmiller
Whether you selected the problem or a teacher did, you need to stay on topic and provide specific examples of code you have tried with sample input data as needed to make the code self-contained. Ask about R, not basic statistics. diavolo_vam venc...@abv.bg wrote: Hello Sarah, Thank you for

Re: [R] Please help with one problem

2010-12-16 Thread Sarah Goslee
Please see the second half of my original reply, reprinted here for your convenience: Failing that, what have you tried? Have you gotten error messages or otherwise gone wrong? We will help with specific R questions presented with complete information as described in the posting guide. This isn't

Re: [R] LaTeX, MiKTeX, LyX: A Guide for the Perplexed

2010-12-16 Thread Paul Miller
Hello Everyone,   Thanks to all who replied to my earlier message. I got quite a few responses and several suggestions about how to create nice looking documents that incorporate output from R. It took some time to investigate these, and in some ways I'm more perplexed than when I started.  

[R] Arguments in functions

2010-12-16 Thread Prew, Paul
Hello, I'm not much of a programmer, and am trying to understand the workings of the function below called RStatFctn within this bootstrap procedure. RStatFctn is defined to have two arguments: x, intended to be a data vector; and d intended to be an index (or so it looks to me). Later,

[R] Code for The R Book

2010-12-16 Thread Paul Miller
Hello Everyone,   Does anyone have the R code for this book? I contacted the author about this and was told that it used to be on the book's website, but that the publisher had asked that it be taken down. I'm hoping that someone will have downloaded the code when it was available, and that

[R] moving average with gaps in time series

2010-12-16 Thread Josef . Kardos
I have a time series with interval of 2.5 minutes, or 24 observations per hour. I am trying to find a 1 hr moving average, looking backward, so that moving average at n = mean(n-23 : n) The time series has about 1.5 million rows, with occasional gaps due to poor data quality. I only want to

[R] understanding the 4 parameter logisitc regression

2010-12-16 Thread 1Rnwb
I have questions regarding test=data.frame(cbind(conc=c(25000, 12500, 6250, 3125, 1513, 781, 391, 195, 97.7, 48.4, 24, 12, 6, 3, 1.5, 0.001), il10=c(330269, 216875, 104613, 51372, 26842, 13256, 7255, 3049, 1849, 743, 480, 255, 241, 128, 103, 50))) nls(log(il10)~A+(B-A)/(1+(conc/xmid

Re: [R] Arguments in functions

2010-12-16 Thread Phil Spector
Paul - Please take a look at the help file for boot, i.e. type ?boot at the R prompt. There you will see, along with other information: statistic: A function which when applied to data returns a vector containing the statistic(s) of interest. When ‘sim=parametric’,

Re: [R] Code for The R Book

2010-12-16 Thread Carlos Ortega
Hello, You can find the code here: http://www.bio.ic.ac.uk/research/mjcraw/therbook/index.htm http://www.bio.ic.ac.uk/research/mjcraw/therbook/index.htmRegards, Carlos Ortega. On Thu, Dec 16, 2010 at 9:31 PM, Paul Miller pjmiller...@yahoo.com wrote: Hello Everyone, Does anyone have the R

[R] Optim function with meta parameters

2010-12-16 Thread albechan
Hi guys. I have a dataset with 4 columns. In the first and second column I have the same qualitative variable referred to different teams of people. There are 10 teams in total and they compete against each other to perform a certain task whose result is stored in the third column for the team

Re: [R] Solution to differential equation

2010-12-16 Thread Ravi Varadhan
Hi Mahesh, Here is a solution to your problem. I have used the power-series approach. You can solve for any positive value of k1 and k2 (except that k2 cannot be unity). I think this is correct, but you can compare this with a numerical ODE solver, if you wish. pseries - function(u, k2,

Re: [R] editor for MacOS

2010-12-16 Thread Tobias Verbeke
On 12/16/2010 04:54 PM, Marc Schwartz wrote: On Dec 16, 2010, at 9:41 AM, Troels Ring wrote: Dear friends - I'm using Tinn-R in Windows and find it OK. My son is running MacOS and is just starting using R and I know nothing about MacOS and R but we seem to have difficulties in finding

Re: [R] editor for MacOS

2010-12-16 Thread Erich Neuwirth
TextMate from www.macromates.com is a very nice editor, similar in power to Emacs, but much more Macish. It has its own subculture with many macro packages. It is NOT free, but not very expensive either. redcar available from http://redcareditor.com/ open source sibling of TextMate running on

Re: [R] editor for MacOS

2010-12-16 Thread Jakson A. Aquino
On Thu, Dec 16, 2010 at 12:41 PM, Troels Ring tr...@gvdnet.dk wrote: Dear friends - I'm using Tinn-R in Windows and find it OK. My son is running MacOS and is just starting using R and I know nothing about MacOS and R but we seem to have difficulties in finding something similar to Tinn for

Re: [R] editor for MacOS

2010-12-16 Thread stephen sefick
You will get as many suggestions as there are people and here is mine- I like gedit. I would move that this be added to the FAQs as it seems to pop up quite often. Stephen On Thu, Dec 16, 2010 at 4:38 PM, Jakson A. Aquino jaksonaqu...@gmail.com wrote: On Thu, Dec 16, 2010 at 12:41 PM, Troels

Re: [R] Code for The R Book

2010-12-16 Thread Paul Miller
Hi Carlos,   Unfortunately, I don't think I can get the code there. I've been to the website before, and all I've been able to find is data. At first, I thought that was all that had ever been there. But when I got to the end of The R Book the first time, I noticed a statement indicating that

[R] moving average with gaps in time series

2010-12-16 Thread Carl Witthoft
I'm not completely sure what your test setup does, but wouldn't it be simpler to take a moving average at every point, but set the window dynamically to be over the previous hour? In pseudocode, for the j-th sample: meanval[j] - mean(Value[ DateTime[(DateTime-DateTime[j])0

[R] my function does not work for large data set

2010-12-16 Thread Changbin Du
Dear R community, I have one function, it works for small data set, but does not work on large data set, can anyone help me with this? #creat new variable by dividing each aa dimer by total_length. imper-function(x, file) { +round(x/file$length, 5) + }

Re: [R] my function does not work for large data set

2010-12-16 Thread Jim Holtman
I think that your object exceeds the limit of 2^31 elements. Sent from my iPad On Dec 16, 2010, at 17:44, Changbin Du changb...@gmail.com wrote: Dear R community, I have one function, it works for small data set, but does not work on large data set, can anyone help me with this? #creat

Re: [R] my function does not work for large data set

2010-12-16 Thread Changbin Du
Thanks Jim1 I will split the data and rum again. On Thu, Dec 16, 2010 at 2:57 PM, Jim Holtman jholt...@gmail.com wrote: I think that your object exceeds the limit of 2^31 elements. Sent from my iPad On Dec 16, 2010, at 17:44, Changbin Du changb...@gmail.com wrote: Dear R community,

[R] Revolutions Blog: November Roundup

2010-12-16 Thread David Smith
I write about R every weekday at the Revolutions blog:  http://blog.revolutionanalytics.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you missed them, here are some articles related to R from the month of November:

Re: [R] moving average with gaps in time series

2010-12-16 Thread Jannis
Hi Josef, is there any particular reason why you want to use your own function? Have a look at the stats functions or special timeseries functions for R. I am sure you will find something that calculates an ordinary moving average (and a bunch of fancier stuff). 'filter' (stats) for example

Re: [R] Compare two dataframes

2010-12-16 Thread Michael Bedward
Hello Mark, This is how I do it but it's longer than your code :) unique.rows - function (df1, df2) { # Returns any rows of df1 that are not in df2 out - NULL for (i in 1:nrow(df1)) { found - FALSE for (j in 1:nrow(df2)) { if (all(df1[i,] == df2[j,])) { found - TRUE

Re: [R] Please help with one problem

2010-12-16 Thread Jannis
Hi, I would suggest two things: 1. Use a subject related to your problem when posting to the list! 2. State a question (as Sarah has already said)! Like this nobody can really understand what you want (or at least I cant!). Jannis diavolo_vam schrieb: It is interesting to graph the

[R] SVM Posterior Probabilities

2010-12-16 Thread Vijayakumar Ramachandran
I am using SVM in R via package e1071 package. Is it possible to obtain probabilities of the classification for the test set based on distances from the classification planes? This seems possible in Linear Discriminant Analysis (via lda function in MASS package) through the posterior

Re: [R] editor for MacOS

2010-12-16 Thread huang min
Dear David, I also use the build-in editor and textwrangler. How can I get the syntax highlighting in textwrangler? Huang On Fri, Dec 17, 2010 at 12:02 AM, David L. Van Brunt, Ph.D. dlvanbr...@gmail.com wrote: Frankly, the built-in R editor for OS X is far better than the built-in editor

[R] how to convert sloppy data into a time series?

2010-12-16 Thread Mike Williamson
Hi All, First let me state that I did search for a while on r-help, google, and using the sos package inside of 'R', without much luck. I want to know how to create a univariate time series from a set of data that will have huge time gaps in it. For instance, here is a snapshot of a piece

  1   2   >