Re: [R] How to join data.frames with different row lengths

2014-03-24 Thread Johnson
re it keeps > every unique 'code' from both datasets and fills the blanks in both > rows with 0: > > FinalDataSet: > Code Cap04 Cap08 > 2 120 120 > 6 75 0 > 7 220 112 > 90 190 > 17

[R] function pointers?

2017-11-22 Thread Paul Johnson
fastest possible way. In an Objective-C problem in the olden days, we found the method-lookup was a major slowdown and one of the programmers showed us how to save the lookup and use it over and over. pj -- Paul E. Johnson http://pj.freefaculty.org Director, Center for Research Metho

Re: [R] [ESS] M-x R gives no choice of starting dir

2017-12-13 Thread Paul Johnson
e, Switzerland > http://enricoschumann.net > > ______ > ess-h...@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help -- Paul E. Johnson http://pj.freefaculty.org Director, Center for

[R] Interesting quirk with fractions and rounding

2017-04-20 Thread Paul Johnson
> round(aa) [1] 57 > round(bb) [1] 58 I'm putting this one in my collection of "difficult to understand" numerical calculations. If you have seen this before, I'm sorry to waste your time. pj -- Paul E. Johnson http://pj.freefaculty.org Director, Center for Resea

Re: [R] Prediction plots

2017-04-21 Thread Paul Johnson
I have done this a lot. Would you mind installing my pkg rockchalk and then run example(plotSlope) and example(plotCurve)? If the output is close to what you want, you can adjust my code. The vignette explains. 1. Create newdata object 2. Run that through predict 3. Make plot None of this is rock

Re: [R] Peformance question

2017-04-21 Thread Paul Johnson
I dont understand your code. But I do have suggestion. Run the functions in the profiler, maybe differences will point at the enemy. Know what I mean? Rprof('check.out') #run code Rprof(NULL) summaryRprof('check.out') Do that for each method. That may be uninformative. I wondered if you tried t

Re: [R] Interesting quirk with fractions and rounding

2017-04-21 Thread Paul Johnson
owing accidents from trusting floats. I wonder now if all uses of > or < with numeric variables are suspect. Oh well. If everybody posts their advice, I will write a summary. Paul Johnson University of Kansas On Apr 21, 2017 12:02 AM, "PIKAL Petr" wrote: > Hi > >

Re: [R] Interesting quirk with fractions and rounding

2017-04-22 Thread Paul Johnson
I have to read more books. I studied Golub and van Loan and came away with healthy fear of matrix inversion. But when you look at user contributed regression packages, what do you find? Matrix inversion and lots of X'X. Paul Johnson University of Kansask The key (in your example) is a prope

[R] test for proportion or concordance

2017-08-03 Thread Adrian Johnson
Hello group, my question is deciding what test would be appropriate for following question. An experiment 'A' yielded 3200 observations of which 431 are significant. Similarly, using same method, another experiment 'B' on a different population yielded 2541 observations of which 260 are significa

[R] package building problem Centos 7 & R 3.4.1

2017-08-11 Thread Paul Johnson
uot;/home/pauljohn/R/x86_64-redhat-linux-gnu-library/3.4" [2] "/usr/lib64/R/library" [3] "/usr/share/R/library" The packages in question are all in "/usr/share/R/library". The system-wide R_LIBS_SITE has that directory, Local Variables of /usr/lib64/R/etc/R

Re: [R] package building problem Centos 7 & R 3.4.1

2017-08-12 Thread Paul Johnson
On Aug 12, 2017 11:58 AM, "José Abílio Matos" wrote: On Friday, 11 August 2017 22.51.12 WEST Paul Johnson wrote: > Dear everybody: > > Packages that DO pass the package check on my Ubuntu 17.04 laptop with > R 3.4.1 and Mac OSX do not build on Centos 7 with R 3.4.1. I

Re: [R] Plotting log transformed predicted values from lme

2017-08-12 Thread Paul Johnson
In the rockchalk package, I have a function called newdata that will help with this. Plenty of examples. Probably my predictOmatic function will just work. Motivation is in the vignette. Paul Johnson University of Kansas On Aug 9, 2017 11:23 AM, "Alina Vodonos Zilberg" wrote: >

[R] workaround for "package building problem Centos 7 & R 3.4.1"

