Re: [R] Variate

2012-06-04 Thread Rui Barradas
Hello, Sorry for not understanding your problem, but it really seemed like homework. Now, when I answered scale(x) I meant it, it transforms a matrix in (x - mean)/sd, column by column. If you're new to R, to use the on-line help the instruction is help("scale") ?scale # shortcut As for

Re: [R] plotting evolution of dates

2012-06-04 Thread Jim Lemon
On 06/03/2012 11:27 PM, stef salvez wrote: Dear R users, I have the following problem I have a panel data across countries and individuals. For each country I have a sequence of dates For France for example 22/02/09 22/03/09 19/04/09 17/05/09 12/07/09 09/08/09 06/09/09 04/10/09 01/11/09 29/11/0

[R] Convert 2-dim array to 3-dim array

2012-06-04 Thread David Zastrau
Hello R-users, I'd like to load data from a CSV-file to a 3-dimensional array. However the default seems to be 2-dimensional. It would also be ok to load the data and then convert it to a 3-dimensional structure. I've been trying: dat = read.csv(filename) myArr = as.array(dat, dim = c(12

[R] Read txt File contains character ""

2012-06-04 Thread climmi
Hi Dear friend, I encountered a problem when I read in one huge txt file which contains the character *""* when I run read.table("D:/test.txt",header=T,sep="\t",quote="") the lines can only be read before "" appears. Once "" appears, it will stop there. Could you help me on this . Many th

[R] how to ignore NA with "NA" or "NULL"

2012-06-04 Thread jeff6868
Hello dear R-users, I have a problem in my code about ignoring NA values without removing them. I'm working on a list of files. The aim is to fill one file from another according to the highest correlation (correlation coeff between all my files, so the file which looks like the most to the one I

Re: [R] Problems installing Packages

2012-06-04 Thread Sven D
Thanks for the replies, 1st, installing the BLAS library indeed worked out, and I was able to load the packages. 2nd, I was trying to build from repository directly. But even worse, I cannot tell you if i touched the BLAS linker flags, BUT there seem to be more problems of a similar nature, ie.

Re: [R] how to ignore NA with "NA" or "NULL"

2012-06-04 Thread Jeff Newmiller
I find that avoiding using the return() function at all makes my code easier to follow. In your case it is simply incorrect, though, since ifelse is a vector function and return is a control flow function. Your code is not reproducible and your description isn't clear about how you are handling

Re: [R] Error while trying to install RPostgreSQL.

2012-06-04 Thread Joe Conway
On 06/04/2012 12:14 AM, Prakash Thomas wrote: > I am getting the following error while trying to install RPostgreSQL. > RS-PostgreSQL.h:23:26: fatal error: libpq-fe.h: No such file or directory > compilation terminated. You need the PostgreSQL front end development headers installed. How you

Re: [R] Modify pdf file with Illustrator.

2012-06-04 Thread Michael Friendly
On 6/3/2012 2:42 AM, Jinyan Huang wrote: Dear list, Some times I want to modify the pdf file which produced by R with illustrator. But when I use Illustrator open the pdf file, it often makes the pdf some little changed. Anyone have some suggestions? Is it better to use other file type, not pdf?

[R] Ternary plot and filled contour

2012-06-04 Thread Francesco Nutini
Dear R-Users, I'd like to have some tips for a ternaryplot ("vcd"). I have this dataframe: a<- c (0.1, 0.5, 0.5, 0.6, 0.2, 0, 0, 0.00417, 0.45) b<- c (0.75,0.5,0,0.1,0.2,0.951612903,0.918103448,0.7875,0.45)c<- c (0.15,0,0.5,0.3,0.6,0.048387097,0.081896552,0.20833,0.1)

Re: [R] Modify pdf file with Illustrator.

2012-06-04 Thread Jinyan Huang
Thanks for the links! It is a very nice tutorial. On Mon, Jun 4, 2012 at 8:47 PM, Michael Friendly wrote: > On 6/3/2012 2:42 AM, Jinyan Huang wrote: >> >> Dear list, >> >> Some times I want to modify the pdf file which produced by R with >> illustrator. But when I use Illustrator open the pdf fi

Re: [R] Plotting with Rgraphviz

2012-06-04 Thread Martin Morgan
On 06/03/2012 07:38 PM, slipkid90515 wrote: Hi All, After a lengthy battle just to get the package installed, I am not able to actually use Rgraphviz to generate any plots. I tried just using the sample code in the documentation (http://www2.warwick.ac.uk/fac/sci/moac/people/students/peter_cock

[R] Chi square value of anova(binomialglmnull, binomglmmod, test="Chisq")

2012-06-04 Thread lincoln
Hi all, I have done a backward stepwise selection on a full binomial GLM where the response variable is gender. At the end of the selection I have found one model with only one explanatory variable (cohort, factor variable with 10 levels). I want to test the significance of the variable "cohort"

[R] Non-linear curve fitting (nls): starting point and quality of fit

2012-06-04 Thread Nerak
Hi all, Like a lot of people I noticed that I get different results when I use nls in R compared to the exponential fit in excel. A bit annoying because often the R^2 is higher in excel but when I'm reading the different topics on this forum I kind of understand that using R is better than excel?

Re: [R] Convert 2-dim array to 3-dim array

2012-06-04 Thread David Winsemius
On Jun 4, 2012, at 5:08 AM, David Zastrau wrote: Hello R-users, I'd like to load data from a CSV-file to a 3-dimensional array. However the default seems to be 2-dimensional. No. that is not the problem. It would also be ok to load the data and then convert it to a 3-dimensional structu

Re: [R] Read txt File contains character ""

2012-06-04 Thread Rui Barradas
Hello, There's a ascii 26, hex 1a, between the quotes. Get rid of it and it will probably work. Hope this helps, Rui Barradas Em 04-06-2012 08:43, climmi escreveu: Hi Dear friend, I encountered a problem when I read in one huge txt file which contains the character *""* when I run read

Re: [R] Chi square value of anova(binomialglmnull, binomglmmod, test="Chisq")

2012-06-04 Thread David Winsemius
On Jun 4, 2012, at 7:00 AM, lincoln wrote: Hi all, I have done a backward stepwise selection on a full binomial GLM where the response variable is gender. At the end of the selection I have found one model with only one explanatory variable (cohort, factor variable with 10 levels). I wa

Re: [R] how to ignore NA with "NA" or "NULL"

2012-06-04 Thread Rui Barradas
Hello, 'ifelse' is vectorized, what you want is the plain 'if'. if(all(is.na(xx))) return(NA) Hope this helps, Rui Barradas Em 04-06-2012 09:56, jeff6868 escreveu: Hello dear R-users, I have a problem in my code about ignoring NA values without removing them. I'm working on a list of files.

Re: [R] Convert 2-dim array to 3-dim array

2012-06-04 Thread Petr Savicky
On Mon, Jun 04, 2012 at 11:08:24AM +0200, David Zastrau wrote: > Hello R-users, > > I'd like to load data from a CSV-file to a 3-dimensional array. However > the default seems to be 2-dimensional. It would also be ok to load the > data and then convert it to a 3-dimensional structure. > > I've

Re: [R] how to ignore NA with "NA" or "NULL"

2012-06-04 Thread jeff6868
Thanks for answering Jeff. Yes sorry it's not easy to explain my problem. I'll try to give you a reproductible example (even if it'll not be exactly like my files), and I'll try to explain my function and what I want to do more precisely. Imagine for the example: df1, df2 and df3 are my files: df1

Re: [R] how to ignore NA with "NA" or "NULL"

2012-06-04 Thread jeff6868
Hello Rui, Sorry I read your post after having answered to jeff. If seems effectively to be better than ifelse, thanks. But I still have some errors: Error in x[1:8700, 1] : incorrect number of dimensions AND In is.na(xx) : is.na() applied to non-(list or vector) of type 'NULL It seems to have m

Re: [R] how to ignore NA with "NA" or "NULL"

2012-06-04 Thread Rui Barradas
Hello again, The complete function would be na.fill <- function(x, y){ # do this immediatly, may save copying if(all(is.na(y[1:8700,1]))) return(NA) i <- is.na(x[1:8700,1]) xx <- y[1:8700,1] new <- data.frame(xx=xx) x[1:8700,1][i] <- predict(lm(x[1:8700,1]~xx, na.action=n

Re: [R] merging single column from different dataframe

2012-06-04 Thread Kai Mx
Thanks a lot, appreciate it. On Sun, Jun 3, 2012 at 10:25 PM, David Winsemius wrote: > > On Jun 3, 2012, at 3:22 PM, Kai Mx wrote: > > Hi all, >> probably really simple to solve, but having no background in programming I >> haven't been able to figure this out: I have two dataframes like >> >> d

[R] Why do I have a column called row.names?

2012-06-04 Thread Ed Siefker
I'm trying to read in a tab separated table with read.delim(). I don't particularly care what the row names are. My data file looks like this: start stopSymbol Insert sequence Clone End Pair FISH 203048 67173930ABC8-43024000D23TI:993812543 TI:993834585 255176 87

Re: [R] Why do I have a column called row.names?

2012-06-04 Thread David L Carlson
Try help("read.delim") - always a good strategy before using a function for the first time: In it, you will find: "Using row.names = NULL forces row numbering. Missing or NULL row.names generate row names that are considered to be 'automatic' (and not preserved by as.matrix)." ---

Re: [R] Convert 2-dim array to 3-dim array

2012-06-04 Thread David Winsemius
On Jun 4, 2012, at 12:54 PM, arun wrote: Hi Dave, I tested the "as.array". It gives a different dimension when compared to "array" Interesting. `as.array basically throws away a 'dim' argument and substitutes length(x). Thanks for the correction. -- David. set.seed(1) datE<-data.fra

Re: [R] Why do I have a column called row.names?

2012-06-04 Thread Ed Siefker
I did read that, and I still don't understand why I have a column called row.names. I used "row.names = NULL" in order to get numbered row names, which was successful: > row.names(BACS) [1] "1" "2" "3" "4" I don't see what this has to do with an extraneous column name. Can you be more explicit a

Re: [R] Why do I have a column called row.names?

2012-06-04 Thread Bert Gunter
Actually, I think it's ?data.frame that he should read. The salient points are that: 1. All data frames must have unique row names. If not provided, they are produced. Row numbers **are** row names. 2. The return value of read methods are data frames. -- Bert On Mon, Jun 4, 2012 at 11:05 AM, Da

Re: [R] Why do I have a column called row.names?

2012-06-04 Thread Rui Barradas
Hello, It must be something else. Mandatory row names have nothing to do with a column header. I've put the data example in a tab separated file and the strange behavior was not reproduced. > read.delim("test.txt", row.names=NULL, fill=TRUE) start stop Symbol Insert.sequence

Re: [R] Why do I have a column called row.names?

2012-06-04 Thread David L Carlson
You will probably need to show us the first few lines of the .csv file. Assuming that the lines look like this start,stop,Symbol,Insert sequence,Clone End Pair,FISH 203048,67173930,ABC8-43024000D23,TI:993812543,TI:993834585 255176,87869359,ABC8-43034700N15,TI:995224581,TI:995237913 1022033,1060472

Re: [R] Why do I have a column called row.names?

2012-06-04 Thread Marc Schwartz
To jump into the fray, he really needs to read the Details section of ?read.table and arguably, the source code for read.table(). It is not that the resultant data frame has row names, but that an additional first *column name* called 'row.names' is created, which does not exist in the source d

Re: [R] Non-linear curve fitting (nls): starting point and quality of fit

2012-06-04 Thread Ben Bolker
Nerak hotmail.com> writes: > > Hi all, > > Like a lot of people I noticed that I get different results when I use nls > in R compared to the exponential fit in excel. A bit annoying because often > the R^2 is higher in excel but when I'm reading the different topics on this > forum I kind of un

[R] Who knows how to use it in Vertica 6

2012-06-04 Thread Alekseiy Beloshitskiy
Hi All, As you may already know, Vertica announced it now supports user defined R function. Does anybody tried this alreay or maybe have more info than Vertica site? http://www.vertica.com/content/vertica-an-hp-company-enables-users-to-connect-access-analyze-and-manage-any-data-anywhere/ Best,

Re: [R] Why do I have a column called row.names?

2012-06-04 Thread Brian Diggs
On 6/4/2012 12:12 PM, Marc Schwartz wrote: To jump into the fray, he really needs to read the Details section of ?read.table and arguably, the source code for read.table(). It is not that the resultant data frame has row names, but that an additional first *column name* called 'row.names' is cre

[R] Spliting Lists into matrices

2012-06-04 Thread eliza botto
Dear Rui Barradas, Mackay and all R Users, Thankyou very much for your reply. You helped me a lot. I got what I wanted. I just want one more favor from you, if you could. Suppose I have certain number of lists of data frame, say 50. Each list has yearly data in it. Of-course, some lists have

[R] regression methods for rare events?

2012-06-04 Thread David Studer
Hi everybody! I have a sample with n=2.000. This sample contains rare events (10, 20, 30 individuals with a specific illness). Now I'd like to do a logistic regression in order to identify risk factors. I have several independent variables on an interval scale. Does anyone know whether the number

[R] regular expression and R

2012-06-04 Thread Erin Hodgess
Dear R People: Are there any courses which describe how to use regular expressions in R, please? Or any books, please? I know a little bit (very little) but would like to know more. Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University o

Re: [R] regular expression and R

2012-06-04 Thread Marc Schwartz
On Jun 4, 2012, at 3:48 PM, Erin Hodgess wrote: > Dear R People: > > Are there any courses which describe how to use regular expressions in > R, please? Or any books, please? > > I know a little bit (very little) but would like to know more. > > Thanks, > Erin Hi Erin, The two places that

Re: [R] how a latent state matrix is updated using package R2WinBUGS

2012-06-04 Thread Jean V Adams
Thanks! Jean Uwe Ligges wrote on 05/26/2012 09:30:28 AM: > > On 23.05.2012 17:20, Jean V Adams wrote: > > I'm trying to understand how a latent state matrix is updated by the MCMC > > iterations in a WinBUGS model, using the package R2WinBUGS and an example > > from Kery and Schaub's (2012)

[R] cSpade sequenceID

2012-06-04 Thread Ilaria.ae
hi I have any problems with cspade; I convert my columns in factor, and then I coerce my data frame in transaction; but when I want do the cspade exit this message: slot transactionInfo: missing 'sequenceID' or 'eventID So I ask to everybody: "somebody help me?" because i tried everything witho

[R] probit analysis

2012-06-04 Thread phale_chuong gionho
 Hello! > I have a very simple set of data and I would like to analyze > them with probit analysis. > The data are: X    Event    Trial > 1210  8        8 > 121  6        8 > 60.5  6        8 > I want to estimate the value of X that will give a 95% hit > rate (Event/Trial) and the corresponding 95%

[R] simulation of modified bartlett's test

2012-06-04 Thread dila
Hi, I run this code to get the power of the test for modified bartlett's test..but I'm not really sure that my coding is right.. #normal distribution unequal variance asim<-5000 pv<-rep(NA,asim) for(i in 1:asim) {print(i) set.seed(i) n1<-20 n2<-20 n3<-20 mu<-0 sd1<-sqrt(25) sd2<-sqrt(50) sd3<-sqrt

[R] simulation of modified bartlett's test

2012-06-04 Thread dila
Hi, I run this code to get the power of the test for modified bartlett's test..but I'm not really sure that my coding is right.. #normal distribution unequal variance asim<-5000 pv<-rep(NA,asim) for(i in 1:asim) {print(i) set.seed(i) n1<-20 n2<-20 n3<-20 mu<-0 sd1<-sqrt(25) sd2<-sqrt(50) sd3<-sqrt

[R] X11 font error on headless server running Xvfb

2012-06-04 Thread Jonathan Levine
I am trying to run an R script to create a .png file containing a tree map on a headless Linux server using Xvfb. When I try to run tmPlot, I get the following errors and warnings: Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : X11 font -adobe-helvetica-%s-%s-*-*-%d

[R] get index of current element in vector

2012-06-04 Thread Erdal Karaca
(Just learning R) I have this vector: v <- c(1:10) Now, I want to multiply each element of that vector with a scalar value multiplied with its index: vm <- v * scalar * indexOfCurrentElementOf_v Is that possible without using a loop? In a loop I would do this: for (i in 1:length(a)) a[i] <-

Re: [R] Chi square value of anova(binomialglmnull, binomglmmod, test="Chisq")

2012-06-04 Thread lincoln
So sorry, My response variable is "site" (not "gender"!). The selection process was: > str(data) 'data.frame': 1003 obs. of 5 variables: $ site : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ... $ sex : Factor w/ 2 levels "0","1": NA NA NA NA 1 NA NA NA NA NA ... $ age : Factor w/ 2

[R] Negative variance with lavaan in a multigroup analysis.

2012-06-04 Thread Raphael Royaute
Hi list members, I saw a couple lavaan posts here so I think I’m sending this to the correct list. I am trying to run a multigroup analysis with lavaan in order to compare behavioural correlations across two populations. I’m following the method suggested in the paper by Dingemanse et al. (2010)

Re: [R] Convert 2-dim array to 3-dim array

2012-06-04 Thread arun
Hi Dave, I tested the "as.array".  It gives a different dimension when compared to "array" set.seed(1) datE<-data.frame(A=rnorm(30,0.5)) myArr=as.array(unlist(datE),dim=c(5,2,3)) > myArr A1  A2  A3  A4  A5  A6 -0.12645381  0.68364332 -0.33562861 

Re: [R] regression methods for rare events?

2012-06-04 Thread Marc Schwartz
On Jun 4, 2012, at 3:47 PM, David Studer wrote: > Hi everybody! > > I have a sample with n=2.000. This sample contains rare events (10, 20, 30 > individuals with a specific illness). > Now I'd like to do a logistic regression in order to identify risk factors. > I have several independent variabl

Re: [R] Spliting Lists into matrices

2012-06-04 Thread Rui Barradas
Hello, I'm glad it helped. To answer to this new question, we need to see what your data looks like. When you say 'list' are you refering to the type of R data structure 'list'? Or to data.frames? For us to see the best way is to use function dput. Example: df1 <- data.frame(A=rnorm(10), B=r

Re: [R] R and igraph problems

2012-06-04 Thread Gábor Csárdi
On Sun, Jun 3, 2012 at 3:43 AM, peter dalgaard wrote: > > On Jun 2, 2012, at 15:43 , jalantho...@verizon.net wrote: > >> Why is igraph 0.5.5 not on the igraph sourceforgwe home page? > > You'll have to ask the igraph developers... Possibly, they just ran out of > "round tuits". Yes, kind of. :)

Re: [R] X11 font error on headless server running Xvfb

2012-06-04 Thread MacQueen, Don
You could try the Cairo() device from the Cairo package. It's my understanding (from a time when I was using Xvgb for the same reason) that Cairo does not depend on X Windows. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062

Re: [R] igraph and igraph0

2012-06-04 Thread Gábor Csárdi
On Sat, Jun 2, 2012 at 9:58 AM, jalantho...@verizon.net wrote: > Could someone tell me the difference between igraph and igraph0? > > I searched the CRAN web site, but cannot find an explantion of the > differences. You are right that this should be in the package description. There is no diffe

Re: [R] get index of current element in vector

2012-06-04 Thread David Winsemius
On Jun 4, 2012, at 4:25 PM, Erdal Karaca wrote: (Just learning R) I have this vector: v <- c(1:10) Now, I want to multiply each element of that vector with a scalar value multiplied with its index: vm <- v * scalar * indexOfCurrentElementOf_v Almost: vm <- v * scalar * seq(v) Is th

Re: [R] regular expression and R

2012-06-04 Thread Gabor Grothendieck
On Mon, Jun 4, 2012 at 4:48 PM, Erin Hodgess wrote: > Dear R People: > > Are there any courses which describe how to use regular expressions in > R, please?  Or any books, please? > > I know a little bit (very little) but would like to know more. > You might want to go through the regular express

Re: [R] Spliting Lists into matrices

2012-06-04 Thread eliza botto
i realy appreciate your concern.. here is a small piece of my data. if you see the first and last part data, they contain 366 entries but the middle one has 365 entries. i want to put first and last entries is one matrix. list(c(0.86, 0.86, 0.86, 0.86, 0.86, 1.08, 1.08, 1.08, 1.08, 1.08, 1.08,

Re: [R] get index of current element in vector

2012-06-04 Thread Rui Barradas
Hello, Just learning the alphabet? If yes, there's a difference between 'v' and 'a'. Now more seriously. Your description and your loop don't do the same. Description: vm <- scalar * v * seq_along(v) Loop: a <- scalar * a Also, seq_along is the way to do it, it works even if length(a) == 0.

Re: [R] Spliting Lists into matrices

2012-06-04 Thread Rui Barradas
Hello, Try # 'x' is your list xlen <- sapply(x, length) i1 <- which(xlen == 365) i2 <- which(xlen == 366) mat365 <- matrix(unlist(x[i1]), nrow=365) mat366 <- matrix(unlist(x[i2]), nrow=366) Hope this helps, Rui Barradas Em 04-06-2012 22:46, eliza botto escreveu: i realy appreciate your con

Re: [R] Chi square value of anova(binomialglmnull, binomglmmod, test="Chisq")

2012-06-04 Thread David Winsemius
On Jun 4, 2012, at 11:31 AM, lincoln wrote: So sorry, My response variable is "site" (not "gender"!). The selection process was: If there is a natural probability interpretation to "site"==1 being a sort of event, (say perhaps a non-lymphatic site for the primary site of a lymphoma) th

Re: [R] Double-buffering problem, this time with an example.

2012-06-04 Thread luke-tierney
FOR what it's worth this dev.hold/dev/flush combination does not seem to prevent flickering on the quartz device on Macs. Best, luke On Sat, 2 Jun 2012, Duncan Murdoch wrote: On 12-06-02 4:02 PM, Daniel Carr wrote: Most of my animations that used to work on windows() version 2.11.1 and earli

Re: [R] Spliting Lists into matrices

2012-06-04 Thread eliza botto
dear rui, lots of hugs for you. thnkyou very much 4 your support. eliza > Date: Mon, 4 Jun 2012 22:58:12 +0100 > From: ruipbarra...@sapo.pt > To: eliza_bo...@hotmail.com > CC: r-help@r-project.org > Subject: Re: Spliting Lists into matrices > > Hello, > > Try > > # 'x' is your list > xlen

Re: [R] Spliting Lists into matrices

2012-06-04 Thread eliza botto
Dear R users, we generally apply approx() command to a list data. how can we apply this command to a matrix, so that we can approximate 366 readings from certain number of each column over 365 intervals?? hope i am clear in my statement. eliza botto > From: eliza_bo...@hotmail.com > To: ruipba

Re: [R] community finding in a graph and heatplot

2012-06-04 Thread Gábor Csárdi
On Sun, Jun 3, 2012 at 4:11 PM, Aziz, Muhammad Fayez wrote: > > Hmm interesting. To come to think of it there could be many disconnected > components in the graph and thus there should be a generic way to either > mitigate the disconnectedness in the dendrogram or in the original graph. I > had

[R] Spliting Lists into matrices

2012-06-04 Thread eliza botto
Dear R users, we generally apply approx() command to a list data. how can we apply this command to a matrix, so that we can approximate 366 readings from certain number of each column over 365 intervals?? more precisely, i want to interpolate 366 discharge readings, in each 8 columns of a matr

[R] approximating matrix columns

2012-06-04 Thread eliza botto
Dear R users, we generally apply approx() command to a list data. how can we apply this command to a matrix, so that we can approximate 366 readings from certain number of each column over 365 intervals?? more precisely, i want to interpolate 366 discharge readings, in each 8 columns of a mat

[R] data analysis problem

2012-06-04 Thread stef salvez
Dear R users, I have data on 4 types of interest rates. These rates evolve over time and across regions of countries . So for each type of interest rates I want to run a regression of rates on some other variables. So my regression for one type of interest rate will be I_{ij}_t= a +regressors

Re: [R] Variate

2012-06-04 Thread Duncan Mackay
Hi Rui You got in before me - time zone differences and other commitments I have done a base graphics of my lattice with your data - it might give some more insight Sites <- 1:92 windows(8,10) par(mfrow = c(12,8), mai = c(0,0,0,0) ) invisible( sapply(seq_len(nc), function(j)

[R] Seeking pointers to various regression techniques with R?

2012-06-04 Thread Michael
Hi all, Could you please point me to good materials on various tricks/intuitions/techniques of regression, and hopefully in R? For example, what does lm(y~ x * w - 1) mean vs. lm(y ~ x/w -1 ) vs. lm (y ~ x:w-1), etc... I just found that even simple linear regression is not that simple and there

Re: [R] Seeking pointers to various regression techniques with R?

2012-06-04 Thread Joshua Wiley
Hi Michael, This is far from exhaustive (I wrote it as an introduction some years ago) but you may find it useful to start: https://joshuawiley.com/R/formulae_in_R.aspx Cheers, Josh On Mon, Jun 4, 2012 at 9:06 PM, Michael wrote: > Hi all, > > Could you please point me to good materials on vari

Re: [R] Seeking pointers to various regression techniques with R?

2012-06-04 Thread R. Michael Weylandt
Try Frank Harrell's RMS book. Michael Weylandt On Jun 5, 2012, at 12:06 AM, Michael wrote: > Hi all, > > Could you please point me to good materials on various > tricks/intuitions/techniques of regression, and hopefully in R? > > For example, what does lm(y~ x * w - 1) mean vs. lm(y ~ x/w -1

Re: [R] data analysis problem

2012-06-04 Thread Bert Gunter
Stef: 1. Read and follow the posting guide. I could make no sense of your post. This may be because I didn't work hard enough to decrypt it - which I shouldn't have to do -- or because I'm too stupid -- which I can't do anything about anyway. 2. What does this have to do with R anyway? Try postin

Re: [R] approximating matrix columns

2012-06-04 Thread Bert Gunter
1. Please follow the posting guide and provide a small reproducible example. See ?dput to provide data. 2. Please do not double post. -- Bert On Mon, Jun 4, 2012 at 4:47 PM, eliza botto wrote: > >  Dear R users, >  we generally apply approx() command to a list data. how can we apply this > com

Re: [R] get index of current element in vector

2012-06-04 Thread Erdal Karaca
Thanks all, that worked! Yes, it should be for (i in 1:length(a)) a[i]<- scalar * a[i] * i And now is... a <- a * scalar * seq_along(a) That is almost as cool as the PERL programming language :-) 2012/6/4 Rui Barradas > Hello, > > Just learning the alphabet? If yes, there's a difference betw

[R] R Error : Error in vector("list", gamma(n + 1)) : vector size specified is too large

2012-06-04 Thread ritwik_r
Dear R-listers, I am giving part of my R code : ### n=15 m=1 library("partitions") library("gregmisc") library("combinat") x = t(restrictedparts(n-m,m)) l = length(x[,1]) for(u in 1:l){ A= unique(matrix( unlist(permn(x[u,])), ncol=m,

Re: [R] probit analysis

2012-06-04 Thread arun
Hi Trinh, Please check ?dose.p() from library MASS. Since you wanted the rate, the code was a bit modified from the example.  > datPr    X Event Trial 1 1210.0 8 8 2  121.0 6 8 3   60.5 6 8  fm<-glm(Event/Trial~X,data=datPr,family=quasibinomial(link=probit))  XD50<-d

Re: [R] Read txt File contains character ""

2012-06-04 Thread climmi
Thank you ! Rui Barradas . Yes, the arrow character "" can not be recoginised by R. the character will be treat as a stop command... So I replace all the character "" with space, then it works.. Just want to know is there any way for R to handle it. Not sure does eveybody able to view the cha