[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

[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

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 murdoch.dun...@gmail.comwrote: On 11-10-21 3:38 PM, Ben qant

Re: [R] high and lowest with names

2011-10-13 Thread Ben qant
z y x v z w w z y [3,] e d e a c c e a b b enjoy ben On Wed, Oct 12, 2011 at 11:47 AM, Ben qant ccqu...@gmail.com wrote: Hello, This is my solution. This is pretty fast (tested with a larger data set)! If you have a more elegant way to do it (of similar speed), please reply

Re: [R] high and lowest with names

2011-10-13 Thread Ben qant
, 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 proliferating. Courtesy of Mark Leeds (I modified it a bit to generalize it for a cnt input and get min and max). Again, getting cnt highest

Re: [R] high and lowest with names

2011-10-12 Thread Ben qant
inmediate how to get the same for the smallest and build a function to calculate everything and return a list. Regards, Carlos Ortega www.qualityexcellence.es 2011/10/11 Ben qant ccqu...@gmail.com Hello, I'm looking to get the values, row names and column names

[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

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 ccqu...@gmail.com wrote: Hello, Does anyone know how to change the Tinn-R editor background color? White is rough on the eyes... Thanks, Ben

[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()

[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') dat

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 murdoch.dun...@gmail.comwrote: 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 lighten it up to a grey

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

2011-10-08 Thread Ben qant
, col=c(white,black)) Thank you for your help! Ben On Sat, Oct 8, 2011 at 5:09 AM, Duncan Murdoch murdoch.dun...@gmail.comwrote: On 11-10-07 2:32 PM, Ben qant wrote: 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

[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
, Dennis On Wed, Oct 5, 2011 at 8:11 PM, Ben qant ccqu...@gmail.com wrote: 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

[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

[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

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

2011-09-27 Thread Ben qant
: 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 On Tue, Sep 27, 2011 at 4:02 PM, Ben qant ccqu...@gmail.com wrote: Hello, What is the best way to turn a matrix

[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,

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

2011-09-22 Thread Ben qant
is changed. /Henrik On Thu, Sep 22, 2011 at 10:18 AM, Henrik Bengtsson h...@biostat.ucsf.eduwrote: On Thu, Sep 22, 2011 at 9:06 AM, Ben qant ccqu...@gmail.com wrote: 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

[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!

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 ccqu...@gmail.com wrote: Hello, I've posted something similar

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 ccqu...@gmail.com wrote: That fixed

[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

Re: [R] DBS to R

2011-09-10 Thread Ben qant
with dbs files, but the foreign package might be able to help you out. Michael On Sat, Sep 10, 2011 at 2:44 PM, Ben qant ccqu...@gmail.com wrote: 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

Re: [R] DBS to R

2011-09-10 Thread Ben qant
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, Ben qant ccqu...@gmail.com wrote: Recap: trying to get a 'dbs' extension file

[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

Re: [R] previous monday date

2011-09-02 Thread Ben qant
I didn't sort out the issue in my email below but here is a (not very R'ish) solution: pm = function(x) { + for(i in 1:7){ + if(format(as.Date(Sys.Date()-i),'%w') == 1){ + d = Sys.Date() - i; + } + } + d + } pm(Sys.Date()) [1] 2011-08-29 On Fri, Sep 2, 2011 at 9:35 AM, Ben

Re: [R] previous monday date

2011-09-02 Thread Ben qant
+ } pm(Sys.Date()) [1] 2011-08-29 On Fri, Sep 2, 2011 at 9:59 AM, Marc Schwartz marc_schwa...@me.com 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 the Monday previous to the current date. For example: since

Re: [R] character vector to text with returns

2011-08-30 Thread Ben qant
[4],''),sep=\n)) y cat(y,\n) -- Bert On Mon, Aug 29, 2011 at 6:59 PM, Ben qant ccqu...@gmail.com wrote: Unfortunately that didn't work. I just says the text is an invalid argument. I also tried saving it in a variable name and passed that in, but that didn't work. I get: Error

Re: [R] character vector to text with returns

2011-08-30 Thread Ben qant
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 www...@gmail.comwrote: Try: paste(c(a, b, c), collapse = \n) On Mon, Aug 29, 2011 at 8:56 PM, Ben qant ccqu

Re: [R] character vector to text with returns

2011-08-30 Thread Ben qant
! Ben On Tue, Aug 30, 2011 at 11:24 AM, David Winsemius dwinsem...@comcast.netwrote: 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 the text that I needed via cat(), but I haven't

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=NA) { +

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. Im new to R and R.oo. Ben On Mon, Aug 29, 2011 at 8:35 AM, Ben qant ccqu...@gmail.com wrote: Henrik, Your

[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 readable in

Re: [R] character vector to text with returns

2011-08-29 Thread Ben qant
? Thanks, Ben On Mon, Aug 29, 2011 at 6:01 PM, Henrique Dallazuanna www...@gmail.comwrote: Try: paste(c(a, b, c), collapse = \n) On Mon, Aug 29, 2011 at 8:56 PM, Ben qant ccqu...@gmail.com wrote: Hello, Does anyone know how to convert this: msg [1] a [2] b [3] c To: msg

[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) {

[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

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

2011-08-24 Thread Ben qant
AM, Ben qant ccqu...@gmail.com wrote: 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

[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

[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

[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

[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;

Re: [R] R.oo error upon construction

2011-08-08 Thread Ben qant
=name, .age=age ) }) /Henrik On Tue, Aug 9, 2011 at 12:21 AM, Ben qant ccqu...@gmail.com wrote: 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

[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