2017-08-14 Thread Paul Johnson
er bothered by the problem in the first place. Anyway, we have a workaround, but I don't understand what's wrong to begin with or how to fix it the right way. If you keep Googling, you see that this problem was experienced as early as 2012. It has happened to some of my personal R

Re: [R] Install package "diagram"

2017-08-17 Thread Paul Johnson
t; __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and > more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/ > posting-guide.html > and provide commented, minima

[R] How to get CI from surfit object in survival

2017-08-26 Thread Adrian Johnson
Hi I am not sure hiw to get thr CI from summary function on the survfit object. I can get the percent survival for 2 years from survfit object but I dont get Confidence intervals Could anyone suggest a hint Thanks Adrian [[alternative HTML version deleted]] __

Re: [R] How to get CI from surfit object in survival

2017-08-26 Thread Adrian Johnson
hich case you should learn them now; see > ?help -- or have I misunderstood your query? > > Cheers, > Bert > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley B

Re: [R] How to get CI from surfit object in survival

2017-08-26 Thread Adrian Johnson
gt; -- Bert > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Sat, Aug 26, 2017 at 5:18 PM, Adrian

[R] if else condition - help

2016-05-22 Thread Adrian Johnson
Hi group: I am having difficulty with if else condition. I kindly request some help. I have a matrix k > k C1 C2 C3 C4 A 0.09902175 -0.1083887 0.2018689 -0.3546167 B 1.60623838 -1.4167034 0.9076373 -0.3161138 C -0.10433133 -1.7060911 -0.4030050 1.0153297 D

Re: [R] if else condition - help

2016-05-22 Thread Adrian Johnson
gt; A 0 0 0 0 > B 1 0 0 0 > C 0 -1 0 0 > D -1 1 -1 -1 > > On Sun, May 22, 2016 at 2:00 PM Adrian Johnson > wrote: >> >> Hi group: >> I am having difficulty with if else condition. I kindly request some help. >> >> I have a matrix k &

[R] How to specify a data frame column using command line arg?

2016-06-05 Thread Douglas Johnson
I'm guessing this is trivial but I've spent two hours searching and reading FAQ, tutorial, introductory and 'idiom' documents and haven't found a solution. All I want to do is select a data frame column at run time using a command line arg. For example, the "test.csv" file contains: a,b,c 1,2,3 4,

[R] generate a vector of random numbers within confines of certain parameters

2016-08-02 Thread Adrian Johnson
Dear group, I am trying to generate a vector of random numbers for 20K observation. however, I want to generate numbers (with 6 decimal places) within the range of Std. Dev : 2-3 mean : 4-6 Is there a method to generate numbers with 6 decimal places under these parameters thank you. Adrian __

[R] RGL library loading issues

2016-08-05 Thread Adrian Johnson
Dear group: I installed rgl on my mac through terminal. I used install.packages(rgl) and selected 118 server option. Installation went well until, I get message checking if installed packages working and nothing happens. I opened another terminal window and types library(rgl) and I see my X11qu

[R] remove rows based on row mean

2016-08-18 Thread Adrian Johnson
Hi Group, I have a data matrix sm (dput code given below). I want to create a data matrix with rows with same variable that have higher mean. > sm Gene GSM529305 GSM529306 GSM529307 GSM529308 1A1BG 6.57 6.72 6.83 6.69 2A1CF 2.91 2.80 3.08 3.00

Re: [R] remove rows based on row mean

2016-08-18 Thread Adrian Johnson
ated(sm$Gene)),] > > Jim > > > On Fri, Aug 19, 2016 at 7:33 AM, Adrian Johnson > wrote: >> Hi Group, >> I have a data matrix sm (dput code given below). >> >> I want to create a data matrix with rows with same variable that have >> higher mean. >

[R] pheatmap breaks

2016-08-19 Thread Adrian Johnson
Hi group: I tried multiple times cannot understand the breaks to work for my heatmap. I am using following way: pheatmap(chxx, cluster_cols=FALSE, annotation_col=annotcols, annotation_colors=anno_colors, col=colorRampPalette(c("dark blue", "white", "#ff"))(34), show_colnames=F) > max(chxx)

[R] matrix/df help populate NA

2015-06-13 Thread Adrian Johnson
Dear group: I have two data frames. The column names of the two data frame has some common variables but not identical. my aim is to make 2 DFs more uniform by taking union of both colnames For example: I have x1 and x2 matrices: > x1 SubjectAB CD 1 x1 1.5 -1.3 0.4 -0.2

