[R] multiple correlation coefficient R

2010-05-03 Thread ravikumar sukumar
Dear All, How to calculate multiple correlation coefficient R, using R. regards, Sukumar [[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 h

Re: [R] Welcome to the "R-help" mailing list (Digest mode)

2010-05-03 Thread ravikumar sukumar
Dear All, How to calculate multiple correlation coefficient R, using R. regards, Sukumar [[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 h

[R] error in La.svd Lapack routine 'dgesdd'

2010-05-03 Thread steven mosher
Error in La.svd(x, nu, nv) : error code 1 from Lapack routine ‘dgesdd’ what resources are there to track down errors like this [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

Re: [R] / Operator not meaningful for factors

2010-05-03 Thread Don MacQueen
At 3:50 PM -0700 5/3/10, John Kane wrote: I think that you are correct. R has the annoying habit of converting character data to factors when you don't want it to while it is importing data. This is because the in the option "stringsAsFactors" is set to TRUE for some weird historical reasons

Re: [R] Adding a header after the file is written

2010-05-03 Thread steven mosher
thanks.. worked On Mon, May 3, 2010 at 3:24 PM, Ted Harding wrote: > On 03-May-10 21:19:34, steven mosher wrote: > > The situation arises where I open a file to write a data.frame > > to it. with write.table. > > > > multiple lines are written to the file and the file is kept in > > Append=TRUE

Re: [R] Estimating theta for negative binomial model

2010-05-03 Thread Prof Brian Ripley
On Mon, 3 May 2010, Tim Clark wrote: Dear List, I am trying to do model averaging for a negative binomial model using the package AICcmodavg. I need to use glm() since the package does not accept glm.nb() models. I can get glm() to work if I first run glm.nb and take theta from that model,

Re: [R] ISO Eric Kort (rtiff)

2010-05-03 Thread Prof Brian Ripley
On Mon, 3 May 2010, Carl Witthoft wrote: I wanted to ask Eric a question or two about the rtiff package, but his listed email address bounces w/ 550 error. Does anyone know how to reach him, or whether he's actively maintaining rtiff? He is not. The latest version of rtiff was done by the

Re: [R] Objective: to create a Joint Probability Table and save as a csv file (with headers).Input: A csv file (with headers) containing raw data, arranged by columns.Variable: number of bins for each

2010-05-03 Thread Ista Zahn
Hi Roscoe, I couldn't make it though that excel worksheet without my eyes glazing over... but do you want something like data(mtcars) tab <- xtabs(~cyl + gear, data=mtcars) tab/sum(tab) ? Best, Isat On Mon, May 3, 2010 at 10:08 PM, Roscoe wrote: > Dear R-Help, > > First post, be gentle... > >

Re: [R] Need help on having multiple distributions in one graph

2010-05-03 Thread Jorge Ivan Velez
Hi Joseph, How about this? matplot(cbind(m0, m1, m3, m4), type = 'l', lty = 1) legend('topright', paste('m', c(0, 1, 3, 4), sep = ""), lty = 1, col = 1:4) See ?matplot and ?legend for details. HTH, Jorge On Mon, May 3, 2010 at 6:42 PM, <> wrote: > R-listers: > > I have searched the help file

Re: [R] advice?

2010-05-03 Thread David Winsemius
On May 3, 2010, at 9:48 PM, Daniel Malter wrote: Hi, on the one hand, you write "fairly large," on the other hand, you write "should be readable by anything." The warnings indicate that you are plain out of memory at some point. Not too surprising, given that your dataset has about 45

[R] Objective: to create a Joint Probability Ta ble and save as a csv file (with headers).In put: A csv file (with headers) containing ra w data, arranged by columns.Variable: number of bins for each

2010-05-03 Thread Roscoe
Dear R-Help, First post, be gentle... I am new to R: I can perform basic functions using R code - import and export data, load packages and not much else at this stage. Objective: to create a Joint Probability Table and save as a csv file (with headers). Input: A csv file (with headers) contai

Re: [R] Help needed with legend

2010-05-03 Thread Nish
Thank you. It works! -- View this message in context: http://r.789695.n4.nabble.com/Help-needed-with-legend-tp2124457p2124857.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailm

Re: [R] Need help on having multiple distributions in one graph

2010-05-03 Thread jhilbe
R-listers: I have searched the help files and everything I have related to R graphics. I cannot find how to graph y against several distributions on a single graph. Here is code for creating 4 Poisson distributions with different mean values, although I would prefer having it in a loop: The to

[R] Estimating theta for negative binomial model

2010-05-03 Thread Tim Clark
Dear List, I am trying to do model averaging for a negative binomial model using the package AICcmodavg. I need to use glm() since the package does not accept glm.nb() models. I can get glm() to work if I first run glm.nb and take theta from that model, but is there a simpler way to estimate

Re: [R] Analyzing non-numerical data

2010-05-03 Thread GlenB
This is not really the correct forum, but very briefly, and in rough order of complexity, you can do a summary (which counts the occurences of the categories in a factor), you could look at crosstabulations of questions (e.g ?table, ?tabulate, ?chisq.test), and also measures of association in tabl

Re: [R] Adding a header after the file is written

2010-05-03 Thread steven mosher
Ok I will try that. I think I set it to False when I tried it the first time, maybe that was my mistake On Mon, May 3, 2010 at 3:28 PM, Ista Zahn wrote: > Hi Steve, > I think you just need to set col.names = FALSE (instead of col.names > =NULL) on subsequent writes. > > -Ista > > On Mon, May 3,

Re: [R] Comparing the correlations coefficient of two (very) dependent samples

2010-05-03 Thread Mike Cheung
Dear Tal, There are several approaches in doing it (see Steiger, 2003). It should not be difficult to implement them in R. Steiger, J.H. (2003). Comparing correlations. In A. Maydeu-Olivares (Ed.) Psychometrics. A festschrift to Roderick P. McDonald. Mahwah, NJ: Lawrence Erlbaum Associates. http

Re: [R] Help needed with legend

2010-05-03 Thread Thomas Stewart
Something like this? plot(0,0) legend.text<-c("VAR 1","Higher","Average","Lower","VAR 2","Higher","Average","Lower") legend.pch=1:8 legend.col=c(0,1,1,1,0,1,1,1) legend("bottomright",legend=legend.text,pch=legend.pch,col=legend.col,ncol=2) -tgs On Mon, May 3, 2010 at 3:10 PM, Nish wrote: > > H

Re: [R] advice?

2010-05-03 Thread Daniel Malter
Hi, on the one hand, you write "fairly large," on the other hand, you write "should be readable by anything." The warnings indicate that you are plain out of memory at some point. Not too surprising, given that your dataset has about 45 rows and 720 columns. You may search the r-help files firs

Re: [R] / Operator not meaningful for factors

2010-05-03 Thread Erik Iverson
The stringAsFactors = False option did not work either. False <> FALSE in addition Vincent was getting an error since he used stringAsFactors, instead of stringsAsFactors as the argument name. __ R-help@r-project.org mailing list https://stat

Re: [R] / Operator not meaningful for factors

2010-05-03 Thread jim holtman
Check you input data. You have some non-numeric characters in columns where you are expecting numerics. The parameter is stringsAsFactors=FALSE You had it spelt wrong. After reading in your data, do the conversion to numeric and then examine which locations contain NA; this will point you to t

[R] ISO Eric Kort (rtiff)

2010-05-03 Thread Carl Witthoft
I wanted to ask Eric a question or two about the rtiff package, but his listed email address bounces w/ 550 error. Does anyone know how to reach him, or whether he's actively maintaining rtiff? If anyone's interested, my primary desire is for rtiff (or other tool) to provide me with the raw

Re: [R] / Operator not meaningful for factors

2010-05-03 Thread David Winsemius
On May 3, 2010, at 7:21 PM, vincent.deluard wrote: Hi John, Thanks for responding so quickly. So I tried: Test2[1:3,1:3]) 'data.frame': 3 obs. of 3 variables: $ Date : Factor w/ 2480 levels "A UN Equity",..: 1033 2396 613 $ X4.20.2010: Factor w/ 1994 levels "0.24","0.33",..: 953

Re: [R] / Operator not meaningful for factors

2010-05-03 Thread vincent.deluard
Hi John, Thanks for responding so quickly. So I tried: Test2[1:3,1:3]) 'data.frame': 3 obs. of 3 variables: $ Date : Factor w/ 2480 levels "A UN Equity",..: 1033 2396 613 $ X4.20.2010: Factor w/ 1994 levels "0.24","0.33",..: 953 497 1814 $ X4.19.2010: Factor w/ 1957 lev

Re: [R] advice?

2010-05-03 Thread David Winsemius
On May 3, 2010, at 6:16 PM, Carson Baughman wrote: All- Thank you in advance for any help you might be able to lend. Here is my issue. I am trying to open a fairly large .dat file. The file originally was downloaded as a GZ file but I unzipped it (with 7- zip) into it's current 1.8

Re: [R] / Operator not meaningful for factors

2010-05-03 Thread vincent.deluard
Hi David, Thanks for the prompt answer. In this file, I have cut the data to the first 15 columns. Here is the code: t2 <- read.csv('Test2.csv', sep=",", header=TRUE) > Test2[2,2] [1] 18.72 1994 Levels: 0.24 0.33 0.49 0.53 0.65 0.67 0.72 0.76 0.88 0.9 0.94 ... 98.88 > Test2[2,2]+1

Re: [R] Help needed with legend

2010-05-03 Thread John Kane
A small executable example would help here. We don't even know how you are graphing this. There are several packages including lattice and ggplot as well as the base graphs. If you are doing this in base graphics have a look at ?text --- On Mon, 5/3/10, Nish wrote: > From: Nish > Subject:

Re: [R] / Operator not meaningful for factors

2010-05-03 Thread John Kane
I think that you are correct. R has the annoying habit of converting character data to factors when you don't want it to while it is importing data. This is because the in the option "stringsAsFactors" is set to TRUE for some weird historical reasons. Try the command str(insert name of data)

[R] Controlling panel.text

2010-05-03 Thread Santosh
Dear R gurus, A re-post due to suggestions from moderators. Thanks to tips from Gabor and Felix, I was able to make some progress.. How do I control the position of panel.text? I would like the text appear at a specific position (say, top right corner) inside a panel. Below is the sample code

[R] advice?

2010-05-03 Thread Carson Baughman
All- Thank you in advance for any help you might be able to lend. Here is my issue. I am trying to open a fairly large .dat file. The file originally was downloaded as a GZ file but I unzipped it (with 7-zip) into it's current 1.86 gig .dat format. I know that the data is "just a plain A

[R] Labels in GLMNET

2010-05-03 Thread RichS
In the ESL(2) (by F-H-T), they have labels on their Lasso graphs (specifically for the South African Heart Disease data). So my question is, how do I label each variable in a similar way on my graph. The following code should produce a plot with 9 enumerated variables: library(glmnet) x=mat

[R] Help needed with legend

2010-05-03 Thread Nish
Hello, I am new to R and need some help with the legend. How can I add a legend for two variables (in two columns) each having multiple values to be explained in the legend. For example: Var 1 Var 2 - Higher - Higher - Avg - Avg - Lower

Re: [R] / Operator not meaningful for factors

2010-05-03 Thread David Winsemius
On May 3, 2010, at 6:22 PM, vincent.deluard wrote: Hi there, This will sound very stupid because I just started using R but I see you had similar problems. I just loaded a very large dataset (2950*6602) from csv into R. The format is ticker=row, date=column. Not a particularly precis

Re: [R] Adding a header after the file is written

2010-05-03 Thread Ista Zahn
Hi Steve, I think you just need to set col.names = FALSE (instead of col.names =NULL) on subsequent writes. -Ista On Mon, May 3, 2010 at 5:19 PM, steven mosher wrote: > The situation arises where I open a file to write a data.frame to it. with > write.table. > > multiple lines are written to the

Re: [R] Adding a header after the file is written

2010-05-03 Thread Ted Harding
On 03-May-10 21:19:34, steven mosher wrote: > The situation arises where I open a file to write a data.frame > to it. with write.table. > > multiple lines are written to the file and the file is kept in > Append=TRUE > mode. > > If one sets the col.names to the names of the variables being > wri

Re: [R] / Operator not meaningful for factors

2010-05-03 Thread vincent.deluard
Hi there, This will sound very stupid because I just started using R but I see you had similar problems. I just loaded a very large dataset (2950*6602) from csv into R. The format is ticker=row, date=column. Every time I want to compute basic operations, R returns "In Ops.factor: not meaningful

Re: [R] LMER docuentation could be improved WAS: Re: getting parts returned by lmer

2010-05-03 Thread Ista Zahn
Dear John, The R documentation is of course not "perfect", but it is (in my estimation) quite good. See more specific responses below, keeping in mind that I'm actually pretty ignorant of this things myslef. On Mon, May 3, 2010 at 4:44 PM, John Sorkin wrote: > Many thanks to both David and Ista.

[R] Adding a header after the file is written

2010-05-03 Thread steven mosher
The situation arises where I open a file to write a data.frame to it. with write.table. multiple lines are written to the file and the file is kept in Append=TRUE mode. If one sets the col.names to the names of the variables being written, you have output that looks like this... name1 name2 na

[R] extended Kalman filter for survival data

2010-05-03 Thread christophe dutang
Dear all, I'm looking for an implementation of the generalized extended Kalman filter for survival data, presented in this article Fahrmeir (1994) - 'dynamic modelling for discrete time survival data'. The same author also publish a Bayesian version of the algorithm 'dynamic discrete-time duration

[R] LMER docuentation could be improved WAS: Re: getting parts returned by lmer

2010-05-03 Thread John Sorkin
Many thanks to both David and Ista. I think that my question regarding extracting items returned from lmer points out a weakness of R, viz. less than perfect documentation. I know that R is written by volunteers, all of whom I cherish, yet having to ask the listserve for a question as basic as

[R] Analyzing non-numerical data

2010-05-03 Thread Ottar Kvindesland
After having read through some literature on R, I am happy with collecting it, and visualizing numbers. Unfortunately I do find it hard to compare and visualize string data. The data is from a LimeSurvey with lots of YES/NO or multi-choice questions (check-boxes) Among the check-boxes there a coup

Re: [R] Highlight Points in a Plot

2010-05-03 Thread SamT
Thanks David, the text() worked for me. I wasnt able to correctly use plot with points and the ecdf function. David Winsemius wrote: > > > Yes, ecdf() which returns a function > > points(c(50,55,60,65), ecdf(1:1000)( c(50,55,60,65) ), col=c("red", > "green", "yellow", "blue") ) > > Draws

Re: [R] Errors when trying to open odfWeave documents

2010-05-03 Thread Max Kuhn
I tried with this: > sessionInfo() R version 2.10.1 (2009-12-14) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [

Re: [R] Highlight Points in a Plot

2010-05-03 Thread David Winsemius
On May 3, 2010, at 3:16 PM, SamT wrote: For simplicity we'll assume my code looks as follows plot(ecdf(1:1000)) which produces a diagonal line. Ideally, I'd like to highlight or label in a different color certain X values (say 50,55,60,65) Is there a function which will allow me to do this

Re: [R] Highlight Points in a Plot

2010-05-03 Thread SamT
For simplicity we'll assume my code looks as follows plot(ecdf(1:1000)) which produces a diagonal line. Ideally, I'd like to highlight or label in a different color certain X values (say 50,55,60,65) Is there a function which will allow me to do this? -- View this message in context: http

Re: [R] Find solution for an error in the condition of if

2010-05-03 Thread Duncan Murdoch
On 03/05/2010 2:43 PM, anderson nuel wrote: I will sur that problem is coming from the first part of the test. data[pa,k] is a vector because pa is a vector. Coud you help me to solve this error. If you want to test that all elements match, you should use all(data[pa, k] == df[, j]) &&

Re: [R] how to name the column after converting a vector to a data frame

2010-05-03 Thread Barry Rowlingson
On Mon, May 3, 2010 at 7:21 PM, wei x1 wrote: > > hell all: > > I have a vector as follows: > >> head(res) > 1007_s_at.value   1053_at.value    117_at.value    121_at.value > 1255_g_at.value >    0.225801033     0.009747404     0.709517954     0.008825740     0.496859178 >  1294_at.value >    0.0

Re: [R] rcolorbrewer

2010-05-03 Thread milton ruser
?rev On Mon, May 3, 2010 at 4:06 PM, Steve Hempell wrote: > Can you reverse the color scheme order in rcolorbrewer. If so, how? > >[[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/l

[R] rcolorbrewer

2010-05-03 Thread Steve Hempell
Can you reverse the color scheme order in rcolorbrewer. If so, how? [[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.org

Re: [R] Find solution for an error in the condition of if

2010-05-03 Thread anderson nuel
I will sur that problem is coming from the first part of the test. data[pa,k] is a vector because pa is a vector. Coud you help me to solve this error. Best Regards 2010/4/30 Duncan Murdoch > On 30/04/2010 4:19 AM, anderson nuel wrote: > >> Dear r-help, >> >> Could you help me to find a

[R] how to name the column after converting a vector to a data frame

2010-05-03 Thread wei x1
hell all: I have a vector as follows: > head(res) 1007_s_at.value 1053_at.value117_at.value121_at.value 1255_g_at.value 0.225801033 0.009747404 0.709517954 0.008825740 0.496859178 1294_at.value 0.005091231 after I convert the res into a data frame I got

[R] Comparing the correlations coefficient of two (very) dependent samples

2010-05-03 Thread Tal Galili
Hello all, I believe this can be done using bootstrap, but I am wondering if there is some other way that might be used to tackle this. #Let's say I have two pairs of samples: set.seed(100) s1 <- rnorm(100) s2 <- s1 + rnorm(100) x1 <- s1[1:99] y1 <- s2[1:99] x2 <- x1 y2 <- s2[2:100] #And both

Re: [R] how to rewrite this for loops in matrix form without loop

2010-05-03 Thread Henrique Dallazuanna
Or better: tapply(x0, y0, mean) On Mon, May 3, 2010 at 2:35 PM, Henrique Dallazuanna wrote: > Try this: > > rowsum(x0, y0)[,1]/table(y0) > > > On Mon, May 3, 2010 at 2:11 PM, song song wrote: > >> x0=rnorm(100) >> y0=rpois(100,3)+1 >> >> ind=as.data.frame(table(y0)) >> >> ind1=ind[,1] >> ind2=i

Re: [R] how to rewrite this for loops in matrix form without loop

2010-05-03 Thread Joshua Wiley
I believe you are trying to find the mean of x0 for each level (group) of y0. try this: by(x0, y0, mean) or if you want a vector (e.g., to merge into a matrix) c(by(x0, y0, mean)) Best regards, Josh On Mon, May 3, 2010 at 10:11 AM, song song wrote: > x0=rnorm(100) > y0=rpois(100,3)+1 > > in

Re: [R] how to rewrite this for loops in matrix form without loop

2010-05-03 Thread Henrique Dallazuanna
Try this: rowsum(x0, y0)[,1]/table(y0) On Mon, May 3, 2010 at 2:11 PM, song song wrote: > x0=rnorm(100) > y0=rpois(100,3)+1 > > ind=as.data.frame(table(y0)) > > ind1=ind[,1] > ind2=ind[,2] > > phi=NULL > for (i in 1:length(ind2)){ > phi[i]=sum(x0[y0==ind1[i]])/ind2[i] > } > >[[alterna

Re: [R] Highlight Points in a Plot

2010-05-03 Thread David Winsemius
On May 3, 2010, at 12:28 PM, SamT wrote: Hi, I have plotted a cdf using the ecdf function with plot(). Code would make this concrete. I want to highlight/identify points on the same plot. Also, because this is a cdf I am not sure of the y coords for the point, otherwise I thought of

Re: [R] how to rewrite this for loops in matrix form without loop

2010-05-03 Thread Dennis Murphy
as.vector(do.call(c, lapply(split(x0, y0), mean))) Test with data generated according to your code: > phi=NULL > for (i in 1:length(ind2)){ + phi[i]=sum(x0[y0==ind1[i]])/ind2[i] + } > phi [1] -0.18922774 0.36333115 -0.04295032 -0.13892563 -0.03968301 0.33326034 [7] 0.28649576 -0.03786830 > a

Re: [R] Run na.approx on dataset with some blank columns

2010-05-03 Thread Gabor Grothendieck
Here is a workaround: library(zoo) # test data z <- zoo(cbind(1:5, NA, c(1:3, NA, 5), NA)) ix <- colSums(!is.na(z)) > 0 z[, ix] <- na.approx(z[, ix]) On Mon, May 3, 2010 at 12:41 PM, Abiel X Reinhart wrote: > I am trying to run na.approx on a zoo object in which some of the columns > contain

Re: [R] Hierarchical factors

2010-05-03 Thread Ista Zahn
Hi Marshall, I'm not aware of any packages that implement these features as you described them. But most of the tasks are already fairly easy in R -- see below. On Mon, May 3, 2010 at 11:18 AM, Marshall Feldman wrote: > > Thanks for getting back so quickly Ista, > > I was actually casting about fo

Re: [R] Delete rows with duplicate field...

2010-05-03 Thread David Winsemius
On May 3, 2010, at 9:59 AM, someone wrote: I dont want to apply the unique for all columns but just the ID column. dataset[ !duplicated(dataset$ID), ] -- David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing list https://s

[R] Highlight Points in a Plot

2010-05-03 Thread SamT
Hi, I have plotted a cdf using the ecdf function with plot(). I want to highlight/identify points on the same plot. Also, because this is a cdf I am not sure of the y coords for the point, otherwise I thought of using highlight in the NCStats package. Thanks -- View this message in context:

Re: [R] question about the degrees of freedom

2010-05-03 Thread David Winsemius
On May 3, 2010, at 11:43 AM, serdal ozusaglam wrote: Hi Serdal, > There is a lot of confusion here (how much is yours and how much is > mine remains to be seen). See specific comments in line. Also inline comments. > > On Mon, May 3, 2010 at 9:19 AM, serdal ozusaglam > wrote: >> >> Dear R u

[R] Run na.approx on dataset with some blank columns

2010-05-03 Thread Abiel X Reinhart
I am trying to run na.approx on a zoo object in which some of the columns contain nothing by NA values. When I do this I get the following error: Error in approx(x[!na], y[!na], xout, ...) : need at least two non-NA values to interpolate Is there a way I can use na.approx with my dataset so t

[R] how to rewrite this for loops in matrix form without loop

2010-05-03 Thread song song
x0=rnorm(100) y0=rpois(100,3)+1 ind=as.data.frame(table(y0)) ind1=ind[,1] ind2=ind[,2] phi=NULL for (i in 1:length(ind2)){ phi[i]=sum(x0[y0==ind1[i]])/ind2[i] } [[alternative HTML version deleted]] __ R-help@r-project.org mailing list http

Re: [R] Delete rows with duplicate field...

2010-05-03 Thread Jorge Ivan Velez
How about yourdata[ !duplicated(yourdata$ID), ] ? See ?duplicated for more information. HTH, Jorge On Mon, May 3, 2010 at 9:04 AM, someone <> wrote: > > as a r noob i am having another problem: > i have a big dataframe where each row corresponds to one entry and each > column is a field... >

Re: [R] Delete rows with duplicate field...

2010-05-03 Thread Dennis Murphy
Hi: Here are three solutions; since this question comes up fairly often, you can find other solutions in the R-help archives. (1) Use functions from base R: split the data frame by ID, extract the first record from each split and slurp them together with rbind(): > do.call(rbind, lapply(sp

Re: [R] question about the degrees of freedom

2010-05-03 Thread serdal ozusaglam
Hi Serdal, > There is a lot of confusion here (how much is yours and how much is > mine remains to be seen). See specific comments in line. Also inline comments. > > On Mon, May 3, 2010 at 9:19 AM, serdal ozusaglam > wrote: >> >> Dear R users, >> >> >> I think i have a simple question w

Re: [R] What is the best way to have "R" output tables in an MS Word format?

2010-05-03 Thread Frank E Harrell Jr
On 05/03/2010 08:47 AM, Chris Evans wrote: Thanks Tal& Thomas, I am now experimenting with both SWord and R2wd and both are certainly a huge step forward for me, tied as I am to Word and the Windoze/M$ world for now. Chris Note that many of the general solutions offered produce documents (.do

Re: [R] question about the degrees of freedom‏

2010-05-03 Thread serdal ozusaglam
Thank you for your advice, ill try to be more explicit now, i wasnt in the first mail because i thought it is a simple question to answer, so; i have a panel data which contains 48858 observations during 3 year therefore, there are 146574 observations in total, i have 22 different industri

Re: [R] question about the degrees of freedom‏

2010-05-03 Thread serdal ozusaglam
Thank you for your advice, ill try to be more explicit now, i wasnt in the first mail because i thought it is a simple question to answer, so; i have a panel data which contains 48858 observations during 3 year therefore, there are 146574 observations in total, i have 22 different industries d

Re: [R] Hierarchical factors

2010-05-03 Thread Marshall Feldman
Thanks for getting back so quickly Ista, I was actually casting about for any examples of R software that deals with this kind of structure. But your question is a good one. Here are a few things I'd like to be able to do: * Store data in R at the finest level of detail but easily refer to

Re: [R] Delete rows with duplicate field...

2010-05-03 Thread someone
could you please elaborate a little more on that? -- View this message in context: http://r.789695.n4.nabble.com/Delete-rows-with-duplicate-field-tp2123939p2124055.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org m

Re: [R] Delete rows with duplicate field...

2010-05-03 Thread Lanna Jin
names() - Lanna Jin lanna...@gmail.com 510-898-8525 -- View this message in context: http://r.789695.n4.nabble.com/Delete-rows-with-duplicate-field-tp2123939p2124036.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-proje

Re: [R] Delete rows with duplicate field...

2010-05-03 Thread someone
I dont want to apply the unique for all columns but just the ID column. -- View this message in context: http://r.789695.n4.nabble.com/Delete-rows-with-duplicate-field-tp2123939p2124011.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Plotting the explanatory against the dependent in a GAM

2010-05-03 Thread Thomas Stewart
See example(gam) particularly plot(gam.object,se=TRUE). On Mon, May 3, 2010 at 5:20 AM, Oscar Saenz de Miera wrote: > > To whoever it may correspond, > > My name is Oscar Saenz and I am working on my thesis in Spain. > > I am using GAMs in "R" and, now that I have estimated my models, I need t

Re: [R] strange error msg from lapply and lm()

2010-05-03 Thread weix1
plus, it took long time to complete this analysis for only 24 records! Although I get the error msg, the result seems to be correct. -- View this message in context: http://r.789695.n4.nabble.com/strange-error-msg-from-lapply-and-lm-tp2124042p2124050.html Sent from the R help mailing list arch

[R] strange error msg from lapply and lm()

2010-05-03 Thread weix1
I am conducting a very simple t test for two genes using lapply (i try to avoid loop since i will have thousands of genes later on). however, I got strange error msg like the followings. It looks that R is complaining my factor has only one level, which is not the case (I check many times). > res

[R] MySQL and DATE data type

2010-05-03 Thread BrettGinsburg
Does anyone know how to deal with DATES in MySQL database connections? dbWriteTable converts dates in a data frame to a character. Thanks! -- Dr. Brett Ginsburg Assistant Professor Department of Psychiatry The University of Texas Health Science Center at San Antonio San Antonio, TX 78229 > 210-5

Re: [R] question about the degrees of freedom

2010-05-03 Thread David Winsemius
On May 3, 2010, at 10:38 AM, Ista Zahn wrote: Hi Serdal, There is a lot of confusion here (how much is yours and how much is mine remains to be seen). See specific comments in line. Also inline comments. On Mon, May 3, 2010 at 9:19 AM, serdal ozusaglam wrote: Dear R users, I think i h

Re: [R] question about the degrees of freedom

2010-05-03 Thread Ista Zahn
Hi Serdal, There is a lot of confusion here (how much is yours and how much is mine remains to be seen). See specific comments in line. On Mon, May 3, 2010 at 9:19 AM, serdal ozusaglam wrote: > > Dear R users, > > > I think i have a simple question which i want to explain by an example; > > i hav

Re: [R] getting parts returned by lmer

2010-05-03 Thread Ista Zahn
Hi John, David's advice is probably sufficient, but I thought I would just add the following example, showing how to find out what extractor functions have been defined for a particular s4 class: class(fm2) #find out the class of fm2 ("mer") showMethods(classes="mer") # find out what methods are d

Re: [R] getting parts returned by lmer

2010-05-03 Thread David Winsemius
On May 3, 2010, at 9:41 AM, John Sorkin wrote: R 2.10.0 windows XP I am trying to get the coefficients returned from lmer. Normally I would use the names function to get the objects returned by the function. This does not work in lmer, but it does for lm: When you read the help page for

[R] mblm, confint problem

2010-05-03 Thread Kay Cichini
hello, i did median based linear regression and computed conf.intervals for my coefficients. but something must have went wrong as the estimates are out of estimates confidence bounds. does someone know what is the problem here. i get warning messages about wilcox.test is not able to do calculat

Re: [R] Delete rows with duplicate field...

2010-05-03 Thread someone
thanks for your effort. to be more precise: ID , OS, time and many more are the columns. each entry is a row. when I do: x <- unique(dataset$ID) It just gives me a list of all IDs (levels). I want to get a dataframe where just one entry (row) for each ID is included... like: userA , Win, 12:

Re: [R] Delete rows with duplicate field...

2010-05-03 Thread Lanna Jin
if that doesn't work, maybe also try: if x is your data frame with length a columns, "unique(x[,1:a])". - Lanna Jin lanna...@gmail.com 510-898-8525 -- View this message in context: http://r.789695.n4.nabble.com/Delete-rows-with-duplicate-field-tp2123939p2123964.html Sent from the R help ma

Re: [R] Delete rows with duplicate field...

2010-05-03 Thread Lanna Jin
Did you try: if x is the data frame, unique(x)? - Lanna Jin lanna...@gmail.com 510-898-8525 -- View this message in context: http://r.789695.n4.nabble.com/Delete-rows-with-duplicate-field-tp2123939p2123956.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Hierarchical factors

2010-05-03 Thread Ista Zahn
Hi Marshell, What exactly do you mean by "handles this kind of data structure"? What do you want R to do? Best, Ista On Mon, May 3, 2010 at 9:44 AM, Marshall Feldman wrote: > Hello, > > Hierarchical factors are a very common data structure. For instance, one > might have municipalities within st

[R] Delete rows with duplicate field...

2010-05-03 Thread someone
as a r noob i am having another problem: i have a big dataframe where each row corresponds to one entry and each column is a field... for instance, i have the column ID and time and many more... Id like to get a dataframe where all IDs are just included once (some users with that ID might have sev

Re: [R] What is the best way to have "R" output tables in an MS Word format?

2010-05-03 Thread Chris Evans
Thanks Tal & Thomas, I am now experimenting with both SWord and R2wd and both are certainly a huge step forward for me, tied as I am to Word and the Windoze/M$ world for now. Chris Tal Galili sent the following at 01/05/2010 09:44: > Hi all, > I forwarded this question to the r-com mailing li

[R] Hierarchical factors

2010-05-03 Thread Marshall Feldman
Hello, Hierarchical factors are a very common data structure. For instance, one might have municipalities within states within countries within continents. Other examples include occupational codes, biological species, software types (R within statistical software within analytical software),

[R] getting parts returned by lmer

2010-05-03 Thread John Sorkin
R 2.10.0 windows XP I am trying to get the coefficients returned from lmer. Normally I would use the names function to get the objects returned by the function. This does not work in lmer, but it does for lm: <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy) > names(fm2) NU

Re: [R] Delete rows with duplicate field...

2010-05-03 Thread Lanna Jin
Try, unique(dataset[,1:a]), where a is the number of columns that you have. 1:a would apply the unique to all columns. - Lanna Jin lanna...@gmail.com 510-898-8525 -- View this message in context: http://r.789695.n4.nabble.com/Delete-rows-with-duplicate-field-tp2123939p2123976.html Sent fr

Re: [R] Odp: What is the best way to have "R" output tables in an MS Word format?

2010-05-03 Thread Chris Evans
Thanks Tal/Petr, I regularly use the clipboard option but for most of what I do people would prefer to see things in proportional fonts and I'd love to be able to reformat tabulations easily to get nice layouts. Of course, I've got very adept at global search and replace of successive spaces with

[R] question about the degrees of freedom

2010-05-03 Thread serdal ozusaglam
Dear R users, I think i have a simple question which i want to explain by an example; i have several 2-digit industry codes that i want to use for conducting by-industry analysis but i think there is a problem with the degrees of freedom! for example, when i do my analysis without any 2-digit

[R] Multiple methods in models

2010-05-03 Thread Marshall Feldman
Hi, The model specification formula language introduced in Chambers and Hastie potentially handles rather complex models. Typically the user specifies the model and in a separate argument specifies the method. For example, one specifies a general linear model with glm(formula,family). But wit

[R] Plotting the explanatory against the dependent in a GAM

2010-05-03 Thread Oscar Saenz de Miera
  To whoever it may correspond, My name is Oscar Saenz and I am working on my thesis in Spain. I am using GAMs in "R" and, now that I have estimated my models, I need to plot the predicted smooth functions against the dependent variable (just as in Carlslaw et al. 2007, fig. 1*). Otherwise,

Re: [R] 3D version of triax.plot (package plotrix)

2010-05-03 Thread Jim Lemon
On 05/03/2010 09:43 PM, Gabriele Esposito wrote: Good afternoon, I am looking for a way to do a scatterplot of 4 values summing to 1 inside a 3D symplex, i.e. an equilateral pyramid. With the function triax.plot I can do that with 3 values summing to 1, but I can't find an equivalent with an ext

Re: [R] Plotting legend outside of multiple panels

2010-05-03 Thread Jim Lemon
On 05/03/2010 05:15 PM, John Poulsen wrote: Hello, I have used layout() to produce to 2 plots on a page, leaving a plotting space above them. I would like "Legend", which will actually be a real legend, to be centered above the two graphs. Right now I am only able to position "Legend" above

Re: [R] Re : Extract a 'data.frame$column' column name

2010-05-03 Thread Gabor Grothendieck
See the describe functions in these packages: Hmisc pysch prettyR On Mon, May 3, 2010 at 8:12 AM, adrien Penac wrote: > Thank a lot for these answers. > > Some of you wondered why I needed > to do that! > > In fact, I have not so big data.frame whith many > columns (98) and many of them are simi

[R] Re : Extract a 'data.frame$column' column name

2010-05-03 Thread adrien Penac
Thank a lot for these answers. Some of you wondered why I needed to do that! In fact, I have not so big data.frame whith many columns (98) and many of them are similar (many binary answers, some factor data and a few quantitative datas). As I am a lazy guy, I wanted to do a sort of function

  1   2   >