[R] RQuantLib Question

2010-03-13 Thread GULATI, BRIJESH (Global Markets FFO NY)
Hi: I am not able to find a function that would calculate bond duration, convexity and other sensitivities. If RQuantLib does not have it, please recommend some other library that I can use. Rgds, Brijesh -- This

[R] [R-pkgs] ggplot2: version 0.8.7

2010-03-13 Thread Hadley Wickham
ggplot2 ggplot2 is a plotting system for R, based on the grammar of graphics, which tries to take the good parts of base and lattice graphics and avoid bad parts. It takes care of many of the fiddly details that make plotting a hassle

[R] R/Finance 2010

2010-03-13 Thread Dale Rosenthal
R/Finance 2010: Applied Finance with R April 16 17, Chicago, IL, US www.RinFinance.com http://www.RinFinance.com The second annual R/Finance conference for applied finance using R, the premier free software system for statistical computation and graphics, will be held this spring in Chicago,

Re: [R] help about solving two equations

2010-03-13 Thread Berend Hasselman
Ravi Varadhan wrote: require(BB) fn - function(x, s){ f - rep(NA, length(x)) f[1] - digamma(x[1]) - digamma(x[1]+x[2]) - s[1] f[2] - digamma(x[2]) - digamma(x[1]+x[2]) - s[2] f } nr - 10 smat - matrix(runif(2*nr, -3, -1), nr, 2) soln - matrix(NA, nr, 2) for (i in

Re: [R] Vertical subtraction in dataframes

2010-03-13 Thread nowfocus
It depends how you stored your missing values. If they are listed as NAs then mydataframe$calib - Count - is.na(stain)*Count or mydataframe$calib - Count*(1 - is.na(stain)) The trick is the boolean 'TRUE' equals 1 in numeric calculations. -- View this message in context:

Re: [R] Help on getting help from manuals

2010-03-13 Thread Jim Lemon
On 03/12/2010 08:41 PM, ManInMoon wrote: Hi, A number of people have suggested I read the manuals... Could someone help me by telling me where the primary start point is please? For example, I am interested in writing functions with variable number of arguments - where should I start to

[R] PGMM help - Strange Errors when Fitting Models

2010-03-13 Thread nowfocus
Hello, I've been trying to fit Arrellano-Bond model with pgmm but I am getting very strange errors. I've looked around and found no reference to them. I've specified the model in dozens of different ways, and each seems to give me a new kind of error. This leads me to believe this has to do

[R] Help needed: Split-split plot analysis

2010-03-13 Thread Safe Environment
Hello, I am very new to R but would like to use the software to analyse the attached data. The experiment followed a split-split plot design There were two blocks and the whole plot is CO2 with two levels. The sub-plot is soil temperature with three levels and the sub-sub plot is soil moisture

[R] A link in the R-project.org website is broken, who do I report this to ?

2010-03-13 Thread Tal Galili
Hi, The link in the sentence: We have started to collect information about local UseR Groupshttp://wiki.r-project.org/rwiki/doku.php?id=rugs:r_user_groups in the R Wiki http://wiki.r-project.org/. Has a broken link to: UseR Groupshttp://wiki.r-project.org/rwiki/doku.php?id=rugs:r_user_groups

Re: [R] Help on getting help from manuals

2010-03-13 Thread Ted Harding
On 13-Mar-10 08:59:43, Jim Lemon wrote: On 03/12/2010 08:41 PM, ManInMoon wrote: [...] [...] The terminology problem can often be solved on Jon Baron's search engine, as it searches full text, not just keywords. Run a few of the terms familiar to you into it, and you will find that the

Re: [R] RGtk2:::gdkColorToString throws an error

2010-03-13 Thread Michael Lawrence
Actually, the problem is more likely that RGtk2 is not built against GTK+ 2.12 on Windows. I assume you're using an up-to-date version of R. I'll ask Uwe about getting a newer version of GTK+. On Mon, Mar 8, 2010 at 7:29 PM, Wincent ronggui.hu...@gmail.com wrote: Dear Michael, thanks. I have

Re: [R] Form using R

2010-03-13 Thread Erich Neuwirth
You also could use the Excel addin RExcel (from rcom.univie.ac.at). You could use Excel forms to collect you data and the transfer mechanisms of RExcel to put your data into R. The web site has a video demonstrating how to yuse RExcel. On 3/12/2010 10:20 PM, Barry Rowlingson wrote: On Fri, Mar

Re: [R] testing parallelism of does-response curves using nls()

2010-03-13 Thread Eik Vettorazzi
Hi John, you may have a look at the drc-package (or look at the maintainers web site www.bioassay.dk) I think it does exactly what you want. HTH Eik array chip schrieb: Hi, I am trying to use F test or Chi-square test to test if 2 5-parameter (A, B, xmid, scal and H) logistic curves are

Re: [R] RGtk2:::gdkColorToString throws an error

2010-03-13 Thread Uwe Ligges
On 13.03.2010 14:00, Michael Lawrence wrote: Actually, the problem is more likely that RGtk2 is not built against GTK+ 2.12 on Windows. I assume you're using an up-to-date version of R. I'll ask Uwe about getting a newer version of GTK+. This actually is GTK+ 2.12.0. We can try to upgrade,

Re: [R] please, cant install rodbc into R-project

2010-03-13 Thread maysider
thank you for your quick response, I have openSUSE 11.2 basic installation. I really don't know what and how to install thank you m On 12 March 2010 14:49, Marc Schwartz-3 [via R] ml-node+1590531-70615818-185...@n4.nabble.com wrote: On Mar 12, 2010, at 12:58 AM, maysider wrote: I have

Re: [R] rmaxwell in C

2010-03-13 Thread 王杰彪
We have done it, thanks very much! 2010-03-13 Randel 发件人: Yihui Xie x...@yihui.name 发送时间: 2010-03-12 22:48 主 题: Re: [R] rmaxwell in C 收件人: 王杰彪 try...@163.com 抄 送: r-help r-help@r-project.org The manual R-exts, section 6.7.1 should help if you want to

Re: [R] Help on getting help from manuals

2010-03-13 Thread Uwe Ligges
On 13.03.2010 10:56, (Ted Harding) wrote: On 13-Mar-10 08:59:43, Jim Lemon wrote: On 03/12/2010 08:41 PM, ManInMoon wrote: [...] [...] The terminology problem can often be solved on Jon Baron's search engine, as it searches full text, not just keywords. Run a few of the terms familiar to

Re: [R] Robust estimation of variance components for a nested design

2010-03-13 Thread David Atkins
Sue-- Check out the heavy package on CRAN, which implements the robust mixed-effects models that Andy mentioned. The package is relatively new and is still being developed, but worth a look. cheers, Dave I believe Pinhiero et al published a paper in JCGS a few years back on the subject,

Re: [R] Error Running TinnR with R

2010-03-13 Thread teck-corp
Hi Keith, Thanks for your unswer. Unfortunately am not sure if I am understanding everything and things are still not running. 1) If I understand right this command can be created in the Rprofile.site file by using Tinn-R, R - configure - permanent .trPaths -

