Re: [R] how to modify the tickment of x-axis

2012-03-17 Thread R. Michael Weylandt
No, the axis can be ticked anywhere you wish: plot(1:20, xaxt = "n") axis(1, at = seq(1, 20, by = 2), label = paste(seq(1, 20, by = 2), "h")) Michael On Sat, Mar 17, 2012 at 11:00 PM, Jie Tang wrote: > I have found that  the dimension number of label must be equal with the > dimension of the pl

Re: [R] how to modify the tickment of x-axis

2012-03-17 Thread Jie Tang
I have found that the dimension number of label must be equal with the dimension of the plot data by your this method. if we have two data in every hour,it seems can not show the correct tickment? .plot(1:20, xaxt = "n") axis(1, at = 1:10, label = paste(1:10, "h", sep = "")) # Happy axis! 2012/

Re: [R] substituting own test statistics in a built-in function

2012-03-17 Thread Peter Ehlers
On 2012-03-15 19:43, Aparna Sampath wrote: Hi Sarah Goslee Thanking you for replying to my doubt. I downloaded the multtest package from CRAN and also went through the package specific PDF file, they have given a list of functions which includes the mt.transformV, mt.checkothers etc, that I am

[R] multivariate locfit regression

2012-03-17 Thread Soberon Velez, Alexandra Pilar
Dear memberships, I'm trying to estimate the following multivariate local regression model using the "locfit" package: BMI=m1(RCC)+m2(WCC) where (m1) and (m2) are unknown smooth functions. My problem is that once I get the regression done I cannot get the fitted values of each of this

Re: [R] How to Group Categorical data in R?

2012-03-17 Thread priyank
How about this --? ##Assumes you have read your data into data frame "Msg17" ## Capture unique values from data file's Column 3 Col3 <- unique(Msg17$V3) #Captures length of the unique value vector LCol3 <- length(Col3) ## Loop to sequentially select rows with the unique Col3 values for (i in 1:

[R] ctree() crossvalidation

2012-03-17 Thread Franziska Rupprecht
Dear all, I use the function ctree() from the party library to calculate classification tree models. I want to validate models by 10-fold cross validation and estimate mean and standard deviation of correct classification rates (CCR) from the10 resulting confusion matrices. So far I use the “write

Re: [R] memory, i am getting mad in reading climate data

2012-03-17 Thread Amen
Many Many thanks for your responses -- View this message in context: http://r.789695.n4.nabble.com/memory-i-am-getting-mad-in-reading-climate-data-tp4480671p4481296.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org m

Re: [R] Improving help in R

2012-03-17 Thread Hadley Wickham
> One difficulty in getting the help pages to look beautiful is that the > original input is so inconsistent, and package authors (naturally) get upset > when CRAN starts rejecting packages because of errors that used to be > ignored.  The current output is definitely a compromise aimed at making m

Re: [R] rtriang using ifelse statement

2012-03-17 Thread David Winsemius
On Mar 17, 2012, at 3:22 PM, Diann Prosser wrote: Thank you for that explanation and solution David. As a follow-up to ifelse working on vectors, earlier I tried to coerce (?correct term?) the matrix into a vector but I still received the same result. You can certainly "coerce" a matrix t

Re: [R] rtriang using ifelse statement

2012-03-17 Thread Peter Ehlers
Slight correction to David's answer. See inline below. On 2012-03-17 11:49, David Winsemius wrote: On Mar 17, 2012, at 2:36 PM, Diann Prosser wrote: Hi All, I want to draw samples (n=4) from one of 2 triangular distributions for each value in a matrix. I am using an ifelse statement to try

Re: [R] memory, i am getting mad in reading climate data

2012-03-17 Thread Roy Mendelssohn
Hi All: > Every system has limits. If you have lots of money, then invest in a > 64-bit system with 100GB of real memory and you probably won't hit its > limits for a while. Otherwise, look at taking incremental steps and > possibly determining if you can partition the data. You might > consid

Re: [R] setwd et chaines de caracteres

2012-03-17 Thread G See
R> tmp <- tempdir() R> dir.create(file.path(tmp, "a space")) R> setwd(file.path(tmp, "a space")) R> getwd() [1] "/private/var/folders/ss/9z_gwf2j5bbbrhnv67_gh770gp/T/Rtmpg1MLIT/a space" On Sat, Mar 17, 2012 at 8:08 AM, David Winsemius wrote: > > On Mar 17, 2012, at 3:43 AM, André Smolarz wro

Re: [R] memory, i am getting mad in reading climate data

