Re: [R] rgl device on web

2011-10-21 Thread Ben qant
Thanks Duncan! I wish I had the time to work on something like that, but I have to stay focused on research. Thanks again for your extensive help! Have a good weekend everyone! Ben On Fri, Oct 21, 2011 at 4:24 PM, Duncan Murdoch wrote: > On 11-10-21 3:38 PM, Ben qant wrote: > &g

[R] rgl device on web

2011-10-21 Thread Ben qant
Hello, I'm looking for help putting an interactive rgl package 3d device on the web so that it maintains full functionality. Where should I start? Is it possible? Is there an example I can see? (Note: I'm also looking at putting other normal plots on the web.) I'd like to stay within R as much as

[R] windows limits

2011-10-21 Thread Ben qant
Hello, Using the rgl package, I can set the device window to any dimension (that I have tested): par3d(windowRect=c(1,1,700,700)) With windows I can't get the window to span from the top to the bottom of the monitor. In the following, no matter how large the ypinch value gets it stops, leaving ab

Re: [R] high and lowest with names

2011-10-13 Thread Ben qant
ot[,2] ]) Thanks David! Ben On Thu, Oct 13, 2011 at 9:48 AM, David Winsemius wrote: > > On Oct 13, 2011, at 10:42 AM, Ben qant wrote: > > Here is a more R'sh solution (speed unknown). >> > > Really? The intermediate, potentially large, objects seem to be > prolif

Re: [R] high and lowest with names

2011-10-13 Thread Ben qant
t;13" "15" "20" "28" [2,] "y" "v" "z" "z" "y" "w" "x" "v" "v" "w" "x" [3,] "a" "d" "e" "a" "c"

Re: [R] Tinn-R change editor background color

2011-10-12 Thread Ben qant
Never mind: option > color preference Sorry...overlooked that 10 times I guess. regards On Wed, Oct 12, 2011 at 12:54 PM, Ben qant wrote: > Hello, > > Does anyone know how to change the Tinn-R editor background color? White is > rough on the eyes... > > Thanks, > Ben

[R] Tinn-R change editor background color

2011-10-12 Thread Ben qant
Hello, Does anyone know how to change the Tinn-R editor background color? White is rough on the eyes... Thanks, Ben [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE d

Re: [R] high and lowest with names

2011-10-12 Thread Ben qant
> -- Bert > > > > > > On Tue, Oct 11, 2011 at 3:06 PM, Carlos Ortega > > wrote: > > > >> Hi, > >> > >> With this code you can find row and col names for the largest value > >> applied > >> to your example: > >> &

[R] high and lowest with names

2011-10-11 Thread Ben qant
Hello, I'm looking to get the values, row names and column names of the largest and smallest values in a matrix. Example (except is does not include the names): > x <- swiss$Education[1:25] > dat = matrix(x,5,5) > colnames(dat) = c('a','b','c','d','c') > rownames(dat) = c('z','y','x','w','v') >

[R] apply for each value

2011-10-11 Thread Ben qant
Hello, There has to be a more R'ish way to do this. I have two matrices, one has the values I want, but I want to NA some of them. The other matrix has binary values that tell me if I want to NA the values in the other matrix. I produce a third matrix based on this. I've also tried apply() passing

Re: [R] axes3d/bbox3d - axis values not fixed

2011-10-09 Thread Ben qant
Excellent! Thank you! Ben On Sat, Oct 8, 2011 at 3:36 PM, Duncan Murdoch wrote: > On 11-10-08 11:04 AM, Ben qant wrote: > >> Thank you! >> >> Sorry, I have a couple more questions: >> 1) How to I turn off the box shading completely? I figured out how to >> li

Re: [R] axes3d/bbox3d - axis values not fixed

2011-10-08 Thread Ben qant
27;z', axes=F) bbox3d(xat=c(5, 6), xlab=c("a", "b"), yat=c(2,4,6), zunit=10, col=c("white","black")) Thank you for your help! Ben On Sat, Oct 8, 2011 at 5:09 AM, Duncan Murdoch wrote: > On 11-10-07 2:32 PM, Ben qant wrote: > > Hello, > >