Re: [R] please, cant install rodbc into R-project

2010-03-13 Thread Marc Schwartz
I have not used SUSE, but it has a GUI based package management tool called YaST and a command line tool called Zypper. Based upon a Google search, it looks like you will need to use one of them to install the Software Development tool related packages, which are apparently and not

[R] format: from list to data frame

2010-03-13 Thread Javier
Dear users, Is anyone out there on a Saturday to answer this easy question? I have the yo object data in a list format: str(yo) num [1:259, 1:173] 16.3 NA NA NA NA ... - attr(*, dimnames)=List of 2 ..$ x: chr [1:259] 367319 367329 367309 367339 ... ..$ y: chr [1:173] 780175 780185

Re: [R] Form using R

2010-03-13 Thread Tal Galili
Hi Nilza, I think your solution should be to create a google spreadsheet and then read it. Here is an example code for reading a google spreadsheet: supplements.data.0 - read.csv(http://spreadsheets.google.com/pub?key=0Aqe2P9sYhZ2ndFRKaU1FaWVvOEJiV2NwZ0JHck12X1Eoutput=csv;) I used this trick

Re: [R] format: from list to data frame

2010-03-13 Thread David Winsemius
On Mar 13, 2010, at 11:46 AM, Javier wrote: Dear users, Is anyone out there on a Saturday to answer this easy question? I have the yo object data in a list format: str(yo) num [1:259, 1:173] 16.3 NA NA NA NA ... - attr(*, dimnames)=List of 2 ..$ x: chr [1:259] 367319 367329 367309

Re: [R] format: from list to data frame

2010-03-13 Thread Barry Rowlingson
On Sat, Mar 13, 2010 at 4:46 PM, Javier j.perez-barbe...@macaulay.ac.uk wrote: Dear users, Is anyone out there on a Saturday to answer this easy question? I have the yo object data in a list format: str(yo)  num [1:259, 1:173] 16.3 NA NA NA NA ...  - attr(*, dimnames)=List of 2  ..$ x:

Re: [R] format: from list to data frame

2010-03-13 Thread Marc Schwartz
On Mar 13, 2010, at 10:46 AM, Javier wrote: Dear users, Is anyone out there on a Saturday to answer this easy question? I have the yo object data in a list format: It is not a list, it is a matrix. The dimnames attribute is a list. str(yo) num [1:259, 1:173] 16.3 NA NA NA NA ...

[R] dmvnorm masked by emdbook

2010-03-13 Thread Daniel Murphy
I am using curve3d in the emdbook package to graph a gaussian copula density function generated via the copula package. Unfortunately, it appears that emdbook masks dmvnorm from the package mvtnorm in a way that prohibits copula from generating the gaussian copula. (Sounds very confusing!) For

[R] Problem building packages on windows: /cygdrive/c/Rtools/bin/cp: target `xf-))' is not a directory

2010-03-13 Thread michael watson (IAH-C)
Dear R-Help My OS is Windows CP, I'm not sure my sessionInfo() is relevant but here it is: R version 2.10.1 (2009-12-14) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252LC_MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C

Re: [R] dmvnorm masked by emdbook

2010-03-13 Thread David Winsemius
On Mar 13, 2010, at 12:01 PM, Daniel Murphy wrote: I am using curve3d in the emdbook package to graph a gaussian copula density function generated via the copula package. Unfortunately, it appears that emdbook masks dmvnorm from the package mvtnorm in a way that prohibits copula from

Re: [R] Problem building packages on windows: /cygdrive/c/Rtools/bin/cp: target `xf-))' is not a directory

