Re: [R] coplot question

2013-02-07 Thread Jose Iparraguirre
Hi, Derek, Try and modify the value for the overlap argument. Hope this helps, José -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of derek@nemac Sent: 07 February 2013 03:49 To: r-help@r-project.org Subject: [R] coplot question

Re: [R] low pass filter analysis in R

2013-02-07 Thread Bretschneider SIG-R
Dear Janesh Devkota, Re: Hello R users, I am trying to use R to do the low pass filter analysis for the tidal data. I am a novice in R and so far been doing only simple stuffs on R. I found a package called signal but couldn't find the proper tutorial for the low pass filter. Could

Re: [R] Error message for .csv file

2013-02-07 Thread vkent
Hi Torrey Yes - it turned out that it wasn't a problem with the .csv file it was a problem with SPACECAP. I was trying to use too small a pixel size for the home range centres. The smallest pixel size that SPACECAP can handle is 0.25 sq km. Hope this helps Vivien On 07/02/2013 05:14,

[R] Help R.matlab

2013-02-07 Thread Thomas Van Boeckel
Dear useRs, This post relates to a similar problem ( https://stat.ethz.ch/pipermail/r-help/2010-August/250719.html) I am using R.matlab (R.matlab v1.6.3 (2013-01-17) to iterate matrix multiplication in matlab 2012Rb. Everything works fine except for some random iteration of my model the command

Re: [R] Problem with xlsx package

2013-02-07 Thread da_el
easiest workaround, save the .xlsx to a .xls -- View this message in context: http://r.789695.n4.nabble.com/Problem-with-xlsx-package-tp3298470p4657787.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

Re: [R] how to draw confidence interval lines of a fitted curve of polynominal regression

2013-02-07 Thread Eik Vettorazzi
Hi Elaine you can do all at one go using the ggplot2-package library(ggplot2) qplot(age,weight)+ geom_smooth(method=lm,formula=y~poly(x,2)) Have a look at ?geom_smooth when you want to incooperate customized model predictions cheers. Am 07.02.2013 02:31, schrieb Elaine Kuo: Hello, I drew a

Re: [R] how to draw confidence interval lines of a fitted curve of polynominal regression

2013-02-07 Thread Rui Barradas
Hello, You should follow the posting guide and provide us with a data and code example. # Make up some data x - seq(0, 1, length.out = 20) y - x^2 + rnorm(20) # fit a quadratic model - lm(y ~ I(x^2)) fitted - predict(model, interval = confidence) # plot the data and the fitted line plot(x,

Re: [R] low pass filter analysis in R

2013-02-07 Thread Bretschneider SIG-R
Dear Janesh Devkota, Sorry, I forgot an edit. The last command should read: yfiltered = signal:::filter(myfilter, y) # apply filter Best wishes, Franklin Bretschneider -- Dept Biologie Kruytgebouw W711 Padualaan 8 3584 CH Utrecht The Netherlands

Re: [R] Peak detector help!?

2013-02-07 Thread Johannes Graumann
Johannes Graumann wrote: Grrr ... new trial with code here: http://pastebin.com/RjHNNG9J Maybe the amount of inline-code prevented posting? Hello, I am writing a simple peak detector and it works quite well ... however there's one special case below, that I can't get my head wrapped

Re: [R] Heteroscedasticity Plots

2013-02-07 Thread Michael Friendly
car::spreadLevelPlot is designed for just this purpose. Something similar is one of the plots produced by plot(lm(...)) HTH On 2/6/2013 9:42 AM, N. Janz wrote: To detect heteroscedasticity for a multiple linear OLS regression (no time dependencies): What if the residuals vs. fitted values

[R] Probability(Markov chain transition matrix)

2013-02-07 Thread remmy musumpuka
Hello there! Remmy is my name and I came across an interesting code in R on this web https://stat.ethz.ch/pipermail/r-help/2004-May/050424.html , there are some parts that I have not followed and I would like to get some comments if you may! Please comment on the highlighted  two parts of the

[R] appending and merging data frames

2013-02-07 Thread John Smith
I know that the basic approach to append or merge data frames is using the rbind and merge commands. However, if I understand things correctly, for both commands one needs to do quite some additional programming to get e.g. behavior as with the Stata append and morge commands or to achieve some

Re: [R] spatstat kstest

2013-02-07 Thread Rui Barradas
Hello, Try the following. maintainer(spatstat) [1] Adrian Baddeley adrian.badde...@csiro.au Hope this helps, Rui Barradas Em 07-02-2013 02:05, Hiroshi Saito escreveu: Dear sir, Which mailing list is appropriate to ask for kstest in spatstat? Regards, Hiroshi Saito

Re: [R] Help with Bayesian Logistic Regression

2013-02-07 Thread arunarajballie
Hi, I need assitance with performing a Bayesian Ordered Logistic Regression in R. Would you be able to assist? Aruna Sent from my BlackBerry® wireless device available from bmobile. __ R-help@r-project.org mailing list

Re: [R] low pass filter analysis in R

2013-02-07 Thread Shotwell, Matthew Stephen
Janesh, This might help get you started: http://biostatmatt.com/archives/78 (apologies for linking to my own blog) Regards, Matt -- Message: 51 Date: Wed, 6 Feb 2013 18:50:43 -0600 From: Janesh Devkota janesh.devk...@gmail.com To: r-help@r-project.org Subject:

[R] Spatstat - Kest, envelope problem

2013-02-07 Thread Pavel_K
Hello, I am writing cause I have a problem when try to create confidence envelopes in spatstat. I have a point data representing firms in my study area. When I try to create confidence envelopes the error message turns up: [ p - envelope(point, fun=Kest, nsim=99) Error in marks.ppp(Y, dfok =

Re: [R] Modifying Package Data

2013-02-07 Thread S Ellison
If another user does not want to get the full taxonomic description of that particular fly, he/she is welcome to ignore it along with all the other taxa he/she is not referencing. All true, but the OP was asking about modifying a file that is part of an installed. package. That is surely

Re: [R] Question about NLS model

2013-02-07 Thread S Ellison
After applying the NLS for a model like y=exp(a*x), and I get a result showing the summary as: Estimate Std. Error t value Pr(|t|) 2.6720 1.4758 1.811 0.3212 My question is what this t-statistics tests? And what's the meaning of Pr? t is (estimate/std.err) and can be used to

Re: [R] appending and merging data frames

2013-02-07 Thread Gerrit Eichner
Hello, John, as a start take a look at ?merge And to (maybe) get a bit overwhelmed at first sight use RSiteSearch( merge) Hth -- Gerrit On Thu, 7 Feb 2013, John Smith wrote: I know that the basic approach to append or merge data frames is using the rbind and merge commands. However,

Re: [R] R for Windows 32-bit mode versus 64-bit mode

2013-02-07 Thread Roy Mendelssohn - NOAA Federal
Thanks. -Roy M. On Feb 6, 2013, at 11:55 PM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On 06/02/2013 22:47, Roy Mendelssohn - NOAA Federal wrote: Hi All: We are developing (actually updating) a piece of code that runs in R. Due to some limitations of some the libraries we use, at the

Re: [R] Hard Stop?

2013-02-07 Thread William Dunlap
q()? E.g., f - function(x) { switch(sign(x)+2, q(), stop(Oops), NULL) ; sqrt(x) } tryCatch(f(2), error=function(e)error) [1] 1.414214 tryCatch(f(0), error=function(e)error) [1] error tryCatch(f(-2), error=function(e)error) Save workspace image? [y/n/c]: c for(i in

[R] OBIEE (Oracle Business Intelligence) and R - Is there a way to connect and pull in tables/answers

2013-02-07 Thread Lopez, Dan
Hi, Is anyone aware if there is a package that allows one to connect to Oracle Business Intelligence (aka OBIEE)? I want to be able to pull in a summary table contained in an answer (aka OBIEE query). Dan Lawrence Livermore National Lab WF Analyst [[alternative HTML version

Re: [R] Question about NLS model

2013-02-07 Thread Liu, Liang
Thanks, Ellison. Another question is if this p-value is a good parameter to test if the fitting is good, as you this test is only for the null that the coefficient is 0 (a is 0 in y=exp(a*x), right?)? On Thu, Feb 7, 2013 at 10:48 AM, S Ellison s.elli...@lgcgroup.com wrote: After applying

Re: [R] confidence / prediction ellipse

2013-02-07 Thread Giuseppe Amatulli
Hi Rolf, sorry for this late answer and thanks for your kind explanation and relative R code. I really appreciate. In reality the concept that I'm trying to address is a bit more complex. I'm fitting a model y vs 6 predictors with MARS / RandomForest / Multiple Linear Regression Models having 140

[R] R intermittently crashes across cluster

2013-02-07 Thread Ken Weiss
Greetings, I am having an interesting problem and I wonder if anyone else has seen this behavior. I am running R 2.11.1 with SNOW 0.3-3 on a Dell cluster running CentOS 5.5. I create my cluster using: cluster- makeCluster(nodes,type=SOCK,port=10191) # nodes is a vector of compute nodes I

Re: [R] appending and merging data frames

2013-02-07 Thread John Smith
Hi Gerrit, as I said in my original email, I already know both the merge and the rbind commands, but I think that many standard situations (I have given just a few) require rather clumsy ad-hoc programming. So I was wondering if there are any packages or existing code that would make it easier to

Re: [R] Merging data in arrays

2013-02-07 Thread arun
Hi, I didn't fully understand the logic. You could get the result by:  list1-lapply(mapply(cbind,lapply(1:2,function(i) E[,,i]),lapply(c(1,3),function(i) C[,i,]),SIMPLIFY=FALSE),function(x) x[,c(TRUE,apply(matrix(!x[,-1]%in% x[,1],nrow=5),2,all))])

[R] calling outside program to run from R - similar to X command in SAS

2013-02-07 Thread Leigh Michelle Williams
I'm new to R and have not been able to find what I am looking for online. I found the system command but that seems to be used for getting lists of directories, etc. I am trying to replicate something that I used to do in SAS. I am simulating some data (which I can do in R with a particular

[R] help with creating new variables using a loop

2013-02-07 Thread christel lacaze
Hi there, I've got a set of 10 numeric variables called Mood1 to Mood10 in a dataset called mood. I'm trying to create a set of 10 new variables called m1 to m10 so that m1=Mood1*1, m2=Mood2*2, etc to m10=Mood10*10 Trawling through the internet, I eventually tried the following code: for (i

[R] indexing operation based upon a sequence

2013-02-07 Thread J. Braeken
Dear R-list, We stumbled upon some weird problem when performing a simple indexing operation. Below some example code to illustrate the issue #FAILS TO FIND .55 Oo huh1 = seq(.1,.7,.15);huh1 # [1] 0.10 0.25 0.40 0.55 0.70 huh1 == .25 # [1] FALSE TRUE FALSE FALSE FALSE huh1 == .55 # [1] FALSE

Re: [R] coplot question

2013-02-07 Thread derek@nemac
Hi José Yes indeed that does help. Thanks, Derek On 2/7/2013 5:01 AM, Jose Iparraguirre wrote: Hi, Derek, Try and modify the value for the overlap argument. Hope this helps, José -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf

Re: [R] indexing operation based upon a sequence

2013-02-07 Thread Berend Hasselman
R-FAQ 7.31 Berend On 07-02-2013, at 17:41, J. Braeken j.brae...@uvt.nl wrote: Dear R-list, We stumbled upon some weird problem when performing a simple indexing operation. Below some example code to illustrate the issue #FAILS TO FIND .55 Oo huh1 = seq(.1,.7,.15);huh1 # [1] 0.10

Re: [R] appending and merging data frames

2013-02-07 Thread David Winsemius
On Feb 7, 2013, at 9:12 AM, John Smith wrote: Hi Gerrit, as I said in my original email, I already know both the merge and the rbind commands, but I think that many standard situations (I have given just a few) require rather clumsy ad-hoc programming. So I was wondering if there are any

Re: [R] help with creating new variables using a loop

2013-02-07 Thread Barry Rowlingson
On Thu, Feb 7, 2013 at 4:16 PM, christel lacaze christellac...@hotmail.co.uk wrote: Hi there, I've got a set of 10 numeric variables called Mood1 to Mood10 in a dataset called mood. That's where you went wrong in the first place. Don't use variable names for indexing purposes. You should

Re: [R] calling outside program to run from R - similar to X command in SAS

2013-02-07 Thread Ista Zahn
Hi Leigh, On Thu, Feb 7, 2013 at 10:35 AM, Leigh Michelle Williams lwilliams...@gsu.edu wrote: I'm new to R and have not been able to find what I am looking for online. I found the system command but that seems to be used for getting lists of directories, etc. The etc. includes many things

Re: [R] indexing operation based upon a sequence

2013-02-07 Thread John Smith
I think this is because some decimal numbers with a fixed number of digits after the decimal point cannot be represented as base-2 floating point numbers with a limited number of digits. So when one adds them up, the result is slightly different from the sum: huh1 = seq(.1,.7,.15) huh1 - 0.55

Re: [R] calling outside program to run from R - similar to X command in SAS

2013-02-07 Thread Ben Bolker
Leigh Michelle Williams lwilliams146 at gsu.edu writes: I'm new to R and have not been able to find what I am looking for online. I found the system command but that seems to be used for getting lists of directories, etc. I am trying to replicate something that I used to do in SAS. I am

Re: [R] appending and merging data frames

2013-02-07 Thread John Smith
I gave a small number of examples in my first email. For append, in Stata any variable that is missing in the other dataset is automatically inserted with all values set to the missing value. In R, one would first have to compare the columns in both data frames and generate columns apropriately.

Re: [R] Question about NLS model

2013-02-07 Thread Bert Gunter
Liang: In nonlinear models especially (and more generally, also), small p values are not reliable indicators of whether a fit is or is notgood. I would strongly suggest that you consult with your local statistician -- this is a (complicated, as it depends on the meaning of good) statistical

[R] why object 'x' not found?

2013-02-07 Thread Winfried Moser
Dear Listers, I try to change the structure of my data. i have an indicator-matrix and want to end up with a factor. i have v1 v2 v3 1 0 0 0 1 0 0 0 1 and want v1 v2 v3 v4 1 0 0 1 0 1 0 2 0 0 1 3 amongst other things i tried the following d -

Re: [R] low pass filter analysis in R

2013-02-07 Thread Janesh Devkota
Dear Franklin Bretschneider, Thank you so much for your reply and explanation about the filter using the stats and signal package. I decided to opt the filter method in signal package. I have a simple question about the cut off frequency here. I have 30 minute collected tidal data and I want to

Re: [R] appending and merging data frames

2013-02-07 Thread William Dunlap
For merge, when merging dataset A with dataset B on some set of key variables, it is possible to specify if the join should be done 1:1, 1:n, n:1 or n:m. Stata creates a data structure that contains information about which observations could or could not be matched and which matches did not

[R] combining dataframes into single df with all columns

2013-02-07 Thread Anika Masters
#I have 2 dataframes df1 df2. Each has a subset of all possible column names. #How do I combine the 2 tables so that they contain all column names? data1 - c('2','3', '6', '8' , '9') data2 - c('1', '2', '3', '6') df1 - data.frame(matrix(data=NA, nrow=1, ncol=length(data1),

Re: [R] Hard Stop?

2013-02-07 Thread Duncan Murdoch
On 06/02/2013 8:33 PM, ivo welch wrote: is it possible to throw a stop() that is so hard that it will escape even tryCatch? You can signal a condition that is not an error, and if tryCatch hasn't been written to catch it, it will stop. For example, g - function() { tryCatch(f(),

Re: [R] why object 'x' not found?

2013-02-07 Thread jim holtman
try this: x - read.table(text = v1 v2 v3 + 1 0 0 + 0 1 0 + 0 0 1, header = TRUE) x$v4 - apply(x, 1, function(a) which(a == 1)) x v1 v2 v3 v4 1 1 0 0 1 2 0 1 0 2 3 0 0 1 3 On Thu, Feb 7, 2013 at 1:20 PM, Winfried Moser winfried.mo...@gmail.com wrote: Dear

Re: [R] why object 'x' not found?

2013-02-07 Thread Duncan Murdoch
On 07/02/2013 1:20 PM, Winfried Moser wrote: Dear Listers, I try to change the structure of my data. i have an indicator-matrix and want to end up with a factor. i have v1 v2 v3 1 0 0 0 1 0 0 0 1 and want v1 v2 v3 v4 1 0 0 1 0 1 0 2 0 0 1 3 amongst other

[R] combining dataframes into single df with all columns

2013-02-07 Thread Anika Masters
#I have 2 dataframes df1 df2. Each has a subset of all possible column names. #How do I combine the 2 tables so that they contain all column names? data1 - c('2','3', '6', '8' , '9') data2 - c('1', '2', '3', '6') df1 - data.frame(matrix(data=NA, nrow=1, ncol=length(data1), dimnames=list(NULL,

Re: [R] OBIEE (Oracle Business Intelligence) and R - Is there a way to connect and pull in tables/answers

2013-02-07 Thread Marc Schwartz
On Feb 7, 2013, at 10:47 AM, Lopez, Dan lopez...@llnl.gov wrote: Hi, Is anyone aware if there is a package that allows one to connect to Oracle Business Intelligence (aka OBIEE)? I want to be able to pull in a summary table contained in an answer (aka OBIEE query). Dan Lawrence

[R] Feature selection for kmeans

2013-02-07 Thread SpaceSeller
I know that within sum of squares, DB, sillhouette and cophenetic are indicators of clustering quality, but what indicators I need to observe when I choose attributes for kmeans? -- View this message in context: http://r.789695.n4.nabble.com/Feature-selection-for-kmeans-tp4657830.html Sent

Re: [R] why object 'x' not found?

2013-02-07 Thread arun
Hi, You could get the result: dat1 - read.table(text = v1 v2 v3  1   0   0  0   1   0  0   0   1 ,sep=,header=TRUE) dat1$v4-apply(mapply(`==`,dat1,1),2,which)  dat1  # v1 v2 v3 v4 #1  1  0  0  1 #2  0  1  0  2 #3  0  0  1  3 A.K. - Original Message - From: Winfried Moser

[R] compare objects in two different workspaces

2013-02-07 Thread Shi, Tao
Hi list, Is there a easy way to compare objects in two different workspace files (i.e. .RData files) in R?  I can use some generic file compare softwares (e.g. BeyondCompare) to binary comparison, but when it says they're different you can't tell where the difference are from. Thanks! Tao

[R] Sourcing my file does not print command outputs

2013-02-07 Thread James Jong
I looked at the documentation of source() and summary(), and I could not find the reason why calling something like: summary(resamps) from the command line, works (it prints the summary) whereas calling summary(resampls) from a file that I source with source(my_file.r) does not print

[R] Saving history across sessions

2013-02-07 Thread James Jong
I have an environment variable `$R_HISTFILE` pointing to `/home/my.username/.RHistory` and the following code in my `.Rprofile` in my home directory: .Last - function() { if (!any(commandArgs()=='--no-readline') interactive()){ require(utils)

Re: [R] appending and merging data frames

2013-02-07 Thread John Smith
One rather extremem limitation in Stata is that there is always only just one active or loaded dataset. So all the commands that involve more than one dataset operate on the loaded master dataset and one or more other datasets that are stored somewhere. Merge in Stata joins the loaded master

Re: [R] Sourcing my file does not print command outputs

2013-02-07 Thread John Kane
From ?source Note that running code via source differs in a few respects from entering it at the R command line. Since expressions are not executed at the top level, auto-printing is not done. So you will need to include explicit print calls for things you want to be printed John Kane Kingston

Re: [R] calculating odds ratio in logistic regression with interaction terms

2013-02-07 Thread Aminreza Aamini
Hi, I am comparing SAS commands with R. consider i want to assess the effect of one exposure(like CAT where 1 equals high and 0 equals low) and one cofounding variable (like cholesterol leve,CHL) on a diseasee variable (like CHD). In SAS to get a numerical value for the odds ratio, consider, for

Re: [R] combining dataframes into single df with all columns

2013-02-07 Thread arun
Hi, You could use ?merge() or ?join() from library(plyr)  merge(df1,df2,all=TRUE) #  col2 col3 col6 col8 col9 col1 #1    2    3    6   NA   NA    1 #2   NA   NA   NA   NA   NA   NA A.K. - Original Message - From: Anika Masters anika.mast...@gmail.com To: r-help@r-project.org Cc: Sent:

Re: [R] combining dataframes into single df with all columns

2013-02-07 Thread Rui Barradas
Hello, The following function will give what you seem to want. fun - function(x, y){ df3 - x df3 - cbind(df3, df2[setdiff(names(y), names(x))]) df3[order(names(df3))] } fun(df1, df3) Hope this helps, Rui Barradas Em 07-02-2013 18:36, Anika Masters escreveu: #I

Re: [R] calculating odds ratio in logistic regression with interaction terms

2013-02-07 Thread David Winsemius
On Feb 7, 2013, at 10:58 AM, Aminreza Aamini wrote: Hi, I am comparing SAS commands with R. consider i want to assess the effect of one exposure(like CAT where 1 equals high and 0 equals low) and one cofounding variable (like cholesterol leve,CHL) on a diseasee variable (like CHD). In SAS

Re: [R] why object 'x' not found?

2013-02-07 Thread Winfried Moser
thank's, that worked! 2013/2/7 jim holtman jholt...@gmail.com try this: x - read.table(text = v1 v2 v3 + 1 0 0 + 0 1 0 + 0 0 1, header = TRUE) x$v4 - apply(x, 1, function(a) which(a == 1)) x v1 v2 v3 v4 1 1 0 0 1 2 0 1 0 2 3 0 0 1 3 On Thu, Feb

Re: [R] why object 'x' not found?

2013-02-07 Thread Winfried Moser
thanks, that worked! 2013/2/7 arun smartpink...@yahoo.com Hi, You could get the result: dat1 - read.table(text = v1 v2 v3 1 0 0 0 1 0 0 0 1 ,sep=,header=TRUE) dat1$v4-apply(mapply(`==`,dat1,1),2,which) dat1 # v1 v2 v3 v4 #1 1 0 0 1 #2 0 1 0 2 #3 0 0 1

Re: [R] why object 'x' not found?

2013-02-07 Thread David Winsemius
On Feb 7, 2013, at 10:20 AM, Winfried Moser wrote: Dear Listers, I try to change the structure of my data. i have an indicator-matrix and want to end up with a factor. i have v1 v2 v3 1 0 0 0 1 0 0 0 1 and want v1 v2 v3 v4 1 0 0 1 0 1 0 2 0 0 1

Re: [R] combining dataframes into single df with all columns

2013-02-07 Thread Rui Barradas
Hello, Sorry, there's a bug in my first reply. Corrected: fun - function(x, y){ df3 - cbind(x, y[setdiff(names(y), names(x))]) df3[order(names(df3))] } fun(df1, df2) Rui Barradas Em 07-02-2013 19:16, Rui Barradas escreveu: Hello, The following function will give what you

Re: [R] why object 'x' not found?

2013-02-07 Thread Winfried Moser
thanks! I didn't know, that x$y isn't a variable, but an expression! with the suggested notation d[[x]] i get a matrix and have to extract the diagonale. d - data.frame(d1=c(1,0,0), d2=c(0,1,0), d3=c(0,0,1)) d$nr - NA sapply(1:3, function(x) ifelse(d[[x]]==**1,x,d$nr)) [,1] [,2] [,3] [1,]1

Re: [R] Sourcing my file does not print command outputs

2013-02-07 Thread William Dunlap
You can leave your script as it was and use source()'s print.eval=TRUE or echo=TRUE arguments to get the autoprinting done as it is at the command line (echo=TRUE also prints the commands). E.g., for the file /tmp/x.R containing the 2 lines d - mtcars[,c(am,gear,hp,mpg)] summary(lm(data=d,

Re: [R] Sourcing my file does not print command outputs

2013-02-07 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of John Kane Sent: Thursday, February 07, 2013 10:57 AM To: James Jong; r-help@r-project.org Subject: Re: [R] Sourcing my file does not print command outputs From ?source Note

[R] The use of R Commander for beginning students and newbies

2013-02-07 Thread Dr. Thomas W. MacFarland
Everyone: In the last few months I've noticed an increasing number of questions to this list from students who are new to the use of R and who have limited (in any) local support on R and specifically support for R syntax. My text

Re: [R] why object 'x' not found?

2013-02-07 Thread Andrew Robinson
Hi David, The following is an interesting observation ... On Friday, February 8, 2013, David Winsemius wrote: On Feb 7, 2013, at 10:20 AM, Winfried Moser wrote: Notice that the '[[' function is superior in every way to the '$' function. I'm curious to know whether you can point to

Re: [R] Select only unique rows from a data frame

2013-02-07 Thread Bert Gunter
?unique Please learn to search for yourself, e.g. via: ??unique or the tons of other ways. -- Bert On Thu, Feb 7, 2013 at 12:50 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello! I have a data frame with several rows, for example: x=as.data.frame(matrix(c(1,2,3,

Re: [R] Spatstat - Kest, envelope problem

2013-02-07 Thread Rolf Turner
You can solve this problem by actually *reading* the error message. Evidently the object point is a marked point pattern whose marks are in the form of a data frame. So either: (1) Do not create point as a marked point pattern --- i.e. don't add a marks component when you create it,

Re: [R] R intermittently crashes across cluster

2013-02-07 Thread R. Michael Weylandt
On Thu, Feb 7, 2013 at 2:07 PM, Ken Weiss kgwe...@umich.edu wrote: Greetings, I am having an interesting problem and I wonder if anyone else has seen this behavior. I am running R 2.11.1 with SNOW 0.3-3 on a Dell cluster running CentOS 5.5. Simplest suggestion -- can you update to current

Re: [R] compare objects in two different workspaces

2013-02-07 Thread R. Michael Weylandt
On Thu, Feb 7, 2013 at 5:53 PM, Shi, Tao shida...@yahoo.com wrote: Hi list, Is there a easy way to compare objects in two different workspace files (i.e. .RData files) in R? I can use some generic file compare softwares (e.g. BeyondCompare) to binary comparison, but when it says they're

Re: [R] compare objects in two different workspaces

2013-02-07 Thread Bert Gunter
... but you need to load them into different environments in case they have objects with the same name, right? -- Bert On Thu, Feb 7, 2013 at 1:25 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: On Thu, Feb 7, 2013 at 5:53 PM, Shi, Tao shida...@yahoo.com wrote: Hi list, Is there a

Re: [R] Sourcing my file does not print command outputs

2013-02-07 Thread James Jong
Thanks. Interestingly I am having the same problem with dotplot(resamps, metric = Accuracy) Nothing shows up if I source the file. But I can visualize it I call this command from the command line... Any thoughts? Thanks again, James On Thu, Feb 7, 2013 at 3:09 PM, Nordlund, Dan (DSHS/RDA)

[R] Saving model and other objects from caret

2013-02-07 Thread James Jong
Say I train a model in caret, e.g.: RFmodel - train(X,Y,method='rf',trControl=myCtrl,tuneLength=1) How can I save this to disk and load it later in R? How about an object of the class resamples? resamps - resamples( list( RF = RFmodel, SVM = SVMmodel,

Re: [R] Sourcing my file does not print command outputs

2013-02-07 Thread Nordlund, Dan (DSHS/RDA)
I don’t know where resamps comes from and I don’t know what parameters you provided to source(), so you haven’t provided a reproducible example. But, did you call source with print.eval=TRUE ? Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning,

Re: [R] Saving model and other objects from caret

2013-02-07 Thread Stephan Kolassa
Have you looked at ?save and ?load? As I already wrote here: http://stackoverflow.com/questions/14761496/saving-and-loading-a-model-in-r Best, Stephan On 07.02.2013 22:33, James Jong wrote: Say I train a model in caret, e.g.: RFmodel - train(X,Y,method='rf',trControl=myCtrl,tuneLength=1)

[R] Fwd: Sourcing my file does not print command outputs

2013-02-07 Thread James Jong
Thanks Dan, Here is a minimal full example, where dotplot fails to print anything if I source the file. I have tried restarting R and directly sourcing this file without doing anything else first (my .Rprofile is empty). This is running on Linux with the latest stable version of R.

Re: [R] Saving model and other objects from caret

2013-02-07 Thread James Jong
Thanks Stephan. I can't believe I didn't try that first. I greatly appreciate it. James On Thu, Feb 7, 2013 at 4:45 PM, Stephan Kolassa stephan.kola...@gmx.dewrote: Have you looked at ?save and ?load? As I already wrote here: http://stackoverflow.com/**

Re: [R] why object 'x' not found?

2013-02-07 Thread William Dunlap
Notice that the '[[' function is superior in every way to the '$' function. I'm curious to know whether you can point to some consolidated comparison? Two problems are that List$name allows abbreviations of name and does not allow variable names. With List$name you get: List -

Re: [R] Saving model and other objects from caret

2013-02-07 Thread Michael Weylandt
On Feb 7, 2013, at 9:51 PM, James Jong ribonucle...@gmail.com wrote: Thanks Stephan. I can't believe I didn't try that first. I greatly appreciate it. James On Thu, Feb 7, 2013 at 4:45 PM, Stephan Kolassa stephan.kola...@gmx.dewrote: Have you looked at ?save and ?load? I generally

Re: [R] Saving model and other objects from caret

2013-02-07 Thread James Jong
What are the *RDS counterparts? What is the difference? James On Thu, Feb 7, 2013 at 5:00 PM, Michael Weylandt michael.weyla...@gmail.com wrote: On Feb 7, 2013, at 9:51 PM, James Jong ribonucle...@gmail.com wrote: Thanks Stephan. I can't believe I didn't try that first. I greatly

Re: [R] compare objects in two different workspaces

2013-02-07 Thread Bert Gunter
Ummm... Have you actually read ?load to see how do this using the environment argument? -- Bert On Thu, Feb 7, 2013 at 1:58 PM, Shi, Tao shida...@yahoo.com wrote: In fact, they have objects with exact same names. They were created by the same code at different time points. The code is not

[R] FW: Sourcing my file does not print command outputs

2013-02-07 Thread Nordlund, Dan (DSHS/RDA)
Forgot to send to R-help From: Nordlund, Dan (DSHS/RDA) Sent: Thursday, February 07, 2013 2:09 PM To: 'James Jong' Subject: RE: [R] Sourcing my file does not print command outputs James, Your code seems to have ‘…’ sitting on a line all by itself (maybe should be at the end of the

Re: [R] Sourcing my file does not print command outputs

2013-02-07 Thread James Jong
Thanks Dan. The ... is an accidental typo in the email. Would you mind verifying that dotplot opens a plot *without* print.eval=TRUE? Thanks, J. On Thu, Feb 7, 2013 at 5:08 PM, Nordlund, Dan (DSHS/RDA) nord...@dshs.wa.gov wrote: James, ** ** Your code seems to have ‘…’ sitting on

Re: [R] Sourcing my file does not print command outputs

2013-02-07 Thread Nordlund, Dan (DSHS/RDA)
No, it does not. If you don’t use print.eval=TRUE, you would need to wrap the dotplot() call in a print() inside your script file, i.e. print(dotplot(resamps, metric = Accuracy)) Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and

Re: [R] Spatstat - Kest, envelope problem

2013-02-07 Thread Rolf Turner
P. S. I just noticed that you referred to the envelopes produced as confidence envelopes. They are ***NOT*** confidence envelopes!!! They are critical envelopes. This is a very different concept. Repeat after me, 50 times: critical envelopes, critical envelopes, critical envelopes,

Re: [R] Hard Stop?

2013-02-07 Thread luke-tierney
There are 4 ways, other than generating a core dump :-), that could fit your vague desctiption: Call q(no); this is the only way to avoid 'finally' expressions in tryCatch if that is really what you want. You can invoke an abort restart; there will be one established by the

Re: [R] why object 'x' not found?

2013-02-07 Thread Andrew Robinson
Thanks, Bill. Andrew On Thu, Feb 07, 2013 at 09:21:53PM +, William Dunlap wrote: Notice that the '[[' function is superior in every way to the '$' function. I'm curious to know whether you can point to some consolidated comparison? Two problems are that List$name allows

[R] On p-values presented in the summary of Linear Models

2013-02-07 Thread Antonio Silva
Dear list members I have a doubt on how p-values for t-statistics are calculated in the summary of Linear Models. Here goes an example: x - rnorm(100,50,10) y - rnorm(100,0,5) fit1-lm(y~x) summary(fit1) summary(fit1)$coef[2] # b summary(fit1)$coef[4] # Std. Error summary(fit1)$coef[6] #

Re: [R] Question about NLS model

2013-02-07 Thread S Ellison
Thanks, Ellison. Another question is if this p-value is a good parameter to test if the fitting is good, Absolutely not. *** This email and any attachments are confidential. Any use, copying or disclosure other than by the

Re: [R] On p-values presented in the summary of Linear Models

2013-02-07 Thread Kevin E. Thorpe
On 02/07/2013 08:22 PM, Antonio Silva wrote: Dear list members I have a doubt on how p-values for t-statistics are calculated in the summary of Linear Models. Here goes an example: x - rnorm(100,50,10) y - rnorm(100,0,5) fit1-lm(y~x) summary(fit1) summary(fit1)$coef[2] # b

Re: [R] On p-values presented in the summary of Linear Models

2013-02-07 Thread Antonio Silva
OK, I found the answer: 2*pt(t,summary(fit1)$df[2]) Thanks anyway ... 2013/2/7 Antonio Silva aolinto@gmail.com Dear list members I have a doubt on how p-values for t-statistics are calculated in the summary of Linear Models. Here goes an example: x - rnorm(100,50,10) y -

Re: [R] On p-values presented in the summary of Linear Models

2013-02-07 Thread S Ellison
On 8 Feb 2013, at 01:24, Antonio Silva aolinto@gmail.com wrote: # Two-sided p-value should be estimated with dt(t,summary(fit1)$df[2]) # isn't it? No, on two counts. First, dt is the density; you need pt, the cumulative probability, not dt. Second, pt(t, ...) would calculate the one

[R] Coercing of types when raising a number to a series of powers

2013-02-07 Thread Julio Sergio
I'm trying to produce a series of powers of a number as follows: | 0.05^0:5 [1] 1 2 3 4 5 This is not the result I expected. I guess some kind of coercion happened, since, | class(0.05^0:5) [1] integer Could anyone explain me what is happening here? Thanks, -Sergio.

Re: [R] Coercing of types when raising a number to a series of powers

2013-02-07 Thread Julio Sergio
Julio Sergio juliosergio at gmail.com writes: I'm trying to produce a series of powers of a number as follows: | 0.05^0:5 I'm sorry for the question. The answer is simple: the result is due to operator precedence not to coercing: | 0.05^(0:5) [1] 1.000e+00 5.000e-02 2.500e-03

Re: [R] Coercing of types when raising a number to a series of powers

2013-02-07 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Julio Sergio Sent: Thursday, February 07, 2013 6:13 PM To: r-h...@stat.math.ethz.ch Subject: [R] Coercing of types when raising a number to a series of powers I'm trying to

Re: [R] Coercing of types when raising a number to a series of powers

2013-02-07 Thread David Winsemius
On Feb 7, 2013, at 6:21 PM, Julio Sergio wrote: Julio Sergio juliosergio at gmail.com writes: I'm trying to produce a series of powers of a number as follows: | 0.05^0:5 I'm sorry for the question. The answer is simple: the result is due to operator precedence not to coercing:

Re: [R] compare objects in two different workspaces

2013-02-07 Thread Shi, Tao
In fact, they have objects with exact same names.  They were created by the same code at different time points.  The code is not version-controlled, so I only have the most recent version, but I want to know what's changed. Tao - Original Message - From: Bert Gunter

[R] effect() error: non-conformable arguments

2013-02-07 Thread Elisha Sigmon
I am trying to calculate adjusted means according to a glm model with a Poisson distribution using effect() in the 'effects' package. I've done this many times before with great success, but this time I'm getting an error. My model contains two factors and two covariates/blocks and I would like

  1   2   >