Re: [R] Factor Analysis-factanal function

2009-01-30 Thread John Fox
: socserv.mcmaster.ca/jfox -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ocaña Riola, Ricardo Sent: January-30-09 5:30 AM To: r-help@r-project.org Subject: [R] Factor Analysis-factanal function Dear friends, I'm using R

Re: [R] Factor tutorial?

2008-10-08 Thread rkevinburton
PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, October 07, 2008 2:29 PM To: r-help@r-project.org Subject: [R] Factor tutorial? This is probably a very basic question. I want to understand factors but I am not sure where to turn. Looking up factor in the Chambers book doesn't

[R] Factor tutorial?

2008-10-07 Thread rkevinburton
This is probably a very basic question. I want to understand factors but I am not sure where to turn. Looking up factor in the Chambers book doesn't even show up in the index. Maybe I am just slow but ?factor doesn't help either. Would someone please point me to a very basic tutorial where I

Re: [R] factor question

2008-07-24 Thread Mark Difford
Hi Edna, Because I am always subsetting, I keep the following function handy mydata[] - lapply(mydata, function(x) if(is.factor(x)) x[,drop=T] else x) This will strip out all factor levels that have been dropped by a previous subsetting operation. For novice users of R (though I am not

[R] Factor to numeric

2008-04-24 Thread Jojje Andersson
Hello! I have a problem whith a data.frame. I want to make a subset where some of the variables have values within ceartain limits. The variables are proportions like 1,00, 0,54, 0,00 etc. I don't get it right as R take the variables for factors. ekobsub1 - subset(ekob, PAP0,25 PAP0,6

Re: [R] Factor to numeric

2008-04-24 Thread Prof Brian Ripley
The decimal point in R is always '.', never ','. On Thu, 24 Apr 2008, Jojje Andersson wrote: Hello! I have a problem whith a data.frame. I want to make a subset where some of the variables have values within ceartain limits. The variables are proportions like 1,00, 0,54, 0,00 etc. I don't

Re: [R] Factor to numeric

2008-04-24 Thread Jojje Andersson
Hello! Thanks! I changed the , to . in both datafile and code but the problem remains identical. Cheers! Jojje Date: Thu, 24 Apr 2008 09:16:38 +0100 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] Factor to numeric The decimal point in R

Re: [R] Factor to numeric

2008-04-24 Thread Prof Brian Ripley
  __ Date: Thu, 24 Apr 2008 09:16:38 +0100 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] Factor to numeric The decimal point in R is always '.', never ','. On Thu, 24 Apr 2008, Jojje Andersson wrote: Hello! I have a problem whith

Re: [R] Factor to numeric

2008-04-24 Thread Jorge Ivan Velez
PROTECTED] wrote: Hello! Thanks! I changed the , to . in both datafile and code but the problem remains identical. Cheers! Jojje Date: Thu, 24 Apr 2008 09:16:38 +0100 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] Factor to numeric The decimal

Re: [R] Factor to numeric

2008-04-24 Thread Don MacQueen
but the problem remains identical. Cheers! Jojje Date: Thu, 24 Apr 2008 09:16:38 +0100 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: r-help@r-project.org Subject: Re: [R] Factor to numeric The decimal point in R is always '.', never ','. On Thu, 24 Apr 2008, Jojje Andersson wrote:Hello

[R] Factor Analysis

2008-01-12 Thread Kathleen Kemp
Good Morning, Is it possible to use the R program for a CFA with dichotomous data? Thank you, Kathleen Kathleen Kemp, M.A. Doctoral Clinical Psychology Student, Concentration: Forensic Psychology Drexel University Philadelphia, PA 19104 [EMAIL PROTECTED] [[alternative HTML version

Re: [R] Factor Analysis

2008-01-12 Thread Dimitris Rizopoulos
you may check the ltm package: http://wiki.r-project.org/rwiki/doku.php?id=packages:cran:ltm I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel:

Re: [R] Factor Analysis

2008-01-12 Thread John Fox
, Ontario, Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] project.org] On Behalf Of Kathleen Kemp Sent: January-12-08 9:11 AM To: r-help@r-project.org Subject: [R] Factor Analysis Good Morning

Re: [R] factor manipulation: edgelist to a matrix?

2007-12-20 Thread Dimitris Rizopoulos
- Original Message - From: Christopher Marcum [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 20, 2007 8:33 AM Subject: [R] factor manipulation: edgelist to a matrix? Hello All, I have had considerable bad luck with attempting the following with for loops. Here

Re: [R] Factor Madness

2007-12-20 Thread John Kane
You may be haning Ion coerced into a factor. Have a look at http://finzi.psych.upenn.edu/R/Rhelp02a/archive/98260.html for some discussion of this. I find that I usually set options(stringsAsFactors = FALSE) just because of this but as Gabor points out it may have its own disadvantages in

Re: [R] Factor Madness

2007-12-19 Thread Johannes Graumann
Yep, but I figured that out quite fast ;0) Thanks for giving me a hand ... you want believe a many times I skimmed the cbind help without actually seeing this ... well, it was 0:30 ... Thanks again, Joh Tony Plate wrote: Whoops, it looks like there's a typo in ?cbind (R version 2.6.0 Patched

[R] factor manipulation: edgelist to a matrix?

2007-12-19 Thread Christopher Marcum
Hello All, I have had considerable bad luck with attempting the following with for loops. Here is the problem: # Suppose we have a data.frame with the following data, which can be considered a type of edgelist (for those with networks backgrounds): # # V1 V2 # 1 A #

Re: [R] Factor Madness

2007-12-18 Thread Tony Plate
From ?cbind: Data frame methods The cbind data frame method is just a wrapper for data.frame(..., check.names = FALSE). This means that it will split matrix columns in data frame arguments, and convert character columns to factors unless stringsAsFactors = TRUE is passed. (I'm guessing

Re: [R] Factor levels.

2007-10-03 Thread Rolf Turner
On 3/10/2007, at 5:48 PM, Peter Dalgaard wrote: Rolf Turner wrote: I have factors with levels ``Unit, Achieved, and Scholarship; I wish to replace these with U, A, and S. So I do fff - factor(fff,labels=c(U,A,S)) This works as long as all of the levels are actually present in

Re: [R] Factor levels.

2007-10-03 Thread Rolf Turner
On 4/10/2007, at 7:50 AM, Peter Dalgaard wrote: Rolf Turner wrote: Does it even work? (What if it is the first or the 2nd level that is absent? Yes it works. What's the problem? To beat it to death: if the second level of fff is absent then fff will consist entirely of 1's

Re: [R] Factor levels.

2007-10-03 Thread Peter Dalgaard
Rolf Turner wrote: P.S. ***Are*** there any risks/dangers in following Christos Hatzis' suggestion of simply doing levels(fff) - c(U,A,S) ??? Not if the levels are right to begin with. Problems only arise if fff somehow becomes a two-level factor, e.g. if you do

[R] Factor levels.

2007-10-02 Thread Rolf Turner
I have factors with levels ``Unit, Achieved, and Scholarship; I wish to replace these with U, A, and S. So I do fff - factor(fff,labels=c(U,A,S)) This works as long as all of the levels are actually present in the factor. But if ``Scholarship'' is absent (as if often is) then I

Re: [R] Factor levels

2007-09-19 Thread Gabor Grothendieck
If you don't know ahead of time how many columns you have and only that they are a mix of numeric and character (to be converted to factor) then you can do this: DF - read.table(textConnection(Input), header = TRUE, as.is = TRUE) f - function(x) if (is.character(x)) factor(x, levels = unique(x))

<    1   2   3