2010-03-13 Thread Uwe Ligges
On 13.03.2010 18:15, michael watson (IAH-C) wrote: Dear R-Help My OS is Windows CP, I'm not sure my sessionInfo() is relevant but here it is: R version 2.10.1 (2009-12-14) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252

Re: [R] Problem building packages on windows: /cygdrive/c/Rtools/bin/cp: target `xf-))' is not a directory

2010-03-13 Thread michael watson (IAH-C)
This may be an indication of what is wrong - I do not have an environment variable R_LIBS Anyone can download the package, it's open source: http://bioinformatics.iah.ac.uk/tools/download I stripped it down to just the R, data and man directories and made a couple of minor code changes.

Re: [R] Error Running TinnR with R

2010-03-13 Thread teck-corp
Hi everybody, I figured my error out... one has to open Tinn-R as administrator by clicking with the right mouse on the Tinn-R icon. Then one can use R - Configure - Permanent without any problem. Thanks a lot to everybody for your great comments!!! Best Dennis -- View this message in

Re: [R] Problem building packages on windows: /cygdrive/c/Rtools/bin/cp: target `xf-))' is not a directory

2010-03-13 Thread Uwe Ligges
On 13.03.2010 18:34, michael watson (IAH-C) wrote: This may be an indication of what is wrong - I do not have an environment variable R_LIBS No, that's fine. Anyone can download the package, it's open source: http://bioinformatics.iah.ac.uk/tools/download I stripped it down to just the

Re: [R] dmvnorm masked by emdbook

2010-03-13 Thread Tobias Verbeke
Hi Dan, For this to work, the copula package should explicitly import dmvnorm from the mvtnorm package by including importFrom(mvtnorm, dmvnorm) in their NAMESPACE file. You can do the same thing and rebuild + reinstall the package to solve your problem quickly, but there might be some other

Re: [R] Form using R

2010-03-13 Thread Tal Galili
Hi Nilza, I just wrote a more detailed answer to your question in the following post: Google spreadsheets + google forms + R = Easily collecting and importing data for analysishttp://www.r-statistics.com/2010/03/google-spreadsheets-google-forms-r-easily-collecting-and-importing-data-for-analysis/