2012-03-17 Thread jim holtman
Another suggestion is to start with a subset of the data file to see how much memory is required for your processing. One of the misconceptions is that "memory is free". People think that with virtual memory and other such tools, that there is no restriction on what you can do. Instead of starti

Re: [R] memory, i am getting mad in reading climate data

2012-03-17 Thread Uwe Ligges
On 17.03.2012 19:27, David Winsemius wrote: On Mar 17, 2012, at 10:33 AM, Amen wrote: I faced this problem when typing: temperature <- get.var.ncdf( ex.nc, 'Temperature' ) *unable to allocate a vector of size 2.8 GB* Read the R-Win-FAQ > By the way my computer memory is 4G and the ori

Re: [R] Fwd: how to modify the tickment of x-axis

2012-03-17 Thread John Kane
dput() is a way to print out your data in a covenient format for others to read it into an R session. It has nothing to do with graphing. You use the command dput(myfile) to output a data object or perhaps dput(head(myfile, 10) to output a subset of your file. Copy and paste into your email

Re: [R] rtriang using ifelse statement

2012-03-17 Thread Diann Prosser
Thank you for that explanation and solution David. As a follow-up to ifelse working on vectors, earlier I tried to coerce (?correct term?) the matrix into a vector but I still received the same result. Should the following work, or does as.vector not work that way, even though vect now prints as

Re: [R] how to pass 'raw' values with cfunction()?

2012-03-17 Thread Dan Kelley
I've figured this out, and am posting a solution below, in case it's of use to others. Thanks. ## test with raw library(inline) code <- ' unsigned char *bPtr = RAW(AS_RAW(b)); Rprintf("inside f(), b is 0X%02x\\n", *bPtr); return(R_NilValue);' f <- cfunction(sig=signature(b="raw"),

Re: [R] rtriang using ifelse statement

2012-03-17 Thread David Winsemius
On Mar 17, 2012, at 2:36 PM, Diann Prosser wrote: Hi All, I want to draw samples (n=4) from one of 2 triangular distributions for each value in a matrix. I am using an ifelse statement to try to define which distribution to draw from. From the output, I can see that the ifelse statement

[R] rtriang using ifelse statement

2012-03-17 Thread Diann Prosser
Hi All, I want to draw samples (n=4) from one of 2 triangular distributions for each value in a matrix. I am using an ifelse statement to try to define which distribution to draw from. >From the output, I can see that the ifelse statement is choosing the correct distribution, however, my n=4 si

Re: [R] Apt-get

2012-03-17 Thread beltrand
I don't know, see if this helps. http://askubuntu.com/questions/53146/how-do-i-get-add-apt-repository-to-work-through-a-proxy -- View this message in context: http://r.789695.n4.nabble.com/Apt-get-tp4453839p4480997.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] memory, i am getting mad in reading climate data

2012-03-17 Thread David Winsemius
On Mar 17, 2012, at 10:33 AM, Amen wrote: I faced this problem when typing: temperature <- get.var.ncdf( ex.nc, 'Temperature' ) *unable to allocate a vector of size 2.8 GB* Read the R-Win-FAQ By the way my computer memory is 4G and the original size of the file is 1.4G,netcdf file I

Re: [R] Fwd: how to modify the tickment of x-axis

2012-03-17 Thread David Winsemius
On Mar 17, 2012, at 10:17 AM, Jie Tang wrote: hi I plot a series of observation data every minutes in a day as the attachment below plot(wnd,type='l',lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY) In the figure, the x-axis tickment is the number of data How can I change it fore exam

Re: [R] how to pass 'raw' values with cfunction()?

2012-03-17 Thread Dan Kelley
Thanks. .Call is better. But how do I get the actual value of the byte (0F)? (Updated code below. I does not compile if I use as_RAW(*b), so I suppose that's not the method I should use.) ## test with raw library(inline) code <- 'Rprintf("inside f(), b is 0X%x (compare %X%x)\\n", AS_RAW(b),

Re: [R] how to pass 'raw' values with cfunction()?

2012-03-17 Thread Dirk Eddelbuettel
On 17 March 2012 at 14:34, Dan Kelley wrote: | I am having trouble handing "raw" data to a C function, using "cfunction", as demonstrated in the function and output pasted below. Can anyone suggest what I'm doing incorrectly? Thanks. Dan Kelley [Dalhousie University]. Don't use the .C conven

[R] how to pass 'raw' values with cfunction()?

2012-03-17 Thread Dan Kelley
I am having trouble handing "raw" data to a C function, using "cfunction", as demonstrated in the function and output pasted below. Can anyone suggest what I'm doing incorrectly? Thanks. Dan Kelley [Dalhousie University]. 1. TEST FILE library(inline) code <- 'Rprintf("inside f(), b is 0X%x\

[R] Logistic regression using package sem

2012-03-17 Thread Kino Aguilar
Hi! I constructed a model where most of the variables are linearly related to each other. However, the dependent variable is dichotomous, which means I should not try to fit a linear relationship between the other variables, which are continuos, and this variable. I'm wondering how I would have to

Re: [R] Storing output vector form a loop as a matrix

2012-03-17 Thread dlemas
Thanks for taking the time to post the solution to your loop to matrix dilemma. I had a similar problem and your post helped me quickly move through this challenge. Thanks again. -- View this message in context: http://r.789695.n4.nabble.com/Storing-output-vector-form-a-loop-as-a-matrix-tp827822

[R] -1e+34

2012-03-17 Thread Amen
I am getting theses values when I disply my ncdf file 1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 [227,] -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 [228,] -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 -1e+34 [229,] -1e+34 -1e+34 -1e+34 -1e+34

[R] Fwd: how to modify the tickment of x-axis

2012-03-17 Thread Jie Tang
hi I plot a series of observation data every minutes in a day as the attachment below plot(wnd,type='l',lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY) In the figure, the x-axis tickment is the number of data How can I change it fore example 1h 2h 3h 4h and so on ? someone has told me that

[R] memory, i am getting mad in reading climate data

2012-03-17 Thread Amen
I faced this problem when typing: temperature <- get.var.ncdf( ex.nc, 'Temperature' ) *unable to allocate a vector of size 2.8 GB* By the way my computer memory is 4G and the original size of the file is 1.4G,netcdf file I don't know what is the problem.Any suggestion please I tried also memor

Re: [R] Coalesce function in BBmisc, emoa, and microbenchmark packages

2012-03-17 Thread Paul Miller
Hi Michael, So the coalesce functions don't do what I thought they did. I'll just use ifelse() then unless anyone makes it clear I should do something different. Thanks, Paul __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/

Re: [R] how to modify the tickment of x-axis

2012-03-17 Thread Jie Tang
> I am plotting several lines in one figure by such codes. But it is strange > that > > only this first tickment of x-axis is shown. > > plot(winddata$v1,type='l', > lty=1,col='black',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY, xaxt = "n") > par(new=T) > plot(winddata$v2,type='l', > lty=1,col='blue',lwd=1

Re: [R] qtbase installation problems on MacOS

2012-03-17 Thread Prof Brian Ripley
Please ask Mac-specific questions on R-sig-mac and questions involving compilation on R-devel (see the posting guide). Setting your language to English would increase considerably the number of people who understand the error messages. On 17/03/2012 12:43, Mark Heckmann wrote: Hello R GUI e

Re: [R] how to modify the tickment of x-axis

2012-03-17 Thread Jeff Newmiller
You use dput to put your data into an email so we can know what your input is. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] how to modify the tickment of x-axis

2012-03-17 Thread R. Michael Weylandt
Did you look at the example I gave you when you asked this question 10 days ago? I'll repeat for completeness op <- par() par(ask = TRUE) plot(1:10) # Unhappy axis plot(1:10, xaxt = "n") axis(1, at = 1:10, label = paste(1:10, "h", sep = "")) # Happy axis! par(ask = op$ask) The (good) advice to u

Re: [R] how to modify the tickment of x-axis

2012-03-17 Thread Jie Tang
hi I plot a series of observation data every minutes in a day as the attachment below plot(wnd,type='l',lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY) In the figure, the x-axis tickment is the number of data How can I change it fore example 1h 2h 3h 4h and so on ? someone has told me that

[R] paste (CTRL + v) not working rgui

2012-03-17 Thread Tyler Rinker
R community, I feel almost embarrassed to ask this question as it is strange behavior. When I think there's a bug around R or a package I ask "Self it's not a bug what dumb thing are you doing?" I'm running version 2.14.2 (2012-02-29) on a Windows 7 machine using the standard rgui Ever since

Re: [R] Coalesce function in BBmisc, emoa, and microbenchmark packages

2012-03-17 Thread R. Michael Weylandt
I don't think any of these are doing what you want -- they just scan a list of arguments for the first non-null argument (with some small differences in implementation). They're more programming utilities than data analysis tools. It sounds like it's going to be easier to whip something up with ife

[R] fitting plane to 3dim set of data

2012-03-17 Thread phi771
Hello! I have a problem creating a fitting plane through my 3d-data set. here is a sample how my set looks like (x,y,z (with z increasing)): > dataset [,1] [,2] [,3] [1,] -1.3712 -3.1551 10 [2,] -1.2690 -3.0751 10 [3,] -1.1216 -2.9768 10 [4,] -0.9875 -2.898

Re: [R] Error in conditional execution "missing value where TRUE/FALSE needed"

2012-03-17 Thread R. Michael Weylandt
My guess is that you're not getting what you expect from operator precedence: note that 1:3 - 1 1:(3-1) #Not equal If that doesn't fix it, you can use options(error = recover) to find the values of your logical conditions at the exact moment an error is thrown and see which one is NA but my money

Re: [R] Integrate inside function

2012-03-17 Thread R. Michael Weylandt
I don't believe you did anything wrong here, just that integrate() itself isn't (can't?) be vectorized. E.g., x <- integrate(function(x) x^2, 0, 2) y <- integrate(function(x) x^2, 0, c(2,3)) identical(x, y) # FALSE -- so there's a difference. # Take a look str(x) str(y) # It's just in the call

Re: [R] Reading then transposing from file

2012-03-17 Thread Berend Hasselman
On 17-03-2012, at 10:27, diond wrote: > Hi, > > I'm an R beginner and I'm struggling with what should be a rudimentary task. > > My data is along these lines: > > ID name1 name2 name3 name4 > Class 0 1 0 2 > Var1 A B C A > Var2 B C C A > Var3 C A B A > > etc. > > I'm using the following: >

[R] Coalesce function in BBmisc, emoa, and microbenchmark packages

2012-03-17 Thread Paul Miller
Hello All, Need to coalesce some columns using R. Looked online to see how this is done. One approach appears to be to use ifelse. Also uncovered a coalesce function in the BBmisc, emoa, and microbenchmark packages. Trouble is I can't seem to get it to work in any of these packages. Or perhaps

Re: [R] setwd et chaines de caracteres

2012-03-17 Thread David Winsemius
On Mar 17, 2012, at 3:43 AM, André Smolarz wrote: Bonjour, J'utilise R sous Mac OS X 10.6.8 et je souhaiterais savoir s'il est possible d'utiliser la commande "setwd()" avec un nom de réperoire contenant des espaces ? Si oui, comment faire ? I had no trouble using setwd() with a folder nam

Re: [R] Reading then transposing from file

2012-03-17 Thread David Winsemius
On Mar 17, 2012, at 5:27 AM, diond wrote: Hi, I'm an R beginner and I'm struggling with what should be a rudimentary task. My data is along these lines: ID name1 name2 name3 name4 Class 0 1 0 2 Var1 A B C A Var2 B C C A Var3 C A B A etc. I'm using the following: foo <- data.frame(t(rea

Re: [R] Faster way to implement this search?

2012-03-17 Thread Walter Anderson
On 03/17/2012 12:53 AM, Jeff Newmiller wrote: for(indx in 1:(length(bin.05)-3)) >>> if ((bin.05[indx] == test.pattern[1])&& (bin.05[indx+1] == >>> test.pattern[2])&& (bin.05[indx+2] == test.pattern[3])) >>> return.values$count.match.pattern[1] = >>> return.values$coun

Re: [R] Integrate inside function

2012-03-17 Thread Mauro Rossi
Dear David and Micheal, thanks for your suggestion. Vectorize does what I need. David you suggest me that I didn't built the function in a manner that would vectorize. Could you please explain me what's wrong? Thanks, Mauro > > On Mar 15, 2012, at 6:08 AM, Mauro Rossi wrote: > >> Dear R users,

[R] qtbase installation problems on MacOS

2012-03-17 Thread Mark Heckmann
Hello R GUI experts, I having some trouble installing qtbase. I installed a recent version of Qt and cmake. Unfortunately I am a rookie when it comes to installation procedures. Below I attached the (shortened) terminal output. I erased some parts that reported no failures. I am especially suspic

[R] pie R ^ 2 = Area of Circle.

2012-03-17 Thread Gerald Lindsly
Of course, perfection has no end. Why did you think pie was irrational? Didn't make sense? True Oval fits Elliptical patterns. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www

[R] Error in conditional execution "missing value where TRUE/FALSE needed"

2012-03-17 Thread Dong-Joon Lim
Hello R friends, I've got error message as follows; > > n<-0 > roc<-array(0,c(ti-1,1)) > avgroc<-0 > > for(i in 1:ti-1){ + if(orientation=="in"){ + if(eff_p1[i,1,i]==1 && eff_p1[i,1,ti-1]<1 && ed[i,1]>d[i,1]){ + roc[i,1]<-(1/eff_p1[i,1,ti-1])^(1/(ed[i,1]-d[i,1])) + n<-n+1 + } + }

Re: [R] Bold font in "paste" function

2012-03-17 Thread M. Lell
the display of colors on the command line is not in teh scope of R but depends on the terminal you're using. If you're using Linux and a bash terminal, you can try to print control characters for colors like described in Arch Wiki: https://wiki.archlinux.org/index.php/Color_Bash_Prompt#List_of_colo

[R] Reading then transposing from file

2012-03-17 Thread diond
Hi, I'm an R beginner and I'm struggling with what should be a rudimentary task. My data is along these lines: ID name1 name2 name3 name4 Class 0 1 0 2 Var1 A B C A Var2 B C C A Var3 C A B A etc. I'm using the following: foo <- data.frame(t(read.table("file", header=FALSE))) but of course no

Re: [R] Basic Quantmod help needed

2012-03-17 Thread suckerpunch
It is a "ts" object. Thanks for the suggestion I'll try it out. -- View this message in context: http://r.789695.n4.nabble.com/Basic-Quantmod-help-needed-tp4479513p4480190.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-proje

[R] setwd et chaines de caracteres

2012-03-17 Thread André Smolarz
Bonjour, J'utilise R sous Mac OS X 10.6.8 et je souhaiterais savoir s'il est possible d'utiliser la commande "setwd()" avec un nom de réperoire contenant des espaces ? Si oui, comment faire ? Merci par avance A. Smolarz [[alternative HTML version deleted]]

[R] This is interesting read,

2012-03-17 Thread Gerald Lindsly
But so much confusion. Please consider using another language for your statistics problem. C++ is much more natural for expressing object-orientation. Most statistics have shapes in hyperspace that have already been analyzed to the Nth degree. __ R-he

Re: [R] where I can find more color names or color definition?

2012-03-17 Thread De-Jian Zhao
RColorBrewer {RColorBrewer} Creates nice looking color palettes especially for thematic maps On 2012-3-14 22:55, Jie Tang wrote: hi everyone . Now I want to draw several lines in one frame.And it seems needs more colors except for blue red,black .Where can i found these color name or define s

Re: [R] how to call functions with same name but in different package?

2012-03-17 Thread De-Jian Zhao
Much better! Thanks. On 2012-3-17 18:02, Prof Brian Ripley wrote: On 17/03/2012 09:34, De-Jian Zhao wrote: Rename the functions after loading the library. library("wavelets") dwt.wavelets <- dwt library("waveslim") dwt.waveslim <- dwt Then use dwt.wavelets and dwt.waveslim instead. Please,

Re: [R] how to call functions with same name but in different package?

2012-03-17 Thread Prof Brian Ripley
On 17/03/2012 09:34, De-Jian Zhao wrote: Rename the functions after loading the library. library("wavelets") dwt.wavelets <- dwt library("waveslim") dwt.waveslim <- dwt Then use dwt.wavelets and dwt.waveslim instead. Please, not necessary! Use wavelets::dwt or waveslim::dwt to distinguish th

Re: [R] how to call functions with same name but in different package?

2012-03-17 Thread De-Jian Zhao
Rename the functions after loading the library. library("wavelets") dwt.wavelets <- dwt library("waveslim") dwt.waveslim <- dwt Then use dwt.wavelets and dwt.waveslim instead. On 2012-3-17 17:03, Jie Tang wrote: hi everyone . I am trying to use some packages but there are some functions have

Re: [R] plot only non-zero values

2012-03-17 Thread Joshua Wiley
What about just setting them to missing and plotting? md <- yourdata md[md==0] <- NA My other idea depending how you want the plot to look would be to try something where 0 values get a blank colour or null plotting value On Mar 16, 2012, at 22:53, Noah Silverman wrote: > Hi, > > i have som

[R] how to call functions with same name but in different package?

2012-03-17 Thread Jie Tang
hi everyone . I am trying to use some packages but there are some functions have the same name in different package. for example dwt function both in packages wavelets and waveslim dwt(X, filter="la8", n.levels, boundary="periodic") How can I avoid mixing them up ? -- TANG Jie Email: totang

Re: [R] How to start R in maximized size???

2012-03-17 Thread kingsly
I think what ever I say applicable to window (operating system).  Start "R", In "Rgui" menu, click open "edit", you will find "GUI preference", clik open it. You will find "Rgui configuration editor". According to  ur wish, change the columns to around "90" (it is a small exercise).  Then