Re: [R] Total effect of X on Y under presence of interaction effects

2011-05-11 Thread vioravis
This is what I believe is referred to as "supression" in regression, where the correlation correlation between the independent and the dependent variable turns out to be of one sign whereas the regression coefficient turns out to be of the opposite sign. Read here about supression: http://www.uv

Re: [R] mtext text size (cex) doesn't match plot

2011-05-11 Thread Prof Brian Ripley
On Wed, 11 May 2011, George Locke wrote: Hi, I am using mtext instead of the ylab argument in some plots because i want to move it away from the numbers in the axis. However, the text in the X axis, for example: par(mar=c(5, 5.5, 4, 2)); plot(data, main="plot name", xlab= 'X axis', ylab

Re: [R] Row names and matrixs

2011-05-11 Thread Bert Gunter
Dear Anonymous/Lindsey Nielsen(?): While it would not be hard to answer your questions, given your admitted lack of programming or R experience, approaching your ignorance piecemeal in this fashion does not seem to be a sensible way to learn either. Instead, please start by reading the "Introducti

Re: [R] Line feed for a long character string

2011-05-11 Thread Lisa
Hi, Duncan, On your and William Dunlap’s suggestion, I tried this: cat(sep="\n", strwrap("my long character string")), and it works very well. Thanks so much for your help. Lisa -- View this message in context: http://r.789695.n4.nabble.com/Line-feed-for-a-long-character-string-tp3515824p3

Re: [R] How to fit a random data into Beta distribution?

2011-05-11 Thread MikeK
I am also trying to fit data to a beta distribution. In Ang and Tang, Probability Concepts in Engineering, 2nd Ed., page 127-9, they describe a variant of a beta distribution with additional parameters than the standard beta distribution, enabling specification of a max and min value other than 0

[R] Row names and matrixs

2011-05-11 Thread nielsen4897
Hi all - I am NEW to R and NEW to any type of programming. I am making heatmaps using the heatmap.2 function within gplots package. At present, when the heatmap is plotted it uses the row identifiers as 1,2,3,4...etc. However, I much rather use my own labels. I was told my another well-versed

Re: [R] sample weights in ols

2011-05-11 Thread jour4life
Thanks so much. I really appreciate it. Carlos On 5/11/2011 3:18 PM, Thomas Lumley-2 [via R] wrote: > On Thu, May 12, 2011 at 2:43 AM, jour4life <[hidden email] > > wrote: > > I have a follow up question. When using svyglm, it does not matter > that I am > > not using survey design and only wei

Re: [R] pass character vector in instrument field of get.hist.quote function

2011-05-11 Thread jim holtman
Depends on what you want to do with the date. If it is a character string, then just quote it: flex("xx-xx-","xx-xx-") If you want it as a Date or POSIXct object, then convert it: flex(as.Date('2011-05-01"), as.Date('2011;05-31")) It all depends on how you are using it in your custom

Re: [R] Total effect of X on Y under presence of interaction effects

2011-05-11 Thread David Winsemius
On May 11, 2011, at 6:26 PM, Matthew Keller wrote: Not to rehash an old statistical argument, but I think David's reply here is too strong ("In the presence of interactions there is little point in attempting to assign meaning to individual coefficients."). As David notes, the "simple effect" o

[R] map.market - font customisation

2011-05-11 Thread Hasan Diwan
How would I go about customising the font -- colour and size -- of the font used in portfolio's map.market function? The existing fonts are a bit small, when embedded into a PDF using Sweave generated latex. Many thanks! -- Sent from my mobile device Envoyait de mon telephone mobil _

Re: [R] selecting data from table with timestamp

2011-05-11 Thread MacQueen, Don
Try something similar to this: ## unchanged full <- read.table("March_15.dat", sep=",",row.names=NULL, as.is=TRUE,skip=1,header=TRUE) ## then convert TIMESTAMP to a date-time class full$TIMESTAMP <- as.POSIXct(full$TIMESTAMP) ## now you can use subset() atimeframe <- subset(full, TIMESTAMP

[R] changes in coxph in "survival" from older version?

2011-05-11 Thread Shi, Tao
Hi all, I found that the two different versions of "survival" packages, namely 2.36-5 vs. 2.36-8 or later, give different results for coxph function. Please see below and the data is attached. The second one was done on Linux, but Windows gave the same results. Could you please let me know w

Re: [R] Total effect of X on Y under presence of interaction effects

2011-05-11 Thread Matthew Keller
Not to rehash an old statistical argument, but I think David's reply here is too strong ("In the presence of interactions there is little point in attempting to assign meaning to individual coefficients."). As David notes, the "simple effect" of your coefficients (e.g., a) has an interpretation: it

Re: [R] R versions for Red Hat Linux

2011-05-11 Thread Shi, Tao
I second Marc on this. I just installed R2.12.2 on my linux box running RHEL. Now I also see R2.13.0 available by typing "yum info R". ...Tao - Original Message > From: Marc Schwartz > To: Marta Avalos > Cc: r-help@r-project.org > Sent: Wed, May 11, 2011 10:08:00 AM > Subject: Re

Re: [R] Line feed for a long character string

2011-05-11 Thread Duncan Murdoch
On 11/05/2011 4:46 PM, Lisa wrote: Dear all, Does anyone know how to make a line feed automatically based on the width of console window? For example, when you cat() a long character string just like this: You can use the strwrap() function to insert line breaks. If it's not under your contr

Re: [R] Reordering inputs

2011-05-11 Thread Steven Kennedy
You can order each matrix by any column you choose like: a<-matrix(rnorm(20),ncol=2) > a[order(a[,1]),] #orders by column 1 [,1] [,2] [1,] -1.86523489 -1.6920270 [2,] -0.94488744 0.2815087 [3,] 0.02380494 0.2491136 [4,] 0.37295795 0.8156993 [5,] 0.55533366 -0.7053233

Re: [R] issue with graph package in using RBGL -‘'graph' is not a valid installed package’"

2011-05-11 Thread joe j
Thank you very much Dan, Uwe and Duncan. First suggestion by Dan itself worked so I didn't have to try the other ones. But those suggestions and comments are of much value and are appreciated. Regards, Joe On Wed, May 11, 2011 at 7:14 PM, Duncan Murdoch wrote: > On 11/05/2011 10:51 AM, joe j wro

[R] mtext text size (cex) doesn't match plot

2011-05-11 Thread George Locke
Hi, I am using mtext instead of the ylab argument in some plots because i want to move it away from the numbers in the axis. However, the text in the X axis, for example: par(mar=c(5, 5.5, 4, 2)); plot(data, main="plot name", xlab= 'X axis', ylab="", font=2, cex.lab=1.5, font.la

[R] Line feed for a long character string

2011-05-11 Thread Lisa
Dear all, Does anyone know how to make a line feed automatically based on the width of console window? For example, when you cat() a long character string just like this: cat("Seminar series is an opportunity for students to learn about ongoing researches in the field of mathematics, computer sci

Re: [R] pass character vector in instrument field of get.hist.quote function

2011-05-11 Thread MatAra
Hello gentlemen, This is a great discussion. Thank you all for providing useful answers. I am also new to R, was working mostly with SAS before, and have a question regarding passing arguments to R functions that are wrapped in quotes. Using the previous example: getSymbols(tickers, from="start

[R] selecting data from table with timestamp

2011-05-11 Thread Pablo Rosado
Hi, I am using read.table to get this data that has a timestamp. The data is for many days, but I only want to run the code I wrote only for specific day/days/times. I can´t figure out how to select a timeframe from the list. I have tried using subset() and didn't work I then used: * timestamp[f

[R] foreach(): how to do calculations "between" two foreach loops?

2011-05-11 Thread Marius Hofert
Dear expeRts, is it possible to carry out calculations between different foreach() calls? As for nested loops, you want to carry out calcuations not depending on the inner loop only once and not for each iteration of the innermost loop. Cheers, Marius library(foreach) foreach(i=1:3) %:%

Re: [R] Reordering inputs

2011-05-11 Thread Carl Witthoft
Matrices just *are* . They don't have inputs or outputs. Can you provide an example of what you are trying to do? From: Dat Mai Date: Wed, 11 May 2011 19:43:23 + Hello All, I have 2 matrices consisting of the same inputs, but having different outputs. I created a heatmap for both of

Re: [R] displaying derived coefficients in lm

2011-05-11 Thread Greg Snow
Look at the dummy.coef function. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of James Lawrence > Sent: Wedne

Re: [R] Total effect of X on Y under presence of interaction effects

2011-05-11 Thread Greg Snow
Just to add to what David already said, you might want to look at the Predict.Plot and TkPredict functions in the TeachingDemos package for a simple interface for visualizing predicted values in regression models. These plots are much more informative than a single number trying to capture tota

[R] Problem with constrained optimization with maxBFGS

2011-05-11 Thread Leonardo Monasterio
Dear all, I need to maximize the v: v= D' W D D is a column vector ( n , 1) W is a given matrix (n, n) subject to: sum D= 1 (BTW, n is less than 300) I´ve tried to use maxBFGS, as follows: # objectiveFunction<-function(x) { return(t(D)%*%W%*%D) } Amat

Re: [R] Cumsum in Lattice Panel Function

2011-05-11 Thread Elliot Joel Bernstein
That worked perfectly. Thanks! - Elliot On Mon, May 09, 2011 at 12:20:36AM +0530, Deepayan Sarkar wrote: > On Fri, May 6, 2011 at 9:24 PM, Elliot Joel Bernstein > wrote: > > I'm trying to create an xyplot with a "groups" argument where the y-variable > > is the cumsum of the values stored in the

Re: [R] sample weights in ols

2011-05-11 Thread Thomas Lumley
On Thu, May 12, 2011 at 2:43 AM, jour4life wrote: > I have a follow up question. When using svyglm, it does not matter that I am > not using survey design and only weights? > In other words, > > fit<-svyglm(y~x1+x2+...xk,data=dataset,weights=weightvariable) > > Or am I going to have to construct a

Re: [R] Help with contrasts

2011-05-11 Thread Guelman, Leo
Or alternatively (though very similar to Peter's idea) you can do ci <- contrasts formals(ci)$contrasts <- FALSE dd <- data.frame(a = gl(3,4), b = gl(4,1,12)) mm <- model.matrix(~ a + b, dd, contrasts = list(a=ci(dd$a), b=ci(dd$b))) Best, Leo. -Original Message- From: r-help-boun...@r-p

[R] Reordering inputs

2011-05-11 Thread Dat Mai
Hello All, I have 2 matrices consisting of the same inputs, but having different outputs. I created a heatmap for both of them; the point is to compare them side by side. The best way to organize the inputs is to make sure that the order of the inputs are the same for both heatmaps. How would I go

Re: [R] ddply with mean and max...

2011-05-11 Thread Hadley Wickham
> Thats the ticket!  So mean is already set up to operate on columns but max and > min are not?  I guess its not too important now I know ... but whats going on > in > the background that makes that happen? Basically, this: > mean.data.frame function (x, ...) sapply(x, mean, ...) > min.data.fra

Re: [R] hierarchical clustering within a size limit

2011-05-11 Thread Peter Langfelder
On Wed, May 11, 2011 at 10:12 AM, rna seq wrote: > Hello List, > > I am trying to implement a hierarchical cluster using the hclust method > agglomerative single linkage method with a small wrinkle. I would like to > cluster a set of numbers on a number line only if they are within a distance > of

Re: [R] ddply with mean and max...

2011-05-11 Thread Scott Chamberlain
That's beyond my knowledge of plyr...S On Wednesday, May 11, 2011 at 12:31 PM, Justin wrote: > Scott Chamberlain gmail.com> writes: > > > > > How about this: > > > > ddply(test.set, .(site), colwise(max)) > > On Wednesday, May 11, 2011 at 11:46 AM, Justin wrote: > > > test.set<-data.frame(sit

Re: [R] ddply with mean and max...

2011-05-11 Thread Dennis Murphy
Hi: Try this: test.set<-data.frame(site=1:10,x=.Random.seed[1:100],y=rnorm(100)) str(test.set) 'data.frame': 100 obs. of 3 variables: $ site: int 1 2 3 4 5 6 7 8 9 10 ... $ x : int 403 10 -74327032 10380982 -951011855 1368411171 -390937486 -1081698620 -812257145 -1354214307 ... $ y :

[R] hierarchical clustering within a size limit

2011-05-11 Thread rna seq
Hello List, I am trying to implement a hierarchical cluster using the hclust method agglomerative single linkage method with a small wrinkle. I would like to cluster a set of numbers on a number line only if they are within a distance of 500. I would then like to print out the members of this list

Re: [R] ddply with mean and max...

2011-05-11 Thread Justin
Scott Chamberlain gmail.com> writes: > > How about this: > > ddply(test.set, .(site), colwise(max)) > On Wednesday, May 11, 2011 at 11:46 AM, Justin wrote: > > test.set<-data.frame(site=1:10,x=.Random.seed[1:100],y=rnorm(100)) > > means<-ddply(test.set,.(site),mean) > > means > > [[alt

Re: [R] Uploading CSV file into R

2011-05-11 Thread David Winsemius
On May 11, 2011, at 12:54 PM, Me wrote: Hi, I'm trying to upload two CSV files into R, Those are not csv files. They are webpages with query interfaces. They present the option of downloading the data as zipped files in various formats. and I'm having some trouble. I've used the inst

Re: [R] Uploading CSV file into R

2011-05-11 Thread peter dalgaard
On May 11, 2011, at 18:54 , Me wrote: > Hi, I'm trying to upload two CSV files into R, What kind of misconception leads you to consider a simple read operation as an "upload", I wonder. > and I'm having some trouble. > I've used the instructions I've found on the Web, but they haven't helped s

Re: [R] ddply with mean and max...

2011-05-11 Thread Scott Chamberlain
How about this: ddply(test.set, .(site), colwise(max)) On Wednesday, May 11, 2011 at 11:46 AM, Justin wrote: > test.set<-data.frame(site=1:10,x=.Random.seed[1:100],y=rnorm(100)) > means<-ddply(test.set,.(site),mean) > means [[alternative HTML version deleted]]

Re: [R] issue with graph package in using RBGL -‘'graph' is not a valid installed package’"

2011-05-11 Thread Duncan Murdoch
On 11/05/2011 10:51 AM, joe j wrote: Dear all, I am trying to run the function "lambdaSets" using the package "RBGL". This package uses another package "graph" which has been removed from the CRAN repository, but is available at the archive (http://cran.r-project.org/src/contrib/Archive/graph/).

Re: [R] issue with graph package in using RBGL -‘'graph' is not a valid installed package’"

2011-05-11 Thread Uwe Ligges
On 11.05.2011 16:51, joe j wrote: Dear all, I am trying to run the function "lambdaSets" using the package "RBGL". This package uses another package "graph" which has been removed from the CRAN repository, but is available at the archive (http://cran.r-project.org/src/contrib/Archive/graph/).

Re: [R] Adding legend to heatmap

2011-05-11 Thread Uwe Ligges
See ?legend and PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Uwe Ligges On 11.05.2011 16:23, rugma gopakumar wrote: Hello, Myself Rugma Gopakumar.I would like to know how to add a

Re: [R] Help with gam

2011-05-11 Thread Uwe Ligges
On 11.05.2011 17:22, Zsolt Macskasi wrote: Hi, I am a brand new user of R and I am trying to use the gam procedure with the package mgcv. I did a bit of my homework by consulting the R-manual, as well as the mgcv manual written by Simon Wood. I admit it was just a few hours, but what I am t

Re: [R] R versions for Red Hat Linux

2011-05-11 Thread Marc Schwartz
On May 11, 2011, at 10:12 AM, Marta Avalos wrote: > Dear all, > The latest R version available for Red Hat Linux is 2.10 (from November > 2009), whereas the latest version available for Debian, Suse or Ubuntu Linux > is 2.13 (from May 2011). > Has someone some information about the development/

Re: [R] R versions for Red Hat Linux

2011-05-11 Thread Uwe Ligges
On 11.05.2011 17:12, Marta Avalos wrote: Dear all, The latest R version available for Red Hat Linux is 2.10 (from November 2009), whereas the latest version available for Debian, Suse or Ubuntu Linux is 2.13 (from May 2011). Has someone some information about the development/release of new R ve

[R] Uploading CSV file into R

2011-05-11 Thread Me
Hi, I'm trying to upload two CSV files into R, and I'm having some trouble. I've used the instructions I've found on the Web, but they haven't helped so far. I'm worried this could be because I'm using a Mac. The two data sets are here: http://data.un.org/Data.aspx?d=WDI&f=Indicator_Code%3aNY.GNP.

[R] Help with gam

2011-05-11 Thread Zsolt Macskasi
Hi, I am a brand new user of R and I am trying to use the gam procedure with the package mgcv. I did a bit of my homework by consulting the R-manual, as well as the mgcv manual written by Simon Wood. I admit it was just a few hours, but what I am trying to do is really basic. Essentially, what

[R] ddply with mean and max...

2011-05-11 Thread Justin
I'm trying to use ddply to compute summary statistics for many variables splitting on the variable site. however, it seems to work fine for mean() but if i use max() or min() things fall apart. whats going on? test.set<-data.frame(site=1:10,x=.Random.seed[1:100],y=rnorm(100)) means<-ddply(test

[R] R versions for Red Hat Linux

2011-05-11 Thread Marta Avalos
Dear all, The latest R version available for Red Hat Linux is 2.10 (from November 2009), whereas the latest version available for Debian, Suse or Ubuntu Linux is 2.13 (from May 2011). Has someone some information about the development/release of new R versions for Red Hat? Thank you in advanc

Re: [R] sample weights in ols

2011-05-11 Thread jour4life
I have a follow up question. When using svyglm, it does not matter that I am not using survey design and only weights? In other words, fit<-svyglm(y~x1+x2+...xk,data=dataset,weights=weightvariable) Or am I going to have to construct a survey design variable, using only the weight variable? Than

[R] issue with graph package in using RBGL -‘'graph' is not a valid installed package’"

2011-05-11 Thread joe j
Dear all, I am trying to run the function "lambdaSets" using the package "RBGL". This package uses another package "graph" which has been removed from the CRAN repository, but is available at the archive (http://cran.r-project.org/src/contrib/Archive/graph/). I installed the package from the R me

Re: [R] deleting rows containing a letter

2011-05-11 Thread chris20
Excellant! Thanks both for your replies. I've never used grep, I do use negative indexing but usually: -which(. %in% -- View this message in context: http://r.789695.n4.nabble.com/deleting-rows-containing-a-letter-tp3514473p3514829.html Sent from the R help mailing list archive at Nabb

[R] Adding legend to heatmap

2011-05-11 Thread rugma gopakumar
Hello, Myself Rugma Gopakumar.I would like to know how to add a legend to a heatmap.. Regards, Rugma Gopakumar. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] ANOVA 1 too few degrees of freedom

2011-05-11 Thread Rovinpiper
Please read the first two paragraphs of Details from ?formula Ok, I just did. So, If I understand this properly, the term Plot*Day would include both the main effects of a and b and their second order interactions. So it could be written Plot + Day + Plot:Day. The term Plot:Day includes only

[R] Init nnetTs (or nnet?) with a former Neural Net

2011-05-11 Thread c2r
I am new to R and use nnetTs - calls. If a time series of let's say 8 Datapoints and did call nnetTs I want make a new net for the old ponts plus the next 1000 points (81000 datapoints total) what would again cost much calculation time. So I want to pre-init the new net with the former wonnen

Re: [R] ggplot2 and add circle

2011-05-11 Thread Dennis Murphy
Hi: Here's a slight modification of the earlier code . plot_shad <- function(d, r, dtxt) { require('ggplot2') plotdata <- melt(d) names(plotdata)<-c('x','y','z') xc <- mean(range(plotdata$x)) yc <- mean(range(plotdata$y)) theta <- seq(-pi, pi, length = 200) circ <- data.frame(xv = x

Re: [R] Reading a large netCDF file using R

2011-05-11 Thread David William Pierce
On Tue, May 10, 2011 at 10:17 AM, Sulochan Dhungel < sulochandhun...@gmail.com> wrote: > Hi Dave, > > I asked for the climate group for one particular day's data so that I could > match it up with the data I got from the codes for the same day. It did not > match. So I knew it was not working. Als

Re: [R] Parantheses highlighting

2011-05-11 Thread Ista Zahn
This question is probably more appropriate for R-sig-mac (https://stat.ethz.ch/mailman/listinfo/r-sig-mac). Best, Ista On Wed, May 11, 2011 at 8:45 AM, Sascha Wolfer wrote: > Dear list, > > is it just me or is everybody experiencing this? > Since the upgrade to R 2.13.0 on my Mac (OS X 10.6.7, R

[R] Problems with tcltk

2011-05-11 Thread Arnaud Mosnier
Dear R-helpers, I am using R x64 and when I want to load the tcltk library, it gives me the following error: Loading Tcl/Tk interface ...Error : .onLoad failed in loadNamespace() for 'tcltk', details: call: inDL(x, as.logical(local), as.logical(now), ...) error: unable to load shared object '

Re: [R] Repeating an MLE experiement

2011-05-11 Thread David Winsemius
On May 11, 2011, at 9:28 AM, NUFC09 wrote: Ive been given an normal distribution, and have calculated the maximum likelihood function. I need to repeat this experiment 50 times, and 200 times, and plot the results in two histograms and compare them. I need to create a code to repeat this ex

Re: [R] deleting rows containing a letter

2011-05-11 Thread David Winsemius
On May 11, 2011, at 10:01 AM, David Winsemius wrote: On May 11, 2011, at 7:55 AM, chris20 wrote: Hi I have dataframe with different plot numbers in and different subplots as letters at the end of the plot number i.e. 1a, 1b 2-1a etc. I want to delete all rows that end in a specific letter

Re: [R] deleting rows containing a letter

2011-05-11 Thread David Winsemius
On May 11, 2011, at 7:55 AM, chris20 wrote: Hi I have dataframe with different plot numbers in and different subplots as letters at the end of the plot number i.e. 1a, 1b 2-1a etc. I want to delete all rows that end in a specific letter eg... treat<-c("1a","1b","1c","2a","2b","2c","2-1a","2

[R] Repeating an MLE experiement

2011-05-11 Thread NUFC09
Ive been given an normal distribution, and have calculated the maximum likelihood function. I need to repeat this experiment 50 times, and 200 times, and plot the results in two histograms and compare them. I need to create a code to repeat this experiment. How do i go about doing this? Thanks --

[R] deleting rows containing a letter

2011-05-11 Thread chris20
Hi I have dataframe with different plot numbers in and different subplots as letters at the end of the plot number i.e. 1a, 1b 2-1a etc. I want to delete all rows that end in a specific letter eg... treat<-c("1a","1b","1c","2a","2b","2c","2-1a","2-1b","2-1c") a1<-1:9 b1<-9:1 d1<-data.frame(treat,a

[R] displaying derived coefficients in lm

2011-05-11 Thread James Lawrence
Hello R-help, Is there a way to get R to tell you the coefficients in a lm that it wouldn't normally tell you because of identifiability constraints? For instance, if you use contr.sum() to generate contrasts for a factor, say ## y <- some data ## x <- a factor with levels 1:6 contrasts(x) <-

Re: [R] Dotplot (package Hmisc) with groups: colours and symbols

2011-05-11 Thread Hugo Mildenberger
Hello Esther, you left out the ellipsis argument (...) to the panel function. That argument serves a placeholder for the rest of the parameters you did not want to name and pass explicitely. If you don't pass the ellipsis to panel.Dotplot, all unnamed parameters will get default values. You can

Re: [R] Total effect of X on Y under presence of interaction effects

2011-05-11 Thread David Winsemius
On May 11, 2011, at 4:26 AM, Michael Haenlein wrote: Dear all, this is probably more a statistics question than an R question but probably there is somebody who can help me nevertheless. I'm running a regression with four predictors (a, b, c, d) and all their interaction effects using lm

Re: [R] Vermunt's LEM in R

2011-05-11 Thread David Joubert
Thanks, I have looked at this package but I am still trying to understand some of the features. It looks interesting, though. David J > Date: Wed, 11 May 2011 15:05:32 +0200 > From: i.vis...@uva.nl > To: dav...@qimr.edu.au > CC: r-help@r-project.org > Subject: Re: [R] Vermunt's LEM in R > > de

Re: [R] Vermunt's LEM in R

2011-05-11 Thread David Joubert
Thanks, I will definitely give it a try. David J > Date: Wed, 11 May 2011 21:04:23 +1000 > From: dav...@qimr.edu.au > To: r-help@r-project.org > CC: jo...@hotmail.com > Subject: Re: [R] Vermunt's LEM in R > > I don't know of any R package that can match all the functionality of LEM > eg fittin

Re: [R] Vermunt's LEM in R

2011-05-11 Thread David Joubert
Thanks for the info. It would be nice to transition LEM to R (make it a package), but I don't know how much work that would take. It's not updated anymore and as far as I know it's not open source. Perhaps Vermunt would be open to share his code. In R it's just a question of finding the right p

[R] filtering out unwanted words in a Term Document Matrix

2011-05-11 Thread Heiman, Thomas J.
Hi Y'all, I am using the text mining package (tm). I am trying to filter out all of the words in a Term Document Matrix that are not in a list of words that I am interested in. I am using the following code: z<-tm_intersect(txt.dtm, c("communications", "safety", "climate", "blood", "surface",

Re: [R] Vermunt's LEM in R

2011-05-11 Thread Ingmar Visser
depmixS4 can fit equality constraints in latent class and latent markov models, best, Ingmar On Wed, May 11, 2011 at 1:04 PM, David Duffy wrote: > I don't know of any R package that can match all the functionality of LEM > eg fitting equality constraints to model parameters a la LISREL. > > WRT

[R] Parantheses highlighting

2011-05-11 Thread Sascha Wolfer
Dear list, is it just me or is everybody experiencing this? Since the upgrade to R 2.13.0 on my Mac (OS X 10.6.7, R GUI 1.40 (5751)) the highlighting of matching parantheses doesn't work the way it used to. It doesn't highlight the matching parantheses while typing, but it still does while scro

Re: [R] Recompile a package

2011-05-11 Thread Prof Brian Ripley
On Wed, 11 May 2011, Uwe Ligges wrote: 1. Upgrade to a recent version of R. 2. download the whole source package and untar it 3. change the files 4. R CMD build it 5. R CMD INSTALL it For more details see the manual R Installation and Administration as well as Writing R Extensions if the Fortr

Re: [R] Adding reference line or plane to cloud or wireframe

2011-05-11 Thread Duncan Murdoch
On 11/05/2011 7:12 AM, Riley, Steve wrote: All, I am wondering how one might add a reference line or plane to a cloud or wireframe plot. I have been unable to figure this out. Let's say I would like to draw a reference for some value of wt in the example below: cl<- 54.1 age<- 10:80 wt<-

Re: [R] Help with contrasts

2011-05-11 Thread peter dalgaard
On May 11, 2011, at 12:51 , Lars Bishop wrote: > Hi, > > I need to build a function to generate one column for each level of a factor > in the model matrix created on an arbitrary formula (instead of using the > available contrasts options such as contr.treatment, contr.SAS, etc). > > My approa

[R] Adding reference line or plane to cloud or wireframe

2011-05-11 Thread Riley, Steve
All, I am wondering how one might add a reference line or plane to a cloud or wireframe plot. I have been unable to figure this out. Let's say I would like to draw a reference for some value of wt in the example below: cl <- 54.1 age <- 10:80 wt <- 25:160 sim <- expand.grid(age = age,

Re: [R] metaMDS and envfit: Help reading output

2011-05-11 Thread Michael Denslow
Hi Katie, On Tue, May 10, 2011 at 4:51 PM, Songer, Katherine B - DNR wrote: > Hello R experts, > > I've used metaMDS to run NMDS on some fish abundance data, and am also > working on correlating environmental data to the NMDS coordinates. I'm fairly > new to metaMDS and NMDS in general, so I ha

Re: [R] Vermunt's LEM in R

2011-05-11 Thread David Duffy
I don't know of any R package that can match all the functionality of LEM eg fitting equality constraints to model parameters a la LISREL. WRT dumping tables, I would have thought that as.data.frame.table does pretty much what you want, [not tested] newtab <- as.data.frame(table(a,b,c)) cat("

Re: [R] Dotplot (package Hmisc) with groups: colours and symbols

2011-05-11 Thread Peter Ehlers
On 2011-05-11 02:11, E Hofstadler wrote: Hello all, This question concerns the function Dotplot from the Hmisc package. My aim is to compare values between groups in each panel of the Dotplot, with the values of different groups clearly distinguishable by different symbols. All lines and symbol

[R] Help with contrasts

2011-05-11 Thread Lars Bishop
Hi, I need to build a function to generate one column for each level of a factor in the model matrix created on an arbitrary formula (instead of using the available contrasts options such as contr.treatment, contr.SAS, etc). My approach to this was first to use the built-in function for contr.tre

Re: [R] Loop over a split string

2011-05-11 Thread peter dalgaard
On May 11, 2011, at 11:35 , Joel wrote: > Thx > > Paul > > My string aint that simple its just that if it works for this simple example > it will work for my string therefor I just used the "a b c d e f" syntax. > strsplit(string," ") [[1]] [1] "a" "b" "c" "d" "e" "f" > strsplit(string," ")[

Re: [R] Loop over a split string

2011-05-11 Thread Joel
Thx Paul My string aint that simple its just that if it works for this simple example it will work for my string therefor I just used the "a b c d e f" syntax. -- View this message in context: http://r.789695.n4.nabble.com/Loop-over-a-split-string-tp3514204p3514252.html Sent from the R help mai

Re: [R] Loop over a split string

2011-05-11 Thread Paul Hiemstra
Hi Joel, This looks so much like homework I would give studens that I'm not surprised Uwe jumped to conclusions... ontopic: You did not specify your earlier attempts, just that they failed. This makes it hard for us to judge what went wrong. Using strsplit I would do: string<-"a b c d e f" # Th

Re: [R] Loop over a split string

2011-05-11 Thread Joel
This is no homework, Im just trying to learn R but sorry for wasting your time you all mighty God of R Uwe Ligges. And if this is not a forum to ask simple questions can you please redirect me to where I might get help? //Joel -- View this message in context: http://r.789695.n4.nabble.com/Loop

Re: [R] Loop over a split string

2011-05-11 Thread Uwe Ligges
On 11.05.2011 11:12, Joel wrote: Hi I got a string that looks like this: string<-"a b c d e f" And what I wanna do is loop trough all the letters. like for(i in string){ print(i) } would render the result: a b c d e f Ive tried using strsplit but without result, dose anyone know how I c

Re: [R] Recompile a package

2011-05-11 Thread Uwe Ligges
1. Upgrade to a recent version of R. 2. download the whole source package and untar it 3. change the files 4. R CMD build it 5. R CMD INSTALL it For more details see the manual R Installation and Administration as well as Writing R Extensions if the Fortran changes are not trivial or you need o

[R] Loop over a split string

2011-05-11 Thread Joel
Hi I got a string that looks like this: string<-"a b c d e f" And what I wanna do is loop trough all the letters. like for(i in string){ print(i) } would render the result: a b c d e f Ive tried using strsplit but without result, dose anyone know how I could make this happen? //Joel -- Vie

[R] Dotplot (package Hmisc) with groups: colours and symbols

2011-05-11 Thread E Hofstadler
Hello all, This question concerns the function Dotplot from the Hmisc package. My aim is to compare values between groups in each panel of the Dotplot, with the values of different groups clearly distinguishable by different symbols. All lines and symbols should be coloured in black. Before addi

[R] Recompile a package

2011-05-11 Thread Yuliya Matveyeva
Hello, dear R community. The thing is that I am not in the least a developer, neither do I want to create a package of my own. But recently I have found a package LogicForest, which is in the base written in Fortran I think. And well, in its manual it is written that there are several parameters t

[R] Total effect of X on Y under presence of interaction effects

2011-05-11 Thread Michael Haenlein
Dear all, this is probably more a statistics question than an R question but probably there is somebody who can help me nevertheless. I'm running a regression with four predictors (a, b, c, d) and all their interaction effects using lm. Based on theory I assume that a influences y positively. In