[R] Boxplot
bonjour, je voudrais savoir s'il serait possible de suggérer aux développeurs de R de proposer une option supplémentaire pour les moustaches, à savoir les placer sur d1 et d9 comme c'est préconisé dans les programmes du secondaire en France, option du style boxplot (serie,range=91) par exemple... i would like to know if it is possible to have (with the agrement of developpers) a boxplot with whiskers from the first decile to the ninth decile, as usual in secondary french schools... by example : boxplot(serie,range=91) for french boxplot ? jean-pierre gerbal http://mathazay.free.fr/spip/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] plot bg color problem
Dear R users, this line below is not painting the background black but it is still white. plot(x,y[x], type='s', bg='black', col='yellow', ylim=range(y)) I am running R 2.2.1 thanks - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] plot bg color problem
On 4/2/2006 8:03 AM, Fred J. wrote: Dear R users, this line below is not painting the background black but it is still white. plot(x,y[x], type='s', bg='black', col='yellow', ylim=range(y)) I am running R 2.2.1 See ?plot.default. You need x - y - 1:10 par(bg='black') plot(x,y[x], type='s', col='yellow', ylim=range(y)) but you'll probably want to change some more colours, using par() or in the plot call, e.g. par(bg='black', fg='white', col='green', col.axis='red', col.lab='magenta', col.main='blue', col.sub='cyan') plot(x,y[x], type='s', col='yellow', ylim=range(y), main='main', sub='sub') (which is not the most beautiful plot, but it does show you which settings affect which parts of the plot). Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] VARIANCE across each ROW
Try this: # test data set.seed(1) x - matrix(rnorm(24), 6) # 6x4 matrix sd(t(x))^2 # [1] 0.5631489 1.9047905 0.7813566 0.7415535 0.4992331 1.7095818 # same but generates an intermediate 6x6 matrix # so less desirable if real matrix has large number of rows diag(var(t(x)) On 4/1/06, mark salsburg [EMAIL PROTECTED] wrote: I have a very large matrix. I would like to display the variance across each row. In other words, I want to output a vector containing the values of variance across row. When I use the function var(), it seems to give me the variability of each column. Any ideas?? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Boxplot
Check out the first two hits from: RSiteSearch(french boxplot) On 4/2/06, Jean-Pierre GERBAL [EMAIL PROTECTED] wrote: bonjour, je voudrais savoir s'il serait possible de suggérer aux développeurs de R de proposer une option supplémentaire pour les moustaches, à savoir les placer sur d1 et d9 comme c'est préconisé dans les programmes du secondaire en France, option du style boxplot (serie,range=91) par exemple... i would like to know if it is possible to have (with the agrement of developpers) a boxplot with whiskers from the first decile to the ninth decile, as usual in secondary french schools... by example : boxplot(serie,range=91) for french boxplot ? jean-pierre gerbal http://mathazay.free.fr/spip/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Boxplot
Jean-Pierre GERBAL wrote: bonjour, je voudrais savoir s'il serait possible de suggérer aux développeurs de R de proposer une option supplémentaire pour les moustaches, à savoir les placer sur d1 et d9 comme c'est préconisé dans les programmes du secondaire en France, option du style boxplot (serie,range=91) par exemple... i would like to know if it is possible to have (with the agrement of developpers) a boxplot with whiskers from the first decile to the ninth decile, as usual in secondary french schools... by example : boxplot(serie,range=91) for french boxplot ? jean-pierre gerbal http://mathazay.free.fr/spip/ library(Hmisc) ?panel.bpplot With library(lattice), bwplot, and panel.bpplot you can show all deciles or any vector of quantiles. -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] -newbie | RODBC import query
Gabor Grothendieck ggrothendieck at gmail.com writes: odbcConnectionDbase(c:\\documents and settings\\egc\\desktop\\test.dbf) or use simple forward slashes, which are easier to read and work even under Windows. (Just for the record, looks it was not the problem) Dieter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Find and remove matching parentheses
To create a more end-user readable table captions for modeld, I would like to get rid of the I(...) construct in formulae (what's the hell does the I(..) mean in the contrast table) Example: effect ~ I(sqrt(nitro))*treat + I(nitro^2) should giv effect ~ sqrt(nitro)*treat + nitro^2 In know, this is a dumb model, just my test case. As far I remember, finding matching parentheses is nasty in regexp, so I resorted to a loop and counting opening/closing. Is there a more elegant solution? Dieter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Find and remove matching parentheses
See: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/30590.html On 4/2/06, Dieter Menne [EMAIL PROTECTED] wrote: To create a more end-user readable table captions for modeld, I would like to get rid of the I(...) construct in formulae (what's the hell does the I(..) mean in the contrast table) Example: effect ~ I(sqrt(nitro))*treat + I(nitro^2) should giv effect ~ sqrt(nitro)*treat + nitro^2 In know, this is a dumb model, just my test case. As far I remember, finding matching parentheses is nasty in regexp, so I resorted to a loop and counting opening/closing. Is there a more elegant solution? Dieter __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] speeding up a recursive function
Hi All, is there any general advice about speeding up recursive functions (not mentioning 'don't use them')? Regards, Federico Calboli -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] speeding up a recursive function
There is some memoization code at: http://tolstoy.newcastle.edu.au/R/help/03a/6412.html On 4/2/06, Federico Calboli [EMAIL PROTECTED] wrote: Hi All, is there any general advice about speeding up recursive functions (not mentioning 'don't use them')? Regards, Federico Calboli -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] speeding up a recursive function
On Sun, 2 Apr 2006, Federico Calboli wrote: is there any general advice about speeding up recursive functions (not mentioning 'don't use them')? Well, that's very general (did you mean recursive functions in R or C or what?). Recursion is not particularly slow in R, and you are limited to a depth of a most a few thousand. E.g.: f - function(x) if(x 0) f(x-1) system.time(for(i in 1:100) f(2000)) [1] 0.59 0.00 0.60 NA NA which is 3 usec per call. One piece of advice is to keep memory usage down, as in many of the examples I have looked at the speed issue was actually a memory issue, with datasets being copied at each level. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] speeding up a recursive function
On 4/2/06, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Sun, 2 Apr 2006, Federico Calboli wrote: is there any general advice about speeding up recursive functions (not mentioning 'don't use them')? Well, that's very general (did you mean recursive functions in R or C or what?). Recursion is not particularly slow in R, and you are limited to a depth of a most a few thousand. E.g.: f - function(x) if(x 0) f(x-1) system.time(for(i in 1:100) f(2000)) [1] 0.59 0.00 0.60 NA NA which is 3 usec per call. One piece of advice is to keep memory usage down, as in many of the examples I have looked at the speed issue was actually a memory issue, with datasets being copied at each level. Some functional languages have a feature called tail recursion that can provide performance improvements if you write your recursions to take advantage of it: http://en.wikipedia.org/wiki/Tail_recursion but I don't think R supports it. Is this likely to become available in R? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] finding method file?
dear R wizards: I am trying to determine how to determine (no further recursion) where a built-in function is defined. In particular, I have decided I am going to add sd() to the existing basic summary function, rather than try to rewrite my own summary() function from scratch. So, I just installed R-2.2.1 (via gentoo; eventually I will figure out how to get atlas/sse/sse2 working on amd64, too! PS: [a] how can I determine whether a running S installation uses sse2, sse, and atlas? [b] does atlas use sse2; [c] are there now modern graphics processor routines that might speed up R, too? ok, all of these are irrelevant sidequestions). then, I did a summary [not informative about which file it is defined in] ok, easy. Just grep. back on the unix line, # grep -r '1st Qu' /usr/lib/R which should look for this fairly unique string. to my surprise, it was only found in R-intro.html. so, how would I go about looking for where R defines functions? or has this becomes so deeply wired into fortran/C in later versions that it can no longer be changed? help/advice as always appreciated. sincerely, /ivo welch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] speeding up a recursive function
On Sun, 2 Apr 2006, Gabor Grothendieck wrote: Some functional languages have a feature called tail recursion that can provide performance improvements if you write your recursions to take advantage of it: http://en.wikipedia.org/wiki/Tail_recursion but I don't think R supports it. Is this likely to become available in R? No. For a start, this is usually done by compilers, which we don't got. In addition, it would be very difficult to do tail recursion optimization and not break most of the sys.* functions, which give explicit access to all the frames that would be optimized away. -thomas __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] New R user looking from help
Dear R users, I am trying to become a convert to R (from Stata), and I'm having some growing pains. Is there anyone would be willing to answer a few basic questions I have? Of course I am using the relevant help guides... Thanks, Brian Quinif ps. If there is anyone at UGA on this list, I'd love to hear from someone local. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Determining frequancy of events
I have a smiple set of values: a-c(1,2,3,1,5) b-c(2,2,2,2,2) c-c(2,3,4,2,6) Then I use data.frame(table(paste(a,b,c)))to determine the frequancy of each set of values occures and get the result: Var1 Freq 1 1 2 22 2 2 2 31 3 3 2 41 4 5 2 61 This is exactly what I need although the paste function puts the values into a string. I want to split the var1 into three variables while hanging onto the frequancy count so the result would be like: v1 v2 v3 Freq 1 1 2 2 2 2 2 2 3 1 3 3 2 4 1 4 5 2 6 1 What is the best way to do this? Thanks in advance, Philip. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] argv[0] --- again
dear R group: I have the probably fairly common problem that I would like to have one code.R file do different things if it is invoked from a symbolic link, which should be easy to uncover. $ ln -s code.R code-0.R $ ln -s code.R code-1.R $ R CMD BATCH code-1.R what needs to be in code-1.R to put code-1.r into a character vector? help appreciated. regards, /ivo welch PS :I read the past R-help posts on the subject, but apparently the older suggested solutions no longer work. (commandArgs() is not the answer, either.) And I did also not see it under the FAQ in the R programming section...and may I suggest this for the faq? __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] write.table() or write.csv() --- add a comment?
Dear R group: Is there a way to pass a comment line to write.table() or write.csv()? presumably, following linux and R conventions, it would be preceded by a '#' in the output. write.csv( object, file=object.csv, comment=paste(this csv file was created by mycode.R on 12/2/2005); of course, the R read functions are already smart enough to ignore the comment lines. help appreciated. regards, /ivo welch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] Determining frequancy of events
This is not a very generic option, but for your example you can use unique and cbind to create a new dataframe with the results i.e a-c(1,2,3,1,5) b-c(2,2,2,2,2) c-c(2,3,4,2,6) f=as.integer(table(paste(a,b,c)))#Stores only frequency data.frame(unique(cbind(a,b,c)),freq=f) a b c freq 1 1 2 22 2 2 2 31 3 3 2 41 4 5 2 61 I hope this helps Francisco From: Philip Bermingham [EMAIL PROTECTED] To: Philip Bermingham [EMAIL PROTECTED] CC: r-help r-help@stat.math.ethz.ch Subject: [R] Determining frequancy of events Date: Sun, 2 Apr 2006 18:10:37 -0400 I have a smiple set of values: a-c(1,2,3,1,5) b-c(2,2,2,2,2) c-c(2,3,4,2,6) Then I use data.frame(table(paste(a,b,c)))to determine the frequancy of each set of values occures and get the result: Var1 Freq 1 1 2 22 2 2 2 31 3 3 2 41 4 5 2 61 This is exactly what I need although the paste function puts the values into a string. I want to split the var1 into three variables while hanging onto the frequancy count so the result would be like: v1 v2 v3 Freq 1 1 2 2 2 2 2 2 3 1 3 3 2 4 1 4 5 2 6 1 What is the best way to do this? Thanks in advance, Philip. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] write.table() or write.csv() --- add a comment?
On 4/2/2006 9:38 PM, ivo welch wrote: Dear R group: Is there a way to pass a comment line to write.table() or write.csv()? presumably, following linux and R conventions, it would be preceded by a '#' in the output. write.csv( object, file=object.csv, comment=paste(this csv file was created by mycode.R on 12/2/2005); of course, the R read functions are already smart enough to ignore the comment lines. Open a connection, write the comment to the connection, write the data to the connection, close the connection. e.g. con - file(object.csv, open=wt) writeLines(paste(# this csv file was created by mycode.R on 12/2/2005), con) write.csv( object, con) close(con) Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] argv[0] --- again
On 4/2/2006 9:34 PM, ivo welch wrote: dear R group: I have the probably fairly common problem that I would like to have one code.R file do different things if it is invoked from a symbolic link, which should be easy to uncover. $ ln -s code.R code-0.R $ ln -s code.R code-1.R $ R CMD BATCH code-1.R what needs to be in code-1.R to put code-1.r into a character vector? help appreciated. regards, /ivo welch PS :I read the past R-help posts on the subject, but apparently the older suggested solutions no longer work. (commandArgs() is not the answer, either.) And I did also not see it under the FAQ in the R programming section...and may I suggest this for the faq? I think the answer to this is platform dependent. In Windows, the answer is: you can't. The command line gets eaten by Rcmd.exe and isn't passed to R. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] mutual information for two time series
Have you first done more traditional analyses like normal probability plots and simple ARIMA models of each series individually? In particular, have you tried this after transforming your two series to the mean and difference between the two series? The mean series should relate to what's happening in both hemispheres, while the difference should relate more to differences. Regarding KernSmooth, I didn't see in its documentation any mention of time series. Virtually all of the traditional distributional analyses assume independence. Almost no time series are statistically independent. I'd be particularly skeptical about any suggestions of non-normality among time series with 128 observations per second. I've skimmed through your code, but I've never used KernSmooth, so I can't comment further. If you had included a short, self-contained, reproducible example, I might have been able to say more. hope this helps. spencer graves tim parkin wrote: Hi I hope this is going to the right place. I am trying to write a program which uses KernSmooth library to estimate mutual information between two time series at various different lags. At the moment it’s producing negative values, which is supposed to be impossible (something is fishy). I am summing across one row of the matrix to get p(value is in bin x) and summing across the columns to get p(value is in y), and just taking the value for the density at x,y to get the joint probability p(x,y), then just applying formulas for mutual information…. I know it’s kludgy… does anyone have any idea as to what I’ve done wrong? The data is EEG sampled at 128hz from the left hemisphere (C3) and right hemisphere of the brain during neurofeedback sessions and enters via a bivariate time series to datin, and lmax is the maximum lag to measure the mutual information at. I hope to use it to set up optimal bivariate embeddings but also to measure the strength of the relationship between the time series mutual2-function(datin,lmax) { library(KernSmooth) lmax-lmax+1 lhplogp-numeric(100) rhplogp-numeric(100) mut-numeric(lmax) jointplogp-matrix(0,nrow=100,ncol=100) lh-as.vector(datin[,1]) rh-as.vector(datin[,2]) rhemb-embed(rh,lmax) lhc-lh[1:length(rhemb[,1])] for (i in 1:lmax) { rhc-rhemb[,i] kd-bkde2D(cbind(lhc,rhc),bandwidth=c(dpik(lhc),dpik(rhc)),gridsize=c(100,10 0),truncate=T) #2d kernel density estimate in 2 dimensions) kdmat-as.matrix(kd$fhat) for (j in 1:100){ p-sum(kdmat[j,]) lhplogp[j]-p*log(p) } lhplogp[is.nan(lhplogp)]-0 hlh- -1*sum(lhplogp) #entropy of left hemsisphere for (j in 1:100){ p-sum(kdmat[,j]) rhplogp[j]-p*log(p) rhplogp[is.nan(rhplogp)]-0 #entropy of right hemisphere } hrh- -1*sum(rhplogp) for (j in 1:100){ for (k in 1:100) { #finding joint probability p-kdmat[j,k] jointplogp[j,k]-p*log(p) } } jointplogp[is.nan(jointplogp)]-0 #sum of joint probabilities hjoint-sum(jointplogp)*-1 mut[i]-hlh+hrh-hjoint #classic defn of mutual information maint-paste(MI by Kernel Density is ,as.character(mut[i])) rhlab-paste(rh lag ,as.character(i)) xlabl-lh contour(kd$x1,kd$x2,kd$fhat,xlab=xlabl,ylab=rhlab,main=maint) #dammit not producing realistic numbers } return(mut) } Thanks Tim Parkin __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] argv[0] --- again
thank you, duncan. yikes. how about people on sane (sorry, mean linux or unix) systems... ;-). regards, /iaw On 4/2/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 4/2/2006 9:34 PM, ivo welch wrote: dear R group: I have the probably fairly common problem that I would like to have one code.R file do different things if it is invoked from a symbolic link, which should be easy to uncover. $ ln -s code.R code-0.R $ ln -s code.R code-1.R $ R CMD BATCH code-1.R what needs to be in code-1.R to put code-1.r into a character vector? help appreciated. regards, /ivo welch PS :I read the past R-help posts on the subject, but apparently the older suggested solutions no longer work. (commandArgs() is not the answer, either.) And I did also not see it under the FAQ in the R programming section...and may I suggest this for the faq? I think the answer to this is platform dependent. In Windows, the answer is: you can't. The command line gets eaten by Rcmd.exe and isn't passed to R. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] R News, volume 6, issue 1 is now available
Hi The March 2006 issue of R News is now available on CRAN under the Documentation/Newsletter link. Paul (on behalf of the editorial board) -- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 [EMAIL PROTECTED] http://www.stat.auckland.ac.nz/~paul/ ___ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-announce __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] argv[0] --- again
On 4/2/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 4/2/2006 9:34 PM, ivo welch wrote: dear R group: I have the probably fairly common problem that I would like to have one code.R file do different things if it is invoked from a symbolic link, which should be easy to uncover. $ ln -s code.R code-0.R $ ln -s code.R code-1.R $ R CMD BATCH code-1.R what needs to be in code-1.R to put code-1.r into a character vector? help appreciated. regards, /ivo welch PS :I read the past R-help posts on the subject, but apparently the older suggested solutions no longer work. (commandArgs() is not the answer, either.) And I did also not see it under the FAQ in the R programming section...and may I suggest this for the faq? I think the answer to this is platform dependent. In Windows, the answer is: you can't. The command line gets eaten by Rcmd.exe and isn't passed to R. But you can still get it from the system. On XP Pro (maybe other Windows systems too?) place this in a.r out - system(wmic /output:stdout process, intern = TRUE) out - sapply(out, function(x) substr(x, 1, nchar(x)-1)) print(strsplit(grep(rcmd.exe.*batch, tolower(out), value = TRUE), *)[[1]][4]) and then at the command line type: Rcmd BATCH a.r and it will print out a.r __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] head function
hi all can anyone tell me what is head() function in r. what is it's utility? thanks in advance - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] (no subject)
Would greatly appreciate some help. During R installation, we are getting the following error message: '-lX11 is not found...' when doing gcc compile. The machine is an Opteron 64. I did some looking around and found similar problems in which the advise was: a. make sure SDK is installed b. another had to modify the variable PKG_CONFIG_PATH Does anyone have some suggestions? Thanks, David Ziger Synopsys Austin, TX [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] head function
The functions 'page()', 'head()' and 'tail()' let you look at a dataframe or array without actually opening the file. They are equivalent to 'less', 'more' and 'tail' in UNIX. Hope it helps, Augusto -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of stat stat Sent: Monday, 3 April 2006 2:37 PM To: r-help@stat.math.ethz.ch Subject: [R] head function hi all can anyone tell me what is head() function in r. what is it's utility? thanks in advance - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] head function
On Mon, 3 Apr 2006, stat stat wrote: hi all can anyone tell me what is head() function in r. what is it's utility? You get to see the head (or beginning section) of a vector, data frame or whatever, which gives you a bit of an idea what it looks like. It is an idea which comes from the unix operating system commands head and tail which were particularly useful in examining files in the days before gui editors and such fancy new-fangled things. David Scott _ David Scott Department of Statistics, Tamaki Campus The University of Auckland, PB 92019 AucklandNEW ZEALAND Phone: +64 9 373 7599 ext 86830 Fax: +64 9 373 7000 Email: [EMAIL PROTECTED] Graduate Officer, Department of Statistics ASC/NZSA 2006: Statistical Connections The joint conference of the Statistical Society of Australia Inc. and the New Zealand Statistical Association, July 3--6, 2006 in Auckland. Go to: http://www.statsnz2006.com/ __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html