[R] axes3d/bbox3d - axis values not fixed

2011-10-07 Thread Ben qant
Hello, I'm using the rgl package and plotting a plot with it. I'd like to have all the axes values auto-hide, but I want to plot a series of characters instead of the values of the measurement for 2 of the axes. So in the end I will have one axis (z actually) behave per normal (auto-hide) and I'd

Re: [R] counts in quantiles in and from a matrix

2011-10-06 Thread Ben qant
q[2])) >} > > t(apply(m, 1, f)) > > HTH, > Dennis > > On Wed, Oct 5, 2011 at 8:11 PM, Ben qant wrote: > > Hello, > > > > I'm trying to get the count of values in each row that are above and > below > > quantile thresholds. Thanks! > >

[R] counts in quantiles in and from a matrix

2011-10-05 Thread Ben qant
Hello, I'm trying to get the count of values in each row that are above and below quantile thresholds. Thanks! Example: > x = matrix(1:30,5,6) > x [,1] [,2] [,3] [,4] [,5] [,6] [1,]16 11 16 21 26 [2,]27 12 17 22 27 [3,]38 13 18 23 28 [4,]4

[R] rm.outlier produces a list

2011-09-29 Thread Ben qant
Hello, Why does rm.outlier produce a list for me? I know its something about my data because I can't make a mock up that reproduces the issue. Any ideas? My data goes in as a matrix and comes out as a list: > class(dat) [1] "matrix" > dat = rm.outlier(dat) > class(dat) [1] "list" > Thanks, Ben

[R] removing outliers in non-normal distributions

2011-09-28 Thread Ben qant
Hello, I'm seeking ideas on how to remove outliers from a non-normal distribution predictor variable. We wish to reset points deemed outliers to a truncated value that is less extreme. (I've seen many posts requesting outlier removal systems. It seems like most of the replies center around "why do

Re: [R] remove NaN from element in a vector in a list

2011-09-27 Thread Ben qant
chael Weylandt < > michael.weyla...@gmail.com> wrote: > >> Try this: >> >> alply(mt, 1, function(x) as.numeric(na.omit(x))) >> >> The as.numeric() addition may be necessary to strip the extra attributes >> na.omit() wants to add. >> >> Michael >&

[R] remove NaN from element in a vector in a list

2011-09-27 Thread Ben qant
Hello, What is the best way to turn a matrix into a list removing NaN's? I'm new to R... Start: > mt = matrix(c(1,4,NaN,5,3,6),2,3) > mt [,1] [,2] [,3] [1,]1 NaN3 [2,]456 Desired result: > lst [[1]] [1] 1 3 [[2]] [1] 4 5 6 Thanks! Ben [[alternative HTML v

Re: [R] R.oo: do work on data member at construction

2011-09-22 Thread Ben qant
quot;, function(this, ...) { z <- this$.z; if (is.null(z)) { x <- this$.x; y <- this$.y; z <- paste(x, y); this$.z <- z; } z; }) However, you then have to make sure to reset z (this$.z <- NULL) whenever .x or .y is changed. /Henrik On Thu, Sep 22, 2011 at 10:18

[R] R.oo: do work on data member at construction

2011-09-22 Thread Ben qant
Hello, I'd like to 'do work' on data members upon construction (i.e. without implementing it in a get method). Is this the best way to create data member 'z' upon construction? I'm thinking if .z=paste(x,y) below gets more complex I'll run into issues. setConstructorS3("MyClass", function(x=NA,y=

Re: [R] rJython matrix message

2011-09-14 Thread Ben qant
This fixed it: paste(errs, collapse="\\n") Since that fixed it, I did not try anything else. Thanks again, Ben On Wed, Sep 14, 2011 at 10:04 AM, Steve Lianoglou < mailinglist.honey...@gmail.com> wrote: > Hi, > > On Wed, Sep 14, 2011 at 12:01 PM, Ben qant wrote: >

Re: [R] rJython matrix message

2011-09-14 Thread Ben qant
That fixed it!! Thank you very much! I should have thought of that. Thanks again, Ben On Wed, Sep 14, 2011 at 9:57 AM, Steve Lianoglou < mailinglist.honey...@gmail.com> wrote: > Hi, > > On Wed, Sep 14, 2011 at 11:44 AM, Ben qant wrote: > > Hello, > > > > I&#x

[R] rJython matrix message

2011-09-14 Thread Ben qant
Hello, I've posted something similar under a different subject and never received a solution. Trying again with (hopefully) a better description. Objective: Send a matrix of string data in an email message. The message must have authentication and be sent via an R script. I'm almost there! Here

Re: [R] DBS to R

2011-09-10 Thread Ben qant
ntity of > the program > would definitely help in reverse-engineering the format or finding a way > to convert it. > > In your example, are you really getting "XX" for all entries, or are you > obfuscating the data? > > Sarah > > On Sat, Sep 10, 2011 at 7:54 PM,

Re: [R] DBS to R

2011-09-10 Thread Ben qant
"" "" "" [589] "" "" "" "" "" "" [595] ""

[R] DBS to R

2011-09-10 Thread Ben qant
Hello, I have a bunch of data files all with "dbs" file extensions. They are generated via a SQL query from another program and source. Does anyone know (or have ideas) how to get the data from a dbs file type into R (or into some other format that can imported to R)? I've searched online for 4 ho

Re: [R] previous monday date

2011-09-02 Thread Ben qant
i; + } + } + d + } > pm(Sys.Date()) [1] "2011-08-29" On Fri, Sep 2, 2011 at 9:59 AM, Marc Schwartz wrote: > On Sep 2, 2011, at 10:35 AM, Ben qant wrote: > > > Hello, > > > > I'm attempting to return the date (in form '%Y-%m-%d') of th