Re: [R] matrix/df help populate NA

2015-06-14 Thread Adrian Johnson
ames(x2)) >> >> new_x2 <- x2 >> >> for (i in missing) new_x2[[i]] <- NA >> >> new_x2 > Subject AD FH B C > 1 x1 4.3 -2.4 1.3 -2.3 NA NA > 2 x2 2.4 0.1 0.5 -1.4 NA NA > > > > > > Jim Holtman > Data Munger

[R] setting up R -- VM Fusion, WIndows7

2015-07-30 Thread Matthew Johnson
Hi, As i need R to speak to Bloomberg (and big only runs on windows), i'm running windows 7 via VM Fusion on my mac. I think i am having permission problems, as i cannot use install.packages, and cannot change .libPaths via either a .Rprofile, or Profile.site. I've posted more detail in this sup

[R] How to pass variable column name into R function

2014-12-18 Thread Jeff Johnson
I know this has been explained a few times here in different scenarios, but I am having a hard time digesting this. The following code works fine as long as it's not inside a function (see below). df$season <- as.character(df$season) temp <- model.matrix( ~ season - 1, data=df) df <- cbind(df

Re: [R] Transforming data for nice output table

2018-08-21 Thread Paul Johnson
__ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Paul E. Johnson

[R] looking for formula parser that allows coefficients

2018-08-21 Thread Paul Johnson
quot; = 0.1) I could build a formula from that. That's not too bad. But I still think it would be cool to allow formula input. Have you ever seen it done? pj -- Paul E. Johnson http://pj.freefaculty.org Director, Center for Research Methods and Data Analysis http://

Re: [R] Problems to obtain standardized betas in multiply-imputed data

2018-10-05 Thread Paul Johnson
lm.beta, it actually standardizes variables and runs regression. lm.beta resales coefficients instead. Paul Johnson University of Kansas On Wed, Sep 26, 2018, 5:03 AM CHATTON Anne via R-help wrote: > Dear all, > > I am having problems in obtaining standardized betas on a multiply-imput

Re: [R] ANOVA in R

2018-10-10 Thread Paul Johnson
t post hoc comparisons. In car package, Anova function will help. I may teach Anova soon, we'll see if I have better answer then. Paul Johnson University of Kansas On Wed, Oct 10, 2018, 1:14 AM Thanh Tran wrote: > Hi eveyone, > I'm studying about variance (ANOVA) in R and have so

[R] lm equivalent of Welch-corrected t-test?

2018-11-13 Thread Paul Johnson
3.576968 sample estimates: mean in group F mean in group M 39.9455843.85358 > (m1.t.effect <- diff(m1.t$estimate)) mean in group M 3.908003 > m1.t.effect/m1.t$statistic mean in group M -0.1668129 -- Paul E. Johnson http://pj.freefaculty.org Director, Center

[R] data transformation

2019-01-20 Thread Adrian Johnson
Dear group, My question, perhaps is more of a statistical question using R I have a data matrix ( 400 x 400 normally distributed) with data points ranging from -1 to +1.. For certain clustering algorithms, I suspect the tight data range is not helping resolving the clusters. Is there a way to tran

Re: [R] data transformation

2019-01-20 Thread Adrian Johnson
I apologize, I forgot to mention another key operation. in my matrix -1 to <0 has a different meaning while values between >0 to 1 has a different set of meaning. So If I do logit transformation some of the positives becomes negative (values < 0.5 etc.). In such case, the resulting transformed ma

[R] (no subject)

