Re: [R] How does once import a function from an imported script?

2011-11-09 Thread Jeff Newmiller
TeX is not R. You need to (manually) extract whatever R syntax is in the TeX file into an R file. Then you can use the source function to load those definitions into your working environment. I highly recommend reading the posting guide as well. Including the R statements you run and a sample

[R] Help: sqlSave Error

2011-11-09 Thread bruclee
I am using sqlSave to save my data into an existing table at MS SQL Server database. Previously my code ran smoothly but all of a sudden it stopped working. Here is my code: sqlSave(con, highVol, "dbo.futuresHighVol", append=TRUE, rownames=FALSE) Error: sqlSave(con, highVol, "jrgchis.dbo.futuresH

[R] Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 4L, : max not meaningful for factors

2011-11-09 Thread Alex DJ
Hello, Beginner, sorry if this is wasting anyone's time, but have been working on this for a couple of days now, think it should have take a few hours! The Problem: Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 4L, : max not meaningful for factors I have tried to re-ar

[R] Error in axis ????

2011-11-09 Thread eric
Recently updated my packages (update.packages() and also updated rstudio to the latest version. Had some problems but I thought I was able to get around them by moving my folders. However, now I'm seeing a bit of a snag with some code that previously ran fine. Hoping someone can suggest a fix. Her

[R] Error in axis ????

2011-11-09 Thread eric
I did an update of both rstudio and my packages. I had some trouble but was able to move a lot of the packages so most troubles seem to be behind me. But having a problem with code that previously ran fine. See below: require(quantmod) Loading required package: quantmod Loading required package: D

[R] How does once import a function from an imported script?

2011-11-09 Thread Aimee Jones
Hi all, I am trying to import some functions into a script and am having difficulty in doing so. I am able to import a series of functions from a .tex file into my script, and call on each function by column name, however R reads them as data rather than as functions and I am struggling with the sy

Re: [R] Web based R-help not a list

2011-11-09 Thread Sean Robert McGuffee
On 11/9/11 7:22 PM, "David Winsemius" wrote: > > On Nov 9, 2011, at 5:38 PM, Cem Girit wrote: > >> Hello, >> >>Is there a web version of this R-Help user group >> (such as >> the ones under Google Groups) such that > > There is Nabble. It's not going to make you any friends

[R] update.packages() issue

2011-11-09 Thread eric
I updated packages using the update.packages() command but now having problems. i now know I should have done this from the terminal (sudo rstudio and then update.packages()). Instead I just opened rstudio without the sudo command. So I know what to do going forward but how do I resolve the existin

[R] Code for VECM Models

2011-11-09 Thread vramaiah
Hi I am new to R and I want to use the program for the following analysis. Bi-Variate VECM with Cointegration; Three lags for each series; Could you help with Code and if possible explanations of ourput. I am new to this and I hope I am asking for too much. Thanks Ram Ramaiah ___

Re: [R] match first consecutive list of capitalized words in string

2011-11-09 Thread Gabor Grothendieck
On Tue, Nov 8, 2011 at 7:48 AM, Richter-Dumke, Jonas wrote: > Dear R-Helpers, > > this is my first post ever to a mailing list, so please feel free to point > out any missunderstandings on my side regarding the conventions of this > mailing list. > > My problem: > > Assuming the following charac

Re: [R] Error in drawing

2011-11-09 Thread R. Michael Weylandt
It's not a problem with your data or use of the functions -- rather I think there's just a little bug in the package (and I've cc'd the maintainer): draw.wd leads to a call of draw.default(type = "l") which in turn leads to plot(type = "l"). However, since draw.default doesn't have a type argument

Re: [R] installing java on ubuntu 11.10 installation

2011-11-09 Thread Ken Hutchison
Which is better is a matter of opinion: Try: sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts if it doesnt work, update/add repos. Also, miss google knows this; lastly: not really a geRmaine topic for the R-list. HTH Ken Hutchison On Wed, Nov 9, 2011 at 4:40 PM, ravi wrote

[R] Package build/check OK, install looking for irrelevant function

2011-11-09 Thread Bryan Hanson
Hello R Users: I have 3 packages that I authored and they build and check just fine locally. However, when I try to install the local source packages (from the .tar.gz), I get the following message: Error in `+.POSIXt`(as.POSIXct(origin, tz = tz, ...), x) : could not find function "%is.a%"

Re: [R] match first consecutive list of capitalized words in string

2011-11-09 Thread Peter Alspach
Tena koe Jonas Something like the following may help, although you should probably read the help on regexpr regarding locales. Names <- c("filia Maria", "vidua Joh Dirck Kleve (oo 02.02.1732)", "Bernardus Engelb Franciscus Linde j.u.Doktor referendarius sereniss Judex et gograven Rheinensis")

Re: [R] determine length of bivariate polynomial

2011-11-09 Thread R. Michael Weylandt
I think this will do it: sum(sqrt(diff(x.pred)^2 + diff(y.pred)^2)) Michael On Tue, Nov 8, 2011 at 11:34 AM, Nicolas Schuck wrote: > Dear R-community, > > I have a fitted bivariate polynomial, i.e: > > fit = lm(cbind(x, y)~poly(t, 15)) > > and I would like to determine the length of the line in

Re: [R] How to handle empty arguments

2011-11-09 Thread R. Michael Weylandt
Perhaps the missing() command will help in regards to suggestion a. I'd caution against b for obvious reasons, though I think options(error = ) can get you that behavior (you'll have to figure out what XXX is, I have never tried to lessen my error messages...) Michael On Tue, Nov 8, 2011 at 3

Re: [R] Error in drawing

2011-11-09 Thread R. Michael Weylandt
Your code is not reproducible. Where is the lidar data coming from? Michael On Wed, Nov 9, 2011 at 2:29 PM, Gyanendra Pokharel wrote: >  I have got following error in drawing wavelet fitting. can some one help? > >> library(faraway) >> data(lidar) >> newlidar<-lidar[c(1:128),] >> library(wavethr

Re: [R] R to automate scatter plots

2011-11-09 Thread R. Michael Weylandt
Sorry for the rambling answer: On Wed, Nov 9, 2011 at 8:28 PM, R. Michael Weylandt wrote: > It sounds like something is going wrong in your data read -- the > warnings indicate that R probably isn't data** meant to say: getting numerical data. > to the plotting commands. > My totally off the w

Re: [R] R to automate scatter plots

2011-11-09 Thread R. Michael Weylandt
It sounds like something is going wrong in your data read -- the warnings indicate that R probably isn't data to the plotting commands. My totally off the wall guess is that if your data is coming by way of excel, the commas are leading to your data becoming characters and hence not plotting nicely

Re: [R] Help with SEM package: Error message

2011-11-09 Thread John Fox
Dear Lisa, Here's a little CFA simulation of my own. I used the development version 2.1-0 of the sem package (on R-Forge) to allow equation-style specification of the model, but you should get the same results with version 2.0-0: --- snip > library(MASS) # for mvrnorm()

Re: [R] [ reached getOption("max.print") -- omitted 8178 rows ]]

2011-11-09 Thread R. Michael Weylandt
? options options(max.print = Inf) Michael On Wed, Nov 9, 2011 at 4:48 PM, Sean Robert McGuffee wrote: > Hi, > I have a weird thing I don¹t understand. > Here¹s what I did: > I read some data: > data=read.table("fileName²) > then I printed the data to the screen: > data > But it didn¹t finish: >

Re: [R] Stack trace?

2011-11-09 Thread R. Michael Weylandt
Very nifty tricks re: getting recover on warnings. Thanks, Michael On Wed, Nov 9, 2011 at 7:11 PM, William Dunlap wrote: > Bert, > > At the end of my previous message I mentioned tryCatch(). > I should have said withCallingHandlers().  E.g., > >> f <- function() { > +     warning("Hmmm") > +    

Re: [R] Web based R-help not a list

2011-11-09 Thread Marc Schwartz
On Nov 9, 2011, at 5:40 PM, Hasan Diwan wrote: > On 9 November 2011 15:24, Jeff Newmiller wrote: >> Such a resource would no longer be R-help. You might like stackoverflow. > > Perhaps our man was looking for a searchable mail archive? If no one > has one, I can set one up pretty quickly. Just

Re: [R] ggplot stat_summary (mean_cl_boot)

2011-11-09 Thread Nathan Miller
For all those that are interested. To adjust the number of reps in the stat_summary() "mean_cl_boot" function simply specify "B" to the number of bootstrap resamples. I set B to 2000 resamplings below. stat_summary(fun.data="mean_cl_boot", geom="errorbar",width=0.1,colour = "red", B=2000 ) If yo

Re: [R] algorithm that iteratively drops columns of a data-frame

2011-11-09 Thread Martin Batholdy
great, thank you both! On 09.11.2011, at 17:27, Jeff Newmiller wrote: > Try > > data[,!names(data) %in% names(col_means)] > > On Wed, 9 Nov 2011, Martin Batholdy wrote: > >> Dear R-Users, >> >> >> I have a problem with an algorithm that iteratively goes over a data.frame >> and exclude n-

Re: [R] Stack trace?

2011-11-09 Thread William Dunlap
Bert, At the end of my previous message I mentioned tryCatch(). I should have said withCallingHandlers(). E.g., > f <- function() { + warning("Hmmm") + retval <- c(1,2) + c(5,6,7) # warns about incompatible lengths in + + warning("Really?") + retval + } > options(warning.expressi

Re: [R] path.diagram in SEM--display covariances without variances

2011-11-09 Thread Dustin Fife
For those who have the same question laterafter following John's steps of extracting the function, I just replaced the line of code that says: if ((!ignore.double) || (heads[par] == 1)) with if (((!ignore.double) || (heads[par] == 1)) & variables[from[par]] != variables[to[par]]) That seem

Re: [R] Stack trace?

2011-11-09 Thread William Dunlap
It will call recover() for each warning. When you exit recover() the code continues on. This is handy if you expect the first warning or two but are curious about the third. I'd expect that you could reset options(warning.expression=NULL) when in recover() so that recover() would not be called

Re: [R] Web based R-help not a list

2011-11-09 Thread Hasan Diwan
On 9 November 2011 15:24, Jeff Newmiller wrote: > Such a resource would no longer be R-help. You might like stackoverflow. Perhaps our man was looking for a searchable mail archive? If no one has one, I can set one up pretty quickly. Just let me know... Thanks in advance! -- H -- Sent from my mo

Re: [R] Web based R-help not a list

2011-11-09 Thread Clint Bowman
Cem, Thanks for your comments. 1. and select Search in the left-hand panel. 2. Use a filter to funnel r-help into it's own area and review as desired. 3. I find that there are many posts that have been quite educational and have helped me with analyses. 4

Re: [R] Help with tryCatch with a for loop

2011-11-09 Thread William Dunlap
If your loop is of the form for(i in 1:n) { doSomethingSafe() x <- doSomethingThatFailsSometimes() doSomethingWithX(x) # cannot do this if previous line fails doSomethingElseSafe() } and you want it to somehow recover when doSomethingThatFailsSometimes() throws an error, then change i

Re: [R] path.diagram in SEM--display covariances without variances

2011-11-09 Thread Dustin Fife
Perfect! Thanks for the help. On Wed, Nov 9, 2011 at 4:27 PM, John Fox wrote: > Dear Dustin, > >> -Original Message- >> From: Dustin Fife [mailto:fife.dus...@gmail.com] >> Sent: November-09-11 2:12 PM >> To: John Fox >> Cc: r-help@r-project.org >> Subject: Re: [R] path.diagram in SEM--dis

Re: [R] Stack trace?

2011-11-09 Thread Bert Gunter
To Bill's suggestion for a stack trace on warnings: Question: What would this do in situations where one might get, e.g. 100 warnings? -- Bert On Wed, Nov 9, 2011 at 3:08 PM, William Dunlap wrote: > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-pro

Re: [R] Web based R-help not a list

2011-11-09 Thread Jeff Newmiller
Such a resource would no longer be R-help. You might like stackoverflow. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] Stack trace?

2011-11-09 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Thomas Lumley > Sent: Wednesday, November 09, 2011 1:53 PM > To: rkevinbur...@charter.net > Cc: r-help > Subject: Re: [R] Stack trace? > > On Thu, Nov 10, 2011 at 10:35 AM, wro

Re: [R] Web based R-help not a list

2011-11-09 Thread David Winsemius
On Nov 9, 2011, at 5:38 PM, Cem Girit wrote: Hello, Is there a web version of this R-Help user group (such as the ones under Google Groups) such that There is Nabble. It's not going to make you any friends unless you learn to post in plain text AND to include context ...

Re: [R] Help with tryCatch with a for loop

2011-11-09 Thread Spencer S
My apologies for not including some test data. Attached is a sample dataset that fails with the first stateroute and works with the second. http://r.789695.n4.nabble.com/file/n4021696/testdata.csv testdata.csv -- View this message in context: http://r.789695.n4.nabble.com/Help-with-tryCatch-wi

[R] [ reached getOption("max.print") -- omitted 8178 rows ]]

2011-11-09 Thread Sean Robert McGuffee
Hi, I have a weird thing I don¹t understand. Here¹s what I did: I read some data: data=read.table("fileName²) then I printed the data to the screen: data But it didn¹t finish: lot¹s of data was written out, but not all of it... Then it interrupted and said: [ reached getOption("max.print") -- omitt

[R] Web based R-help not a list

2011-11-09 Thread Cem Girit
Hello, Is there a web version of this R-Help user group (such as the ones under Google Groups) such that 1. I can do a search on any topic over thousands of posts on R easily and effectively 2. My mailbox do not overflow with emails so that I do not need to edi

Re: [R] R to automate scatter plots

2011-11-09 Thread David Winsemius
On Nov 9, 2011, at 4:22 PM, Cynthia Lee Page wrote: Hi R people! I have a directory of .csv files I would like to make into objects then scatter plots. I have been having varying degrees of progress. I was able make an object of all files, loop through it, and make a pdf of the last file

Re: [R] path.diagram in SEM--display covariances without variances

2011-11-09 Thread John Fox
Dear Dustin, > -Original Message- > From: Dustin Fife [mailto:fife.dus...@gmail.com] > Sent: November-09-11 2:12 PM > To: John Fox > Cc: r-help@r-project.org > Subject: Re: [R] path.diagram in SEM--display covariances without > variances > > Thanks for the quick response...I've never edit

[R] R to automate scatter plots

2011-11-09 Thread Cynthia Lee Page
Hi R people! I have a directory of .csv files I would like to make into objects then scatter plots. I have been having varying degrees of progress. I was able make an object of all files, loop through it, and make a pdf of the last file I looped through. I kept renaming the pdf so instead o

[R] latent class models

2011-11-09 Thread Frank Lawrence
I would like to extract the information criteria from an hlme object (lcmm package). Would you please advise me on how to extract just the BIC (AIC)? On another topic, when I apply hlme (lcmm) and flexmix (flexmix package) to the same data set, I get BIC values that suggest two different latent c

Re: [R] ggplot stat_summary(mean_cl_boot)

2011-11-09 Thread David Winsemius
On Nov 9, 2011, at 4:30 PM, Ben Bolker wrote: David Winsemius comcast.net> writes: On Nov 9, 2011, at 2:59 PM, Nathan Miller wrote: Hello, This is a pretty simple question, but after spending quite a bit of time looking at "Hmisc" and using Google, I can't find the answer. If I use stat

Re: [R] ggplot stat_summary (mean_cl_boot)

2011-11-09 Thread David Winsemius
On Nov 9, 2011, at 4:35 PM, Nathan Miller wrote: Sorry, I didn't realize I was being so obscure. Within ggplot it is possible to use stat_summary() to generate confidence intervals about a mean. One method for generating these CI assumes normality. The other uses bootstrapping to generate

[R] Kmeans with hamming distance?

2011-11-09 Thread Rui Esteves
Hello, I need to do kmeans clustering with hamming distance instead of the euclidean. The kmeans function only uses euclidean. How can I do it? Thank you Rui [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://sta

Re: [R] raking weighting

2011-11-09 Thread Thomas Lumley
2011/11/10 Sebastián Daza : > I did. However, I am not sure that I can create a "weight variable" in > my database with the rake function you mention. That is why I am > asking. > Yes, you can. -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland _

Re: [R] ggplot stat_summary (mean_cl_boot)

2011-11-09 Thread Nathan Miller
Ok, I got it. smean.cl.boot(x, conf.int=.95, B=1000, na.rm=TRUE, reps=FALSE) Looks like its 1000. Cool. Thanks for the help, Nate On Wed, Nov 9, 2011 at 1:35 PM, Nathan Miller wrote: > Sorry, I didn't realize I was being so obscure. > > Within ggplot it is possible to use stat_summary() to g

Re: [R] Stack trace?

2011-11-09 Thread Thomas Lumley
On Thu, Nov 10, 2011 at 10:35 AM, wrote: > > Currently I have a for loop executing functions and at the end I get a > message like: > > There were 50 or more warnings (use warnings() to see the first 50) > > If I do what it says and type warnings(), I get 50 messages like: > > 2: In !is.na(x) & !

[R] installing java on ubuntu 11.10 installation

2011-11-09 Thread ravi
Dear list members, I am starting to get acquainted with linux on a ubuntu 11.10 installation on an external hard disk. I have just installed R and all the packages available in the r-cran-* list. Now, I would like to get on with the installation of packages like Deducer and Acinonyx. The former

[R] Stack trace?

2011-11-09 Thread rkevinburton
Currently I have a for loop executing functions and at the end I get a message like: There were 50 or more warnings (use warnings() to see the first 50) If I do what it says and type warnings(), I get 50 messages like: 2: In !is.na(x) & !is.na(rowSums(xreg)) : longer object length is not a

Re: [R] Help with tryCatch with a for loop

2011-11-09 Thread Jeff Newmiller
Without a sample data set that fails the first pass and succeeds on the second pass this is a pain to test. Don't forget to read the posting guide... Reproducible sample code isn't too reproducible without some specified data or autogenerated data. ---

Re: [R] ggplot stat_summary (mean_cl_boot)

2011-11-09 Thread Nathan Miller
Sorry, I didn't realize I was being so obscure. Within ggplot it is possible to use stat_summary() to generate confidence intervals about a mean. One method for generating these CI assumes normality. The other uses bootstrapping to generate the CI. I am using the second method which requires code

Re: [R] ggplot stat_summary (mean_cl_boot)

2011-11-09 Thread David Winsemius
On Nov 9, 2011, at 4:10 PM, David Winsemius wrote: mean_cl_boot OK. Things do change. Hadley has written a wrapper for some of the Hmisc functions and you appear to be looking for smean.cl.boot() (Note that Hadley's functions use "_"'s and Harrells use "."'s. And this could be found by

Re: [R] ggplot stat_summary(mean_cl_boot)

2011-11-09 Thread Ben Bolker
David Winsemius comcast.net> writes: > On Nov 9, 2011, at 2:59 PM, Nathan Miller wrote: > > > Hello, > > > > This is a pretty simple question, but after spending quite a bit of > > time > > looking at "Hmisc" and using Google, I can't find the answer. > > > > If I use stat_summary(fun.data="m

Re: [R] ggplot stat_summary (mean_cl_boot)

2011-11-09 Thread David Winsemius
On Nov 9, 2011, at 2:59 PM, Nathan Miller wrote: Hello, This is a pretty simple question, but after spending quite a bit of time looking at "Hmisc" and using Google, I can't find the answer. If I use stat_summary(fun.data="mean_cl_boot") in ggplot to generate 95% confidence intervals, h

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread B77S
This is the output of dput(your data) structure(list(Ca = c(NA, NA, 24.4, NA, 21.4, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 28, 32, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 34.7, NA, 42.5, NA, 26, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0.6, 21.4, NA, 48.3, 63.5

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread B77S
There is only one row with a complete set of observations; I think lm() is throwing out the rest. Rich Shepard wrote: > > On Wed, 9 Nov 2011, John C Frain wrote: > >> As far as I know if there is an NA in any variable in an observation the >> default is to drop the entire observation. Thus the

Re: [R] Invalid 'yscale' in viewport

2011-11-09 Thread Erin McMullen Jonaitis
Thanks for your quick response, Michael. That is indeed the script I was talking about -- I didn't see it in a standard package, so I just copied it and ran it as a standalone thing. I'm afraid the data are proprietary (human subjects, health data) and so I can't share them. I was able to con

Re: [R] Invalid 'yscale' in viewport

2011-11-09 Thread Erin McMullen Jonaitis
Never mind, I found it -- I had some NA values I didn't know about! I will infer that viewport doesn't handle NA values gracefully! (If I'm wrong about that and I've just missed something key, please correct me.) Erin -Original Message- From: R. Michael Weylandt [mailto:michael.weyla

Re: [R] raking weighting

2011-11-09 Thread David Winsemius
On Nov 9, 2011, at 3:07 PM, Sebastián Daza wrote: I did. However, I am not sure that I can create a "weight variable" in my database with the rake function you mention. That is why I am asking. Since you have provided absolutely no information about the data you have or the problem you are

Re: [R] Compare clustering solutions to a "correct" one

2011-11-09 Thread Andrew Ziem
It sounds like you want to do supervised classification, so maybe a supervised classification algorithm would be more appropriate? Consider logistic regression, rpart, ctree, earth, etc. Andrew -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org

Re: [R] raking weighting

2011-11-09 Thread Sebastián Daza
I did. However, I am not sure that I can create a "weight variable" in my database with the rake function you mention. That is why I am asking. El día 9 de noviembre de 2011 13:44, David Winsemius escribió: > > On Nov 9, 2011, at 2:27 PM, Sebastián Daza wrote: > >> Hi everyone, >> Does anyone kno

[R] ggplot stat_summary (mean_cl_boot)

2011-11-09 Thread Nathan Miller
Hello, This is a pretty simple question, but after spending quite a bit of time looking at "Hmisc" and using Google, I can't find the answer. If I use stat_summary(fun.data="mean_cl_boot") in ggplot to generate 95% confidence intervals, how many bootstrap iterations are preformed by default? Can

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread Ted Harding
On 09-Nov-11 19:39:54, Rich Shepard wrote: > On Wed, 9 Nov 2011, John C Frain wrote: > >> As far as I know if there is an NA in any variable in an >> observation the default is to drop the entire observation. >> Thus there are no observations in your calculation > > John, > > Hadn't realized th

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread Rich Shepard
On Wed, 9 Nov 2011, John C Frain wrote: As far as I know if there is an NA in any variable in an observation the default is to drop the entire observation. Thus there are no observations in your calculation John, Hadn't realized that. I know there are NA's in other data frames that yield mo

Re: [R] raking weighting

2011-11-09 Thread David Winsemius
On Nov 9, 2011, at 2:27 PM, Sebastián Daza wrote: Hi everyone, Does anyone know if there is a package to compute raking weights using R? What I need is to create a variable with weights base in some demographic variables (e.g. sexo, age group, area) using the raking procedure. There is a `rak

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread Rich Shepard
On Wed, 9 Nov 2011, Marc Schwartz wrote: # 'DF' is the result of copying your data above from the # clipboard on OSX DF <- read.table(pipe("pbpaste"), header = TRUE) Marc, Oh? I don't do Apple so there's no OSX here. After removing incomplete records (any records with NA values) which is

[R] Compare clustering solutions to a "correct" one

2011-11-09 Thread Massimo Lole
Hello everyone, I have a set of data, J healthy subjects, K diseased subjects, N features for each person. I would like to clusterize my data. Since I know that subjects are from two populations ideally I would prefer an algorithm that first is able to discriminate them, in order to see how it perf

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread John C Frain
As far as I know if there is an NA in any variable in an observation the default is to drop the entire observation. Thus there are no observations in your calculation Best Regards John On 9 November 2011 19:17, Rich Shepard wrote: > On Wed, 9 Nov 2011, Daniel Nordlund wrote: > >> I would guess

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread David Winsemius
On Nov 9, 2011, at 2:17 PM, Rich Shepard wrote: On Wed, 9 Nov 2011, Daniel Nordlund wrote: I would guess that there is something problematic with the how the data frame is structured relative to what lm() is expecting. Dan, I was not comfortable with my explanation, but the formula (and

[R] Error in drawing

2011-11-09 Thread Gyanendra Pokharel
I have got following error in drawing wavelet fitting. can some one help? > library(faraway) > data(lidar) > newlidar<-lidar[c(1:128),] > library(wavethresh) > wds <- wd(newlidar$logratio) > draw(wds) Error in plot.default(x = x, y = zwr, main = main, sub = sub, xlab = xlab, : formal argument "

[R] raking weighting

2011-11-09 Thread Sebastián Daza
Hi everyone, Does anyone know if there is a package to compute raking weights using R? What I need is to create a variable with weights base in some demographic variables (e.g. sexo, age group, area) using the raking procedure. Thank you in advance! -- Sebastián Daza ___

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread Marc Schwartz
On Nov 9, 2011, at 1:17 PM, Rich Shepard wrote: > On Wed, 9 Nov 2011, Daniel Nordlund wrote: > >> I would guess that there is something problematic with the how the data >> frame is structured relative to what lm() is expecting. > > Dan, > > I was not comfortable with my explanation, but the

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread Rich Shepard
On Wed, 9 Nov 2011, Daniel Nordlund wrote: I would guess that there is something problematic with the how the data frame is structured relative to what lm() is expecting. Dan, I was not comfortable with my explanation, but the formula (and data frame) was equivalent to those of the other 8

Re: [R] path.diagram in SEM--display covariances without variances

2011-11-09 Thread Dustin Fife
Thanks for the quick response...I've never edited someone else's package before. How do I go about doing that? On Wed, Nov 9, 2011 at 12:47 PM, John Fox wrote: > Dear Dustin, > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- >> project.org] On Behalf

Re: [R] path.diagram in SEM--display covariances without variances

2011-11-09 Thread John Fox
Dear Dustin, > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Dustin Fife > Sent: November-09-11 10:57 AM > To: r-help@r-project.org > Subject: [R] path.diagram in SEM--display covariances without variances > > Forgive me if I

Re: [R] Invalid 'yscale' in viewport

2011-11-09 Thread R. Michael Weylandt
Two things: 1) It sounds like you are right in thinking there's something funny about your particular data: could you provide it to us? The easiest way to do so is to use dput() to get a plain text representation ready for copy and paste. 2) What is esplot()? It's not in base R, but I imagine you

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Rich Shepard > Sent: Wednesday, November 09, 2011 9:42 AM > To: r-help@r-project.org > Subject: Re: [R] Interpreting Multiple Linear Regression Summary > > On Wed, 9 Nov 2011, D

Re: [R] Creating 3D plot

2011-11-09 Thread Sarah Goslee
Hi, On Wed, Nov 9, 2011 at 11:56 AM, Michal Zimmermann wrote: > Hi to all, > i have a data set of international airports with latitude, longitude and > altitude. I was thinking of creating a 3D plot out of them, but haven't > succeeded yet. > With > plot3d(x=seq(min(traffic$lon),max(traffic$lon))

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Rich Shepard > Sent: Wednesday, November 09, 2011 9:05 AM > To: r-help@r-project.org > Subject: [R] Interpreting Multiple Linear Regression Summary > >I would appreciate poi

[R] Help with tryCatch with a for loop

2011-11-09 Thread Spencer S
Hello all, I'm a beginner in R working on a script that will produce a set of models (linear, polynomial and logistic) for each location in a dataset. However, the self-starting logistic model often fails - if this happens I would like to just skip to the next iteration of the loop using tryCatch

[R] Creating 3D plot

2011-11-09 Thread Michal Zimmermann
Hi to all, i have a data set of international airports with latitude, longitude and altitude. I was thinking of creating a 3D plot out of them, but haven't succeeded yet. With plot3d(x=seq(min(traffic$lon),max(traffic$lon)),y=seq(min(traffic$lat),max(traffic$lat)),z=traffic$alt) all i get is http:/

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread Rich Shepard
On Wed, 9 Nov 2011, David Winsemius wrote: I don't see a data= argument specified, so you are telling lm() that your workspace has individual vectors by those names in the formula. That is not what is implied by hte rest of your message. David, That's because I attached the data frame befor

[R] path.diagram in SEM--display covariances without variances

2011-11-09 Thread Dustin Fife
Forgive me if I'm posting to the wrong placeIt's my first time posting. Here's the situation: I'm using the sem package and making path diagrams using path.diagrams. Suppose I have the following code: #install.packages("ggm") require(ggm) cor = rcorr(7) nm = c("SOF", "IWF", "PWF", "FSC", "FSF

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread David Winsemius
On Nov 9, 2011, at 12:04 PM, Rich Shepard wrote: I would appreciate pointers on what I should read to understand this output: summary(lm(TDS ~ Cond + Ca + Cl + Mg + Na + SO4)) I don't see a data= argument specified, so you are telling lm() that your workspace has individual vectors by tho

Re: [R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread B77S
Please see ?dput use dput(your data) and paste the output into a reply, thanks. This way we know what you are working with. Rich Shepard wrote: > > I would appreciate pointers on what I should read to understand this > output: > > summary(lm(TDS ~ Cond + Ca + Cl + Mg + Na + SO4)) > > Ca

[R] Interpreting Multiple Linear Regression Summary

2011-11-09 Thread Rich Shepard
I would appreciate pointers on what I should read to understand this output: summary(lm(TDS ~ Cond + Ca + Cl + Mg + Na + SO4)) Call: lm(formula = TDS ~ Cond + Ca + Cl + Mg + Na + SO4) Residuals: ALL 1 residuals are 0: no residual degrees of freedom! Coefficients: (6 not defined because of s

Re: [R] algorithm that iteratively drops columns of a data-frame

2011-11-09 Thread Jeff Newmiller
Try data[,!names(data) %in% names(col_means)] On Wed, 9 Nov 2011, Martin Batholdy wrote: Dear R-Users, I have a problem with an algorithm that iteratively goes over a data.frame and exclude n-columns each step based on a statistical criterion. So that the 'column-space' gets smaller and sma

Re: [R] Installing binaries from R-Forge

2011-11-09 Thread Gabor Grothendieck
On Wed, Nov 9, 2011 at 11:08 AM, Jeff Newmiller wrote: > As Uwe said, you need to read the fine manual and set up your system to be > able to compile source packages. On Windows that essentially means installing > Rtools and Miktek, and configuring some environment variables. > -

Re: [R] Installing binaries from R-Forge

2011-11-09 Thread Jeff Newmiller
As Uwe said, you need to read the fine manual and set up your system to be able to compile source packages. On Windows that essentially means installing Rtools and Miktek, and configuring some environment variables. --- Jeff

Re: [R] algorithm that iteratively drops columns of a data-frame

2011-11-09 Thread R. Michael Weylandt
Perhaps attach placeholder names to your columns and use those rather than indices? Michael On Wed, Nov 9, 2011 at 10:36 AM, Martin Batholdy wrote: > Dear R-Users, > > > I have a problem with an algorithm that iteratively goes over a data.frame > and exclude n-columns each step based on a stati

[R] Invalid 'yscale' in viewport

2011-11-09 Thread Erin Jonaitis
I tried Googling for help on this problem, but what I saw only increased my puzzlement. I found a lovely bit of code called esplot() that makes scatterplots with associated histograms and rug plots. I have been trying to use it on my own data, but the viewport routine on which it depends (I think

[R] algorithm that iteratively drops columns of a data-frame

2011-11-09 Thread Martin Batholdy
Dear R-Users, I have a problem with an algorithm that iteratively goes over a data.frame and exclude n-columns each step based on a statistical criterion. So that the 'column-space' gets smaller and smaller with each iteration (like when you do stepwise regression). The problem is that in ever

Re: [R] Intervals in function cut

2011-11-09 Thread JulioSergio
jim holtman gmail.com> writes: ... Thanks Jim, very useful your information, Sergio. __ 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/posting-guide.html and pro

Re: [R] reorder data.frame

2011-11-09 Thread David Winsemius
On Nov 9, 2011, at 10:14 AM, Johannes Radinger wrote: Hello, I very general question but probably usefull to others as well: Is there any prebuild function that reorders a dataframe from: x1x2 1 100 200 2 101 201 3 102 202 4 103 203 5 104 204 6 105 205 to 1 100 x1

Re: [R] reorder data.frame

2011-11-09 Thread R. Michael Weylandt
df = data.frame(x1 = 100:105, x2 = 200:205) library(reshape2) melt(df) Michael On Wed, Nov 9, 2011 at 10:14 AM, Johannes Radinger wrote: > Hello, > > I very general question but probably usefull to others as well: > > Is there any prebuild function that reorders a dataframe from: > >   x1    x2

Re: [R] window?

2011-11-09 Thread R. Michael Weylandt
Yes, that will definitely create a time series with the desired frequency, though the actual time index won't correspond to the original so you may need to exercise a little bit of caution in interpreting the outputs of ets(). Glad this could help, Michael On Wed, Nov 9, 2011 at 9:15 AM, wrote:

[R] reorder data.frame

2011-11-09 Thread Johannes Radinger
Hello, I very general question but probably usefull to others as well: Is there any prebuild function that reorders a dataframe from: x1x2 1 100 200 2 101 201 3 102 202 4 103 203 5 104 204 6 105 205 to 1 100 x1 2 101 x1 3 102 x1 4 103 x1 5 104 x1 6 105 x1 7

Re: [R] Installing binaries from R-Forge

2011-11-09 Thread Downey, Patrick
I'm sorry. I made a mistake. I accidentally had 2 versions of R open and got that error message from R-2.10. When I correctly enter the commands you suggest into R-2.14 I get the same as you. However, my installation is filled with errors. I assume the following means that I should install each o

  1   2   >