Re: [R] previous monday date

2011-09-02 Thread Ben qant
uot; On Fri, Sep 2, 2011 at 9:35 AM, Ben qant wrote: > Hello, > > I'm attempting to return the date (in form '%Y-%m-%d') of the Monday > previous to the current date. For example: since it is 2011-09-02 today, I > would expect 2011-08-29 to be the return value. &g

[R] previous monday date

2011-09-02 Thread Ben qant
Hello, I'm attempting to return the date (in form '%Y-%m-%d') of the Monday previous to the current date. For example: since it is 2011-09-02 today, I would expect 2011-08-29 to be the return value. I found the following in: http://www.mail-archive.com/r-help@r-project.org/msg144184.html Start q

Re: [R] character vector to text with returns

2011-08-30 Thread Ben qant
for your suggestion! Ben On Tue, Aug 30, 2011 at 11:24 AM, David Winsemius wrote: > > On Aug 30, 2011, at 1:09 PM, Ben qant wrote: > > Hello, >> >> (Sorry if this is a dup post...) >> >> I need to clarify, Henrique's suggestion worked great for getting

Re: [R] character vector to text with returns

2011-08-30 Thread Ben qant
t" ...and the above email sends fine with 'a test' as the msg body. Any ideas? PS - I received lots of suggestions. Thank you very much for your effort/input. Ben On Mon, Aug 29, 2011 at 6:01 PM, Henrique Dallazuanna wrote: > Try: > > paste(c("a", "b&qu

Re: [R] character vector to text with returns

2011-08-30 Thread Ben qant
ver.sendmail(fromaddr, toaddrs, msg.as_string())", "server.quit()") jython.exec(rJython,mail) # and here is the error I get. Error in ls(envir = envir, all.names = private) : invalid 'envir' argument Just in case someone asks, I can do this: y = "a test" ..

Re: [R] character vector to text with returns

2011-08-29 Thread Ben qant
ge. Any other ideas? Thanks, Ben On Mon, Aug 29, 2011 at 6:01 PM, Henrique Dallazuanna wrote: > Try: > > paste(c("a", "b", "c"), collapse = "\n") > > On Mon, Aug 29, 2011 at 8:56 PM, Ben qant wrote: > >> Hello, >> >>

[R] character vector to text with returns

2011-08-29 Thread Ben qant
Hello, Does anyone know how to convert this: > msg [1] "a" [2] "b" [3] "c" To: > msg "a b c" In other words, I need to convert a character vector to a single string with carriage returns for each row. Functionally, I'm attempting to send an email of a character vector in a way that is re

Re: [R] R.oo data members / inheritance

2011-08-29 Thread Ben qant
Correction. My solution didn't work either Didn't return the correct values. Can you post an example that takes three arguments? I'm working on how to do this now. thanks...sorry. I"m new to R and R.oo. Ben On Mon, Aug 29, 2011 at 8:35 AM, Ben qant wrote: > Henrik, &

Re: [R] R.oo data members / inheritance

2011-08-29 Thread Ben qant
Henrik, Your last suggestion did not work for me. It seems like it does not allow me to create a ClassB object with 3 arguments: > setConstructorS3("ClassA", function(A=15, x=NA) { + extend(Object(), "ClassA", +.size = A, +.x=x + ) + }) > setConstructorS3("ClassB", function(..., bData=

[R] R.oo inheritance with pass by reference

2011-08-26 Thread Ben qant
I thought I would post an example of using R.oo with inheritance and pass by reference for future searches. With PerMore I am inheriting Person. Then I am changing an object data memeber of an object of PerMore class using pass by reference ('mimiced' by R.oo) in an object of AgeMultiplier. I chang

[R] R.oo data members / inheritance

2011-08-26 Thread Ben qant
If someone is able, can you tell me if there is a better way to do this? More specifically, do I have to rewrite all of the data members stuff and extend stuff of parent class in the child class? See below. Thanks in advance! Example 1: setConstructorS3("ClassA", function(A,x) { if(missing(A))

Re: [R] R.oo modify an object inside another classes method

2011-08-24 Thread Ben qant
er_obj$age * 2; per_obj$age = this$.age_multiplied; }) Use example: p1 <- Person(67) am1 = AgeMultiplier() am1$doMultiply(p1) p1$age # 134 On Tue, Aug 23, 2011 at 8:22 AM, Ben qant wrote: > Can someone show me how to modify one (R.oo) class's object inside a

[R] R.oo modify an object inside another classes method

2011-08-23 Thread Ben qant
Can someone show me how to modify one (R.oo) class's object inside another (R.oo) class's method? Is that possible with the R.oo package? A quick example or reference to an example would be outstanding... Thanks, Ben [[alternative HTML version deleted]] _

[R] email with authentication

2011-08-22 Thread Ben qant
Hello, I'd like to send an email from R using Windows Outlook. The sendmailR package doesn't allow for authentication (usernames and passwords). Is there any other way to do this? From the Windows command line? Right now I am using a .bat file to send an email via a program called Blat. I'd like

[R] rank analysis - reinventing the wheel?

2011-08-21 Thread Ben qant
Hello, I have two data frames. One is my dependent variable and the other is my independent variable. For each row I'd like to split the independent variable into fractiles (25 or more) and calculate the average value of the dependent variable. Then I would like to plot the average of the averages

[R] 2 matrix scatter x [a lot]

2011-08-15 Thread Ben qant
Hello, I'm pretty new to R. Basically, how do I speed up the for loop below. Or better yet, get rid of the for loop all together. objective: plot two data sets column against column by index. These data sets have alot NA's. Some columns are all NA's. I need the plots to overlay. I don't like the

Re: [R] R.oo error upon construction

2011-08-08 Thread Ben qant
e)) { >throw("Argument 'age' is missing."); > } > > extend(Object(), "Person", >.name=name, >.age=age > ) > }) > > /Henrik > > On Tue, Aug 9, 2011 at 12:21 AM, Ben qant wrote: > > Hello, > > > > Usi

[R] R.oo error upon construction

2011-08-08 Thread Ben qant
Hello, Using the R.oo package, how do I throw an error if a field is not present when the user of the class creates the object? Using the example in the R.oo package: setConstructorS3("Person", function(name, age) { if (missing(name)) name <- NA; if (missing(age)) age <- NA; extend(Objec

[R] [?]apply functions or for loop

2011-08-05 Thread Ben qant
Hello, First time posting to this mail list. I'd like to use R in the most efficient way. I'm accomplishing what I want, but feel there is a more R'ish way to do it. Just learning R. *My goal: get ranks of value across rows with row names and column names intact.* I'm guessing one of the [?]app