2019-02-10 Thread Adrian Johnson
Dear group, I have two large matrices. Matrix one: is 24776 x 76 (example toy1 dput object given below) Matrix two: is 12913 x 76 (example toy2 dput object given below) Column names of both matrices are identical. My aim is: a. Take each row of toy2 and transform vector into UP (>0) and DN (

[R] I'm Working On A Data Security Article - Quick Question

2019-02-11 Thread Murris Johnson
Hi, I have a quick question for you about a page on your site that briefly mentions a data security topic, https://stat.ethz.ch/pipermail/r-help/2008-May/162561.html. I plan on writing a few guest authored articles in the next month or so that talk about data security & breaches, are you

Re: [R] (no subject)

2019-02-11 Thread Adrian Johnson
Pardon me, I forgot to add subject line. -Adrian. On Sun, Feb 10, 2019 at 3:49 PM Adrian Johnson wrote: > > Dear group, > > I have two large matrices. > > Matrix one: is 24776 x 76 (example toy1 dput object given below) > > Matrix two: is 12913 x 76 (example toy2

[R] faster execution of for loop in Fishers test

2019-02-11 Thread Adrian Johnson
Dear group, I have two large matrices. Matrix one: is 24776 x 76 (example toy1 dput object given below) Matrix two: is 12913 x 76 (example toy2 dput object given below) Column names of both matrices are identical. My aim is: a. Take each row of toy2 and transform vector into UP (>0) and DN (

[R] pheatmap - clustering of select columns

2019-03-08 Thread Adrian Johnson
Dear group, In pheatmap, is it possible to cluster select colmns. For example, in a matrix of 10 rows and 20 columns. I want to cluster only those columns 1-10 and cluster rows. Similarly, retaining the same row clustering resulted from clustering of columns 1-10, I want to enforce clustering of 11

[R] mutually exclusive events

2014-08-02 Thread Adrian Johnson
Hi: I am trying to identify mutually exclusive events from the following example: Cluster Gene Mutatednot-mutated 1 G1 1 0 1 G2 1 0 1 G3 0 1 1 G4

[R] map column name in matrix to multiple elements

2014-08-08 Thread Adrian Johnson
Hi: I am requesting help on matrix mapping. I have a matrix that is 5000 rows x 3000 columns in R env. Matrix: A BC D E S1 0.01 0.2 -0.3 0.8-1 S2 -21.4 2.3 3.1-2 S3 -4 -3-2

[R] populating matrix with binary variable after matching data from data frame

2014-08-12 Thread Adrian Johnson
Hi: sorry I have a basic question. I have a data frame with two columns: > x1 V1 V2 1 AKT3TCL1A 2 AKTIPVPS41 3 AKTIPPDPK1 4 AKTIP GTF3C1 5 AKTIPHOOK2 6 AKTIPPOLA2 7 AKTIP KIAA1377 8 AKTIP FAM160A2 9 AKTIPVPS16 10 AKTIPVPS18 I have a matrix 1211

Re: [R] populating matrix with binary variable after matching data from data frame

2014-08-13 Thread Adrian Johnson
wn wrote: > On Tue, Aug 12, 2014 at 7:14 PM, Adrian Johnson > wrote: >> >> Hi: >> sorry I have a basic question. >> >> I have a data frame with two columns: >> > x1 >> V1 V2 >> 1 AKT3TCL1A >> 2 AKTIPVPS41 >> 3

Re: [R] populating matrix with binary variable after matching data from data frame

2014-08-13 Thread Adrian Johnson
Hello again. sorry for question again. may be I was not clear in asking before. I don't want to remove rows from matrix, since row names and column names are identical in matrix. I tried your suggestion and here is what I get: > fx <- function(x,x1){ + i <- as.matrix(x1[,c("V1","V2")]) + x[i]

Re: [R] populating matrix with binary variable after matching data from data frame

2014-08-14 Thread Adrian Johnson
t; if ((n <- length(extraDimnames[[1]])) > 0) { >> x <- rbind(x, array(0, c(n, ncol(x)), dimnames = >> list(extraDimnames[[1]], >> NULL))) >> } >> if ((n <- length(extraDimnames[[2]])) > 0) { >>

[R] Is it possible to have different animations saved together with the saveSWF command?

2014-09-01 Thread Cheryl Johnson
The way I have programed my code the same animation runs and then starts over again with Adobe Flash. Each time the animation ends and starts is it possible to have a different animation start each time? Thanks in advance for any guidance. [[alternative HTML version deleted]]

[R] Combining two data frames

2014-09-19 Thread Adrian Johnson
Hi: Appreciate if I could get some help. I have two data frames. I want to combine these two dfs bases on first column. df1 : SubjectG1 G2G3 A 10 1 0 B 20 220 df2: Subject m1m2 m3 A 20 9 30 B

Re: [R] Combining two data frames

2014-09-19 Thread Adrian Johnson
thanks it works I guess: merge(b1,b2,by='Subject') On Fri, Sep 19, 2014 at 5:03 PM, Uwe Ligges wrote: > See ?merge > > Best, > Uwe Ligges > > > On 19.09.2014 22:58, Adrian Johnson wrote: >> >> Hi: >> Appreciate if I could get some help. >

[R] sorting matrix by sets rows

2016-02-06 Thread Adrian Johnson
Hello: sorry I've been trying to sort a matrix to make waterfall plot using barplot function. I have have 30x5 matrix.Rows are samples and columns are results for a test as numeric vector. I want sort matrix by column. For example, first I want to sort column 1, in decreasing values where col

[R] Ask if an object will respond to a function or method

2016-03-31 Thread Paul Johnson
cceeds but coef is not listed as a method. Right now, I'm contemplating this: zz1 < - try(coef(zz)) if (inherits(zz1, "try-error")) stop("Your model has no coef method") This seems like a bad workaround because I have to actually run the function in order to find out if t

[R] barplot beside=TRUE - values differ on scales

2016-10-12 Thread Adrian Johnson
Dear group, I have been struggling to barplot two different measurements from one subject. These two measures differ in range. I want to plot row 1 axis on left side and row 2 values on right side. For a given column I want to plot GN and CN next to each other. my dput code is below : structure

Re: [R] barplot beside=TRUE - values differ on scales

2016-10-12 Thread Adrian Johnson
, 1L, 131L, 1L, 2234L, 2L, 2892L, 1L, > 528L, 0L, 582L, 2L), .Dim = c(2L, 7L), .Dimnames = list(c("GN", > "CN"), c("DC5", "DC8", "DC14", "DC18", "DC19", "DC20", "DC23" > ))) > plot(m["

Re: [R] barplot beside=TRUE - values differ on scales

2016-10-12 Thread Adrian Johnson
Thanks Duncan. I am sorry I cannot scale second row (d[2,]). I was looking for a way to plot d[2,] values next to d[1,] with a right side axis=4 on right side. -2,-1,0,1,2 thanks Adrian On Wed, Oct 12, 2016 at 12:42 PM, Duncan Murdoch wrote: > On 12/10/2016 12:20 PM, Adrian Johnson wr

Re: [R] barplot beside=TRUE - values differ on scales

2016-10-12 Thread Adrian Johnson
David L Carlson > Department of Anthropology > Texas A&M University > College Station, TX 77840-4352 > > > > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Adams, Jean > Sent: Wednesday, October 12, 2016 12:44 PM > To: Adrian Johnso

Re: [R] barplot beside=TRUE - values differ on scales

2016-10-12 Thread Adrian Johnson
As Dr.Murdoch suggested, transformation of row 2 is important to make sense in graphical depiction. Thanks to all. On Wed, Oct 12, 2016 at 4:25 PM, Adrian Johnson wrote: > Hello Dr. Carlson, > thanks for the tip. It is exactly what I am looking for. > > I see the trick lies in >

[R] pheatmap - clustering on some columns only

2016-10-14 Thread Adrian Johnson
Dear group, I have a matrix (300 rows X 475columns). The data is divided into many classes. For examples: 475 columns are split into 3 categories - A, B and C Is it possible to force clustering of columns in A followed by B and C. I do not want to cluster whole matrix. I want to cluster by 3 categ

Re: [R] Error installing packages

2016-10-20 Thread Paul Johnson
r layer in this story is that her 30 day free trials were expired, and I have feeling this means that not only is McAfee still installed, but it is also running but refusing to let you interact with it. pj -- Paul E. Johnson http://pj.freefaculty.org Director, Center

[R] replace items in vector with character based on logical operator

2016-11-12 Thread Adrian Johnson
Hi group, I have a vector of numeric items and I want to replace based on logical operator (> or <) with 'up', 'down' or 'nochange' The way I am doing works sometimes and does not work sometime. I dont understand the problem. In this example, that works for condition DN first, gets over-written

[R] Clustering methods for data that has bimodal distribution

2016-12-04 Thread Adrian Johnson
Dear group, pardon me for a naive question. I have data matrix (11K rows , 4K columns). The data range is between -1 to 1. Not strictly integers, but real numbers with at least place values in millionths. The data distribution is peculiar (if I do plot(density(myMatrix)), I get nice bimodal curve

[R] tests for significance on conditional inference trees from party package

2016-12-13 Thread Adrian Johnson
Dear group, Please allow me to ask a naive question and pardon if it is qualified as stupid question. I am using party package to classify covariates and predict distribution of survival times for the classified variables. Typically I have a matrix of covariates (columns) including outcome data (o

[R] xvfb? cron job updates R packages, fails on some requiring X11

2017-01-19 Thread Paul Johnson
all successfully. I understand I need something like xvfb to simulate an X11 session, but I don't understand how to make it work. Can one of you give me an idiot's guide on what to do? pj -- Paul E. Johnson http://pj.freefaculty.org Director, Center for Research Methods and Data Analysis ht

[R] Predictive Analytics event Sept 24-25, Chicago

2008-08-21 Thread Elise Johnson
customer data to predict buying behavior, profit, etc. Past attendees have given rave reviews. You can find more info at http://www.predictionimpact.com/predictive-analytics-training.html, e-mail [EMAIL PROTECTED], or call (415) 683-1146. thanks --Elise Johnson, Prediction Impact -- View this

Re: [R] Saving plots to file

2009-08-10 Thread Cedrick Johnson
Try this: png(file="Desktop/hist1.png") plot(glm1$residuals,gain,main = "Hist of residuals and gain") dev.off() -c Sean MacEachern wrote: Appologies if this has been addressed before, but I can't seem to find it in the help archives. I'm looking to do something like the following but it look

Re: [R] Insall package

2009-09-10 Thread Cedrick Johnson
Try downloading the rscproxy-.ZIP file on windows. Extension tar.gz is used (mostly) on linux or install.packages('rscproxy') -c wesley mathew wrote: Dear Sir Subject: - *Install " rscproxy_1.3-1.tar.gz "* I am working in Windows system. I was try to install *rscproxy* package in

Re: [R] cluster-lite

2009-09-15 Thread Cedrick Johnson
perhaps a long shot but maybe the package 'nws' could handle some of it. I've recently begun looking into something similar lately as well. -c ivo welch wrote: I am about to write a "cluster-lite" R solution for myself. I wanted to know whether it already exists. If not, I will probably writ

Re: [R] Which one shall I use? '=' or '<-'?

2009-09-16 Thread Cedrick Johnson
I don't have the link off the top of my head, but if you search the archives and look for 'R Google Style Guide' or 'Google R Style' there was quite an interesting conversation thread regarding the use of the two, mostly for readability purposes... -cj Peng Yu wrote: Hi, I was told to use

[R] correlation help

2009-09-20 Thread Adrian Johnson
Dear group, I have a matrix like the following: Name Sample1sample2sample3 sample4 . sample(n) nm110.5 13.5 30 31 nm2 8 1134 29 nm3 9 10.3 27.8 35 nm(j) I w

Re: [R] correlation help

2009-09-20 Thread Adrian Johnson
luated was: (y) > for(i in 1:14659){ + k = i+1 + cor.test(d6[i,],d6[k,]) + x = cor.test(d6[i,],d6[k,]) + return(x)} Error: no function to return from, jumping to top level I appreciate your help. thank you. Adrian On Sun, Sep 20, 2009 at 6:17 PM, Adrian Johnson wrote: > thank you jo

Re: [R] run R script automatically by double-clicking WinXP desktop icon

2009-09-22 Thread Cedrick Johnson
Here's something I use (in a batch file): Rterm --no-restore --file=EveningStartup.r Change EveningStartup.r to your particular file. When you create the shortcut, make sure to set the working directory to where your R script is located. Then in your file, you could have the graphs write out

Re: [R] Fortune candidate! Re: new to R Project

2010-02-23 Thread Cedrick Johnson
library(rant) I recall just over a year ago (Fall08) when I was new to the R language. I realize there's a steep curve in any language, especially with R and the multitudes of packages that exist. With that being said, I still took (still do) time out to read the manuals, the vignettes and perfor

Re: [R] Three most useful R package

2010-03-02 Thread Cedrick Johnson
I think it depends on your particular domain, mine is in finance: Quantmod PerformanceAnalytics And Diethelm Wuertz's collection of packages (fOptions, fPortfolio,etc) Rgds, C On 3/2/10, Ralf B wrote: > Hi R-fans, > > I would like put out a question to all R users on this list and hope > it wil

Re: [R] PCA

2010-03-10 Thread Paul Johnson
w do I > derive a new data set? > the output of p1$scores is what you want, isn't it? Or just one column of it? desiredScores <- p1$scores[ , 1] p -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas ___

Re: [R] Shade area under curve

2010-03-10 Thread Paul Johnson
I use this to make illustration for some calculus notes. There are examples of shaded areas in there: ### Filename: Normal1_2009_plotmathExample.R ### Paul Johnson June 3, 2009 ### This code should be available somewhere in http://pj.freefaculty.org/R. If it is not ### email me ###Set mu and

Re: [R] Forecast

2010-03-10 Thread Cedrick Johnson
?forecast Maybe ?xts or ?timeSeries if you need to adjust dates, etc. On 3/11/10, chinna wrote: > > sample report data that i want to forecast > > quarter quarter_index Revenue > 2007 Q1 1 $3,856,799 > 2007 Q2 2 $4,243,328 > 2007 Q3 3

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

Re: [R] range and intersection

2010-03-13 Thread Adrian Johnson
;\t' File2$Y. Thanks Adrian On Sat, Mar 13, 2010 at 11:21 PM, David Winsemius wrote: > > On Mar 13, 2010, at 10:14 PM, Adrian Johnson wrote: > >> Hi: >> >> I have a two large files (over 300K lines). >> >> file 1: >> >> Name

Re: [R] range and intersection

2010-03-13 Thread Adrian Johnson
'\t' File2$Y if no : Do nothing. I am only interested in lines that match names in File2 to be printed. I did this in Python but it is far slower. thanks Adrian On Sat, Mar 13, 2010 at 11:55 PM, David Winsemius wrote: > > On Mar 13, 2010, at 11:38 PM,

[R] Care to share an R presentation?

2010-03-17 Thread Paul Johnson
h givers can get it. -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-proj

[R] Does S inherit the enhancements in R language?

2010-03-19 Thread Paul Johnson
onth, i saw a student here with a political model and he used rep as a variable in a regression model, it seemed to work just fine. I surmise that the rise in usage of namespaces in R packages accounts for that? I'm sorry if this is too OT for r-help. pj -- Pa

Re: [R] t-scores and correlation

2009-07-10 Thread Adrian Johnson
he args list of 'length' being evaluated was: (y) On Fri, Jul 10, 2009 at 4:22 PM, Jorge Ivan Velez wrote: > Dear Adrian, > See ?cor.test. > HTH, > > Jorge > > > On Fri, Jul 10, 2009 at 4:13 PM, Adrian Johnson > wrote: >> >> Hi I have a matrix with

[R] t-scores and correlation

2009-07-10 Thread Adrian Johnson
Hi I have a matrix with samples on columns and variables and their values on rows. I want to calculate correlation (pearson) between a variable and others in rows and obtain t-scores for the variables. how can i do it. thank you. Ad __ R-help@r-project.o

[R] POSIX, timezones and R-ODBC

2009-07-14 Thread Cedrick Johnson
e other attached packages: [1] quantmod_0.3-10 TTR_0.2 Defaults_1.1-1 xts_0.6-6 zoo_1.5-6 [6] RODBC_1.2-6 svSocket_0.9-43 svMisc_0.9-48 TinnR_1.0.3 R2HTML_1.59-1 [11] Hmisc_3.6-0 rcom_2.1-3 rscproxy_1.3-1 loaded via a namespace (and not attached): [1] cl

Re: [R] Standalone program from R script

2009-07-14 Thread Cedrick Johnson
hem to Rserve. Once Rserve/R is done, pickup the image or text generated and have it display in the applet. HTH, cj -- Cedrick W. Johnson aim) cedrickjcvgr www.cedrickjohnson.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Gabor

Re: [R] remote database queries

2009-07-18 Thread Cedrick Johnson
Here's my MYSQL setup for retrieving data: library(RMySQL) channel <- dbConnect(MySQL(), user="xx", password="xx", dbname="HistData", host="nomnom.cvgrllc.com") EDM1 = dbGetQuery(channel, paste("select Date, o, h, l, c, v, a from HistBondData Where Symbol = 'EDM1' AND a != 0 ORDER BY Da

Re: [R] how to run the R script in background in Windows XP?

2009-07-18 Thread Cedrick Johnson
Jie- This is what I use (contained within a batch file and runs using windows scheduler every day at 4AM): Rscript --verbose MorningStartup.r > morningsummary-log.txt HTH, c -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jie TANG

Re: [R] RMySQL Error

2009-07-23 Thread Cedrick Johnson
Make a copy of the libmySQL.dll and put it in your R_HOME\bin directory and try again.. Just to be on the safe side, I created an env variable called R_HOME and added R_HOME\bin to my path. HTH -c Brock Tibert wrote: Hi Everyone, I am relatively new to R, but I want to try to

Re: [R] Multiple graphs

2009-07-27 Thread Cedrick Johnson
Try dev.new() after each graph is generated. Example code from my setup (adapted a bit to fit your situation): Alternate Method 1: Generate images and insert into PPT png(file = "chart1.png", width=800, height=800) #do something pretty dev.off() Alternate Method 2: Generate images with new wi

Re: [R] Value-at-Risk Portfolio(both equity and option)

2010-03-30 Thread Cedrick Johnson
Check out this discussion on r-sig-finance regarding VaR for options. Quite informative and should be a good starting point. -c On 3/30/10, zhang wrote: > > Hello All, > > I am working on the risk measures for a portfolio, which contain both equity > futures, equity options and currency options.

Re: [R] Value-at-Risk Portfolio(both equity and option)

2010-03-30 Thread Cedrick Johnson
It would help if I included the link: http://n4.nabble.com/VaR-for-path-dependent-option-portfolio-td1676787.html -c On 3/30/10, Cedrick Johnson wrote: > Check out this discussion on r-sig-finance regarding VaR for options. > Quite informative and should be a good starting point. > &g

Re: [R] Value-at-Risk Portfolio(both equity and option)

2010-03-31 Thread Cedrick Johnson
One thing that comes to mind immediately is the 'blotter' package which I believe is designed to handle and track multiple instruments. A sloppy temporary solution I guess would be to do some type of lookup or a flag that denotes which instrument is an option and apply the VaR methodology appropri

Re: [R] time series datasets

2010-03-31 Thread Cedrick Johnson
What kind of time series data? Finance? Econometrics? The 'quantmod' package allows for downloading of stock and FRED data online for analysis. I believe PerformanceAnalytics also has some datasets as well. -c On 3/31/10, vibha patel wrote: > Hello, > > I am searching large multivariate time se

Re: [R] Java to R interface.

2009-09-25 Thread Cedrick Johnson
You could also try Rserve http://www.rforge.net/Rserve/ -cj vikrant S wrote: I want to call R functions from Java. I read a couple of forums that said to install package rJava in R. However I am not able to install rJava package in linux Ubuntu.I tried with two commands. One is install.packag

Re: [R] How to find the interception point of two linear fitted model in R?

2009-10-21 Thread Paul Johnson
(1,1), -m1[, 2]) > a [,1] [,2] [1,]1 -0.90 [2,]1 -3.257143 > b <- m1[,1] > solve(a=a,b=b) [1] 4.396364 4.551515 This seems to "visually verify" the result: > plot(1:10,1:10, type="n") > abline(mod1) > abline(mod2) -- Paul E. Johnson P

[R] comparing two data.frames

2009-10-29 Thread Adrian Johnson
Dear group, I have two data.frames X and Y identical except for values. > X gene fc A1CF -0.10050677 A2BP1 -2.03093217 A2M -0.09092704 A4GALT 0.04124563 A4GNT -0.10336042 > Y gene fc A1CF -0.085709770 A2BP1 1.058642812 A2M 0.142530426 A4GALT0.0094631

[R] spss imports--trouble with to.data.frame

2009-11-13 Thread Paul Johnson
will not be allowed in factors anymore 14: In `levels<-`(`*tmp*`, value = c("Galicia", "Principado de Asturias", ... : duplicated levels will not be allowed in factors anymore 15: In `levels<-`(`*tmp*`, value = c("Stockholm", "", "Sydsverige",

Re: [R] gregmisc library (Mandriva)

2009-11-15 Thread Paul Johnson
ter computer on which I'll need to make RPMs for many packages, and so I'm in the same boat as you are if you are wanting RPMs. You could check back with me in about a month to find out if I have packages for you. pj I think gregmisc is a "bundle", those are deprecated.

[R] Population Histogram

2009-12-09 Thread terry johnson
How would I make a population histogram in R from an excel file? Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.

[R] How to scale a histogram

2009-12-10 Thread terry johnson
If I want to scale a histogram ie multiply by a constant how would I do this? Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://w

  1   2   3   4   >