Re: [R] Problem building packages on windows: /cygdrive/c/Rtools/bin/cp: target `xf-))' is not a directory

2010-03-13 Thread michael watson (IAH-C)
Thanks Uwe For the record, if I have errors in my Rd, where can I find a summary? The below does indeed work, so I'll build the new package on Linux and then finish off the windows one here. R CMD INSTALL --build CORNA_1.2.tar.gz Thanks again Mick

Re: [R] Error in inherits(x, data.frame) : subscript out of bounds

2010-03-13 Thread Uwe Ligges
On 13.03.2010 17:25, kloyt...@mappi.helsinki.fi wrote: Lainaus Uwe Ligges lig...@statistik.tu-dortmund.de: On 05.03.2010 15:24, kloyt...@mappi.helsinki.fi wrote: Hi, I have a list p with different size dataframes and length of over 8000. I'm trying to calculate correlations between the

Re: [R] Problem building packages on windows: /cygdrive/c/Rtools/bin/cp: target `xf-))' is not a directory

2010-03-13 Thread Uwe Ligges
On 13.03.2010 19:14, michael watson (IAH-C) wrote: Thanks Uwe For the record, if I have errors in my Rd, where can I find a summary? The below does indeed work, so I'll build the new package on Linux and then finish off the windows one here. R CMD INSTALL --build CORNA_1.2.tar.gz Thanks

[R] Indexing a matrix within loops

2010-03-13 Thread Josh B
Hi, I was hoping someone could help me with the following problem. Consider this toy example. For the input dataset there are four individuals (rows indv.1 through indv.4), measured for two different variables (columns var.1 and var.2) at two different levels of a factor (column factor.level).

Re: [R] Indexing a matrix within loops

2010-03-13 Thread michael watson (IAH-C)
aggregate(x[,1:2], by=list(factor=x$factor.level), mean) From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Josh B [josh...@yahoo.com] Sent: 13 March 2010 18:50 To: R Help Subject: [R] Indexing a matrix within loops Hi, I was

Re: [R] Indexing a matrix within loops

2010-03-13 Thread Jorge Ivan Velez
Hi Josh, Here is one way: with(x, aggregate(x[,-3], list(factor.level), mean, na.rm = TRUE)) HTH, Jorge On Sat, Mar 13, 2010 at 1:50 PM, Josh B wrote: Hi, I was hoping someone could help me with the following problem. Consider this toy example. For the input dataset there are four

[R] What can I use instead of ks.test for the binomial distribution ?

2010-03-13 Thread Tal Galili
Hello all, A friend just showed me how ks.test fails to work with pbinom for small size. Example: x-rbinom(1,10,0.5) x2-rbinom(1,10,0.5) ks.test(x,pbinom,10,0.5) ks.test(x,pbinom,size = 10, prob= 0.5) ks.test(x,x2) The tests gives significant p values, while the x did come from binom

[R] Two questions, first about contingency tables, and second about table () and data.frame (), from a visually impaired user.

2010-03-13 Thread Faiz Rasool
Hi all, I want to make a contingency table in R. I want to tabulate two variables, one as the independent and second as the dependent variable. The IV has two categories, namely, birth complications, and no birth complications. The frequency of birth complication category is fifty, and the

Re: [R] What can I use instead of ks.test for the binomial distribution ?

2010-03-13 Thread David Winsemius
On Mar 13, 2010, at 2:34 PM, Tal Galili wrote: Hello all, A friend just showed me how ks.test fails to work with pbinom for small size. Example: x-rbinom(1,10,0.5) x2-rbinom(1,10,0.5) ks.test(x,pbinom,10,0.5) ks.test(x,pbinom,size = 10, prob= 0.5) ks.test(x,x2) The tests gives

Re: [R] What can I use instead of ks.test for the binomial distribution ?

2010-03-13 Thread Tal Galili
Thanks David, I apologize (I did search before posting, but only for ks.test and didn't came a cross references through my uncareful skimming) Thanks, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845

Re: [R] Help needed: Split-split plot analysis

2010-03-13 Thread RICHARD M. HEIBERGER
It looks like you need something like this. The data you attached didn't make it through the email system. ## you might need install.packages(HH) ## do this once library(HH) ## do this every time you start a new R session interaction2wt(y ~ Block + CO2 + temp + moisture) ## the rest is

Re: [R] unknown compression

2010-03-13 Thread Uwe Ligges
On 12.03.2010 21:34, R Heberto Ghezzo, Dr wrote: Hello, I am trying to modify some functions in an existing package. I can get a function by just typing the name in the console, but how can I get all the functions in a package? the ./R/ subdirectory has files xx.rdb and xx.rdx which I can

Re: [R] help about cluster package

2010-03-13 Thread Uwe Ligges
On 12.03.2010 05:39, Jie TANG wrote: hello,everyone. I tried to use cluster analysis package by reading the manual chapter 15 cluster package .But when I tried to use the function agnes,the R said :there is no function.Can you tell me which package I should load? Can anyone give me some

[R] Is this a bug (or a feature) in hist(x)$density ??

2010-03-13 Thread Tal Galili
Hi all, A friend send me a question on why does this: x-rpois(100,1) sum( hist(x)$density ) Gives out 2 I tried this: sum( hist(x, freq =T)$density ) It didn't help. Then he came back with the following insight: # with breaks b-c(0,0.9,1:8) sum(hist(x,breaks=b)$density) # Much more then 2

Re: [R] Two questions, first about contingency tables, and second about table () and data.frame (), from a visually impaired user.

2010-03-13 Thread Tal Galili
Oh, That's clearer now. You should use two equal vectors when using table. For example: a - c(a,b,a,b,a,b,a,b) b - c(1,1,1,1,2,2,2,2) table(a,b) also have a look at ?as.table and ?matrix Does that help ? Tal Contact

Re: [R] Is this a bug (or a feature) in hist(x)$density ??

2010-03-13 Thread David Winsemius
On Mar 13, 2010, at 3:39 PM, Tal Galili wrote: Hi all, A friend send me a question on why does this: x-rpois(100,1) sum( hist(x)$density ) Gives out 2 Yes. And... hist(x)$breaks [1] 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 I tried this: sum( hist(x, freq =T)$density ) It didn't help.

Re: [R] Is this a bug (or a feature) in hist(x)$density ??

2010-03-13 Thread Stephan Kolassa
Hi Tal, basically, by summing over the (pointwise) density, you are approximating the integral over the density (which should be around 1) - but to really do a rectangular approximation, you will of course need to multiply each function value by the width of the corresponding rectangle. I'd

Re: [R] Robust estimation of variance components for a nested design

2010-03-13 Thread dave fournier
If you mean using random effects which have a fat-tailed distribution this has been available in AD Model Builder's random effects package for some time now. The general idea is to start with a random effect assumed to be standard normal and then to transform it by the cumulative dist function

Re: [R] What can I use instead of ks.test for the binomial distr

2010-03-13 Thread Ted Harding
For testing whether x comes from a binomial distribution, I would suggest just using a straight chi-squared test. I'm not aware of a version of chisq.test() in R aimed at seeing whether data match a fitted binomial (or other specific) distribution, but it is easy to construct one;

[R] mcmc sampling and glmer

2010-03-13 Thread Marie-Agnes
Hi everybody, Trying to test for the effect of fixed factors in a generalized linear mixed model, I face the problem of mcmc not yet implemented with such models. I would like to know if there is any equivalent procedure to that applied on lme ( lmer followed with mcmc sampling and

[R] (no subject)

2010-03-13 Thread Jillian E Kozyra
Dear Colleagues, We are attempting to create trees using R with our Ruby on Rails application. However, we are running into a problem involving the creation of the graphic. We would like them to be in either jpg or png format so that users can save, but due to a lack of control over our sever we

Re: [R] Error in inherits(x, data.frame) : subscript out of bounds

2010-03-13 Thread kloytyno
Lainaus Uwe Ligges lig...@statistik.tu-dortmund.de: On 05.03.2010 15:24, kloyt...@mappi.helsinki.fi wrote: Hi, I have a list p with different size dataframes and length of over 8000. I'm trying to calculate correlations between the rows of dataframes of this list and columns of another

Re: [R] questions

2010-03-13 Thread amitava
plz reply in this thread... -- View this message in context: http://n4.nabble.com/questions-tp1584771p1591832.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Creating images without X11

2010-03-13 Thread Jillian E Kozyra
Dear Colleagues, We are attempting to create trees using R with our Ruby on Rails application. However, we are running into a problem involving the creation of the graphic. We would like them to be in either jpg or png format so that users can save, but due to a lack of control over our sever we

Re: [R] What can I use instead of ks.test for the binomial distr

2010-03-13 Thread Ted Harding
Sorry -- I made a complete mess of my first suggestion below: On 13-Mar-10 21:27:28, Ted Harding wrote: For testing whether x comes from a binomial distribution, I would suggest just using a straight chi-squared test. I'm not aware of a version of chisq.test() in R aimed at seeing whether

Re: [R] (no subject)

2010-03-13 Thread michael watson (IAH-C)
Use the GDD library From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Jillian E Kozyra [jill...@gmail.com] Sent: 13 March 2010 16:26 To: r-help@r-project.org Subject: [R] (no subject) Dear Colleagues, We are attempting to

Re: [R] Creating images without X11

2010-03-13 Thread michael watson (IAH-C)
library(GDD) Or install Xvfb on your server From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Jillian E Kozyra [jill...@gmail.com] Sent: 13 March 2010 16:27 To: r-help@r-project.org Subject: [R] Creating images without X11

Re: [R] Creating images without X11

2010-03-13 Thread Ted Harding
On 13-Mar-10 16:27:05, Jillian E Kozyra wrote: Dear Colleagues, We are attempting to create trees using R with our Ruby on Rails application. However, we are running into a problem involving the creation of the graphic. We would like them to be in either jpg or png format so that users can

Re: [R] Creating images without X11

2010-03-13 Thread Barry Rowlingson
On Sat, Mar 13, 2010 at 4:27 PM, Jillian E Kozyra jill...@gmail.com wrote: Dear Colleagues, We are attempting to create trees using R with our Ruby on Rails application. However, we are running into a problem involving the creation of the graphic. We would like them to be in either jpg or png

Re: [R] Is this a bug (or a feature) in hist(x)$density ??

2010-03-13 Thread Tal Galili
Thanks David and Stephan, David's reply was very helpful since I now realize how I made in my head the (wrong) assumption that the hist would automatically produce rectangular bars with the width of 1 (since the distribution is a discrete one). The call: hist(x)$breaks Helped to bring me back to

Re: [R] Two questions, first about contingency tables, and second about table () and data.frame (), from a visually impaired user.

2010-03-13 Thread Joshua Wiley
Dear Faiz, I believe that your basic issue is that you are trying to use frequencies directly. table() needs all the arguments to be of the same length, because it counts the frequencies from raw data. So for two variables, you need pairs of scores indicating whether there was a birth

Re: [R] Creating images without X11

2010-03-13 Thread Ted Harding
On 13-Mar-10 22:17:26, Barry Rowlingson wrote: On Sat, Mar 13, 2010 at 4:27 PM, Jillian E Kozyra jill...@gmail.com wrote: Dear Colleagues, We are attempting to create trees using R with our Ruby on Rails application. However, we are running into a problem involving the creation of the

[R] Making multiple columns to a single column

2010-03-13 Thread Hyo Lee
Hi guys, I have a very simple question. I'm trying to make multiple columns to a single column. For example, *ttx1* is a 46*72 matrix. so, I tried this. *d1=ttx1[,1] d2=ttx1[,2] ... d72=ttx1[,72]* now, d1, d2, ...,d72 become a 46*1 matrix. And then.. I tried.. *dd=rbind(d1, d2, ..., d72)*

Re: [R] Making multiple columns to a single column

2010-03-13 Thread Joshua Wiley
Hey Hyo, Rbind puts each object in a row, just use c(d1, d2, ... d72) to combine them all together. If you want it in a matrix matrix(c(d1,d2,...d72), ncol=1). Best, Josh On Sat, Mar 13, 2010 at 3:30 PM, Hyo Lee totem...@gmail.com wrote: Hi guys, I have a very simple question. I'm trying

Re: [R] Making multiple columns to a single column

2010-03-13 Thread Stephan Kolassa
Hi Hyo, how about as.vector(ttx1) or as.vector(t(ttx1))? HTH Stephan Hyo Lee schrieb: Hi guys, I have a very simple question. I'm trying to make multiple columns to a single column. For example, *ttx1* is a 46*72 matrix. so, I tried this. *d1=ttx1[,1] d2=ttx1[,2] ... d72=ttx1[,72]*

Re: [R] Making multiple columns to a single column

2010-03-13 Thread David Winsemius
On Mar 13, 2010, at 6:30 PM, Hyo Lee wrote: Hi guys, I have a very simple question. I'm trying to make multiple columns to a single column. For example, *ttx1* is a 46*72 matrix. so, I tried this. *d1=ttx1[,1] d2=ttx1[,2] ... d72=ttx1[,72]* now, d1, d2, ...,d72 become a 46*1 matrix. And

[R] nano syntax highlighting for R

2010-03-13 Thread Mike Miller
Nano is Free Software and a nice intro text editor. It also starts up very quickly and has good syntax highlighting functionality, so it makes a nice file viewer. The syntax highlighting is configured in the ~/.nanorc file. See the attached code and screenshot. I was looking for good nano

[R] code rows depending on the value of other rows in multilevel dataframe

2010-03-13 Thread Junqian Gordon Xu
I have a multilevel dataframe (df): ID Date Segment Slice Tract Lesion 1 CSPP005 12/4/2007 1 1 LCST 0 2 CSPP005 12/4/2007 1 1 LPC 2 3 CSPP005 12/4/2007 1 1 RPC 3 4 CSPP005 12/4/2007 1 1

Re: [R] code rows depending on the value of other rows in multilevel dataframe

2010-03-13 Thread jim holtman
It is not entirely clear what type of transformation you are trying to do. Can you provide some sample data and then show what you would expect the output to look like; make sure the data covers all the cases you want to transform. On Sat, Mar 13, 2010 at 8:54 PM, Junqian Gordon Xu

Re: [R] mcmc sampling and glmer

2010-03-13 Thread Ben Bolker
Marie-Agnes marie-agnes.coutellec at rennes.inra.fr writes: Trying to test for the effect of fixed factors in a generalized linear mixed model, I face the problem of mcmc not yet implemented with such models. I would like to know if there is any equivalent procedure to that applied on lme

Re: [R] code rows depending on the value of other rows in multilevel dataframe

2010-03-13 Thread Junqian Gordon Xu
Hi, In the example given below, I want to code the Lesion in the 7th row as 2 because the 2nd row has a Lesion value of 2. ID Date Segment Slice Tract Lesion 7 CSPP005 12/4/2007 1 1 Whole2 Otherwise (if there is no lesion value of 2 in row 1-6), I

[R] Why doesn't vec[-real.number] give an error or warning? Kids do the darndest things!

2010-03-13 Thread Bryan Hanson
Hi all... My students were conflating grepping for a value in a vector to get the index, and then removing it with [-index], for instance like this: set.seed(17) v - rnorm(20) s - v[-1.18] They were trying to remove the 12th value in v, which is -1.18 or so. But the result is, as documented in

Re: [R] code rows depending on the value of other rows in multilevel dataframe

2010-03-13 Thread Junqian Gordon Xu
merge(Whole,Where.Lesion2) gives the intersections (ID/Date/Segment/Slice, i.e. the first 4 columns), except that the merge function drops the original row.names in the dataframe Whole. Now, the question evolves to finding row.names of one data frame that matches any of the rows in another

[R] range and intersection

2010-03-13 Thread Adrian Johnson
Hi: I have a two large files (over 300K lines). file 1: NameX UK 199 UK 230 UK 139 .. UAE194 UAE 94 File 2: Name XY UK140 180 UK195240 UK304340 I want to select X of File 1 and search if it falls in range of X and Y of

Re: [R] code rows depending on the value of other rows in multilevel dataframe

2010-03-13 Thread jim holtman
Try this: x - read.table(textConnection( +ID Date Segment Slice Tract Lesion + CSPP005 12/4/2007 1 1 LCST 0 + CSPP005 12/4/2007 1 1 LPC 2 + CSPP005 12/4/2007 1 1 RPC 3 + CSPP005 12/4/2007 1

Re: [R] range and intersection

2010-03-13 Thread David Winsemius
On Mar 13, 2010, at 10:14 PM, Adrian Johnson wrote: Hi: I have a two large files (over 300K lines). file 1: NameX UK 199 UK 230 UK 139 .. UAE194 UAE 94 File 2: Name XY UK140 180 UK195240 UK304340 I haven't figured

Re: [R] range and intersection

2010-03-13 Thread jim holtman
Try this: file1 - read.table(textConnection(NameX + UK 199 + UK 230 + UK 139 + UAE194 + UAE 94), header=TRUE, as.is=TRUE) file2 - read.table(textConnection(Name XY + UK140 180 + UK195240 + UK304340), header=TRUE, as.is=TRUE)

Re: [R] range and intersection

2010-03-13 Thread Adrian Johnson
Hi David, Sorry. I want to test those lines in file1 match name in file2. IF File1$Name == File2$Name then: check if File1$X is in range of File2$(x,y): if yes: print File1$Name '\t' File1$X '\t' File2$Name '\t' File2$X '\t' File2$Y. Thanks Adrian On

Re: [R] Why doesn't vec[-real.number] give an error or warning? Kids do the darndest things!

2010-03-13 Thread jim holtman
That notation 'v[-1.18]' is not going to remove the 12th entry if it was 1.18. They should have used: v[-which(v == 1.18)] to remove it, but it probably would not have worked and we would have refered them to FAQ 7.31. R is doing exactly what you are asking it to do. There are cases where I

Re: [R] R-Excel Macro Problem

2010-03-13 Thread Megh
Hi, I was trying to run your code in my VBA editor, however could not succeed. The execution stumbled in the line Call Rinterface.StartRServer itself. I have RCOM package installed into my R environment. Do I need to install anything else to run that? Would guys here guide me? Thanks -- View

Re: [R] range and intersection

2010-03-13 Thread David Winsemius
On Mar 13, 2010, at 11:38 PM, Adrian Johnson wrote: Hi David, Sorry. I want to test those lines in file1 match name in file2. IF File1$Name == File2$Name then: check if File1$X is in range of File2$(x,y): Not an adequately specific bit os pseudo code. if yes:

Re: [R] range and intersection

2010-03-13 Thread Adrian Johnson
The example I gave was just an example, I made for illustrating my problem. I IF File1$Name == File2$Name then: check if File1$X is in range of File2$(x,y): if yes: print File1$Name '\t' File1$X '\t' File2$Name '\t' File2$X '\t' File2$Y if no :

Re: [R] Creating images without X11

2010-03-13 Thread Sharpie
Jillian E Kozyra wrote: Dear Colleagues, We are attempting to create trees using R with our Ruby on Rails application. However, we are running into a problem involving the creation of the graphic. We would like them to be in either jpg or png format so that users can save, but due to a

Re: [R] range and intersection

2010-03-13 Thread jim holtman
If you also want to match on the Name, this should do it: file1 - read.table(textConnection(NameX + UK 199 + UK 230 + UK 139 + UAE194 + UAE 94), header=TRUE, as.is=TRUE) file2 - read.table(textConnection(Name XY + UK80 100 + UK140 180 + UK195

Re: [R] R-Excel Macro Problem

2010-03-13 Thread RICHARD M. HEIBERGER
On Sat, Mar 13, 2010 at 11:51 PM, Megh megh700...@yahoo.com wrote: Hi, I was trying to run your code in my VBA editor, however could not succeed. The execution stumbled in the line Call Rinterface.StartRServer itself. I have RCOM package installed into my R environment. Do I need to install

[R] formula and class label

2010-03-13 Thread Amy Hessen
Hi, Could you please tell me whether there is a difference in the result of svm when using formula instead of class label? Cheers, Amy _ Browse profiles for FREE! Meet local singles

Re: [R] range and intersection

2010-03-13 Thread Charles C. Berry
On Sat, 13 Mar 2010, Adrian Johnson wrote: Hi: I have a two large files (over 300K lines). file 1: NameX UK 199 UK 230 UK 139 .. UAE194 UAE 94 File 2: Name XY UK140 180 UK195240 UK304340 I want to select X of File 1

Re: [R] range and intersection

2010-03-13 Thread Charles C. Berry
Typo corrected below. On Sat, 13 Mar 2010, Charles C. Berry wrote: On Sat, 13 Mar 2010, Adrian Johnson wrote: Hi: I have a two large files (over 300K lines). file 1: NameX UK 199 UK 230 UK 139 .. UAE194 UAE 94 File 2: Name XY UK