Re: [R] simulate from conditional distribution

2012-09-13 Thread Petr Savicky
On Thu, Sep 13, 2012 at 05:02:54PM -0400, li li wrote: > Dear all, > Y, X are bivariate normal with all the parameters known. > I would like to generate numbers from the distribution Y | X > c > where c is a constant. > Does there exist an R function generating > random numbers from

Re: [R] problem creating an array

2012-09-13 Thread Bert Gunter
Well, Rui -- I'll bet that that gobSmacked him (and probably others)! So here's just a tiny extra effort at enlightenment. The keys are understanding that: 1. Matrices are (formally) just 2-d arrays. 2. All arrays are just vectors, indexed in "column major" order -- i.e. rows vary the fastest, th

Re: [R] tcltk installation problem in R (Mac OS X version)

2012-09-13 Thread peter dalgaard
On Sep 14, 2012, at 06:48 , David Winsemius wrote: > > On Sep 13, 2012, at 8:05 PM, Nitin Bhardwaj wrote: > >> Hi all, I just installed R on my Mac OS X machine > > How did you do that? (... and please don't reply to this message in r-help. > It should go to R-SIG-Mac and I am adding that ad

Re: [R] tcltk installation problem in R (Mac OS X version)

2012-09-13 Thread David Winsemius
On Sep 13, 2012, at 8:05 PM, Nitin Bhardwaj wrote: > Hi all, I just installed R on my Mac OS X machine How did you do that? (... and please don't reply to this message in r-help. It should go to R-SIG-Mac and I am adding that address. You should delete the r=help address when you reply) > an

Re: [R] calculate within-day correlations

2012-09-13 Thread David Winsemius
On Sep 13, 2012, at 7:09 PM, Rui Barradas wrote: > Hello, > > Try the following. > > Q_use_2 <- split(Q_use, as.Date(Q_use$date)) > SC_use_2 <- split(SC_use, as.Date(SC_use$date)) > > lapply(seq_along(Q_use_2), function(i) cor(Q_use_2[[i]]$Q, SC_use_2[[i]]$SC)) Probably will get better result

Re: [R] problem creating an array

2012-09-13 Thread Rui Barradas
Hello, You don't need the loop, it can be done with one much simpler instruction. Since the number of rows is not important, the example uses a 10x603 matrix. x <- matrix(seq_len(10*603), ncol = 603) y <- array(x, dim = c(10, 3, 201)) # that's it # See the first two y[, , 1:2] Hope this helps

Re: [R] calculate within-day correlations

2012-09-13 Thread Rui Barradas
Hello, Try the following. Q_use_2 <- split(Q_use, as.Date(Q_use$date)) SC_use_2 <- split(SC_use, as.Date(SC_use$date)) lapply(seq_along(Q_use_2), function(i) cor(Q_use_2[[i]]$Q, SC_use_2[[i]]$SC)) Hope this helps, Rui Barradas Em 14-09-2012 01:35, emorway escreveu: useRs, Here is some R-

[R] tcltk installation problem in R (Mac OS X version)

2012-09-13 Thread Nitin Bhardwaj
Hi all, I just installed R on my Mac OS X machine and wanted to installed tcl/tk. So, I installed tcl/tk from this page: http://cran.r-project.org/bin/macosx/tools/ It gets placed in /usr/local dir. and then I installed R. Next, in R, I set the TCL_LIBRARY variable by saying Sys.setenv(TCL_LIBRAR

[R] Adding annotations to qplot from a data frame

2012-09-13 Thread Euan Reavie
I have the following data frame: > algaedata = year DIV cellsperml 2001 BAC 72.808 2001 CHL 3.273 2002 BAC 14.002 2002 CYA 220.896 2002 UNI 464.699 2003 BAP 0 2003 BAC 1.782 2004 CYA 315.799 2005 UNI 222.532 2005 BAP 0.2 2005 CYA 163.627 2005 BAC 324.949 2006 CHL 1.636 2006 BAC 199.145 2007 CHL 19.

Re: [R] calculate within-day correlations

2012-09-13 Thread Joshua Ulrich
On Thu, Sep 13, 2012 at 7:35 PM, emorway wrote: > useRs, > > Here is some R-ready data for my question to follow. Of course this data is > small snippet from a much larger dataset that is about a decade long. > > > Q_use<-data.frame(date=as.POSIXct(paste(Q[,1],"-",Q[,2],"-",Q[,3]," > ",floor(Q[,

Re: [R] Missing Values

2012-09-13 Thread grond
actually this is what worked bootmean(na.omit(X$Y), conf = 90,nrep = 1000) From: "Nordlund, Dan (DSHS/RDA) [via R]" To: grond Date: 09/13/2012 05:43 PM Subject: Re: Missing Values > -Original Message- > From: [hidden email] [mailto:r-help-bounces@r- > project.org] On Behalf Of J

Re: [R] Missing Values

2012-09-13 Thread grond
this worked bootmean(na.omit(Xt$Y), conf = 90,nrep = 1000) thanks From: "Jeff Newmiller [via R]" To: grond Date: 09/13/2012 04:48 PM Subject: Re: Missing Values Don't give it any. Instead of banks$two, use na.omit(banks$two). --

[R] calculate within-day correlations

2012-09-13 Thread emorway
useRs, Here is some R-ready data for my question to follow. Of course this data is small snippet from a much larger dataset that is about a decade long. Q<-read.table(textConnection("2002 3 28 15 77.38815 2002 3 28 30 77.09505 2002 3 28 45 76.80196 2002 3 28 60 7

[R] problem creating an array

2012-09-13 Thread Curtis Burkhalter
Hello, I am having trouble creating a (1000,3,201) array in R from a data set created within the same script. My problem is that I want to take a matrix that is 1000x603 (called "landmat") and separate this into 201 separate (1000x3) matrices. My problem is when I try to do particular combinatio

Re: [R] Missing Values

2012-09-13 Thread Allen C Gellis
thank you for the help So will the entire syntax appear as bootmean(na.omit(banks$two),na.rm = TRUE, conf = 90,nrep = 1000) From: Jeff Newmiller To: grond , r-help@r-project.org Date: 09/13/2012 04:46 PM Subject: Re: [R] Missing Values Don't give it any. Instead of banks$two, use na.omit

Re: [R] Paasing values to sqlQuery like SAS macro

2012-09-13 Thread ramoss
Thanks I was doing something similar in SAS. I was looping macro based on a dataset containing the values: data _null_; set summary2; mindat=put(datepart(mindate),date9.); min_date='mindat_'|| trim(left(_n_)); put mindate= mindat= min_date=; /*check values in log*/ call symput (min_

[R] Correlation between random effects in the package coxme

2012-09-13 Thread Vinicius Santos
Hello, Why the correlation between the random effects is negative? library(coxme) rats1 <- coxme(Surv(time, status) ~ (1|litter), rats) random.effects(rats1)[[1]] #one value for each of the 50 litters print(rats1) rats2 <- lmekin(time ~ (1|litter), rats) fixed.effects(rats2) random.effects(rats2)

Re: [R] list of funtions

2012-09-13 Thread Jonathan Phillips
Yes, seen it, and it's obviously the wrong thing to do or I'd be getting the result I'm looking for. But I can't see the correct way of doing it. I.e. I can't see any way of setting each element of the list to a function with a different 'form' value without using some 'i' like variable in a loop

Re: [R] [newbie] aggregating table() results and simplifying code with loop

2012-09-13 Thread Rui Barradas
Hello, You would get more and better help if you were to break your problem into smaller sub-problems. I am not really sure if this is what you want but here it goes. inxList <- function(DF, logcover, nYears){ f <- function(x, n){ if(any(x)){ r <- rle(x) an

Re: [R] remove all terms with interaction factor in formula

2012-09-13 Thread William Dunlap
The fm[,"c"]==1 does not work correctly as the value 2 also means that the variable (the row) is in the term (the column). The 2 means that you don't need to apply the contrasts function to that variable in this term. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message

Re: [R] remove all terms with interaction factor in formula

2012-09-13 Thread David Winsemius
On Sep 13, 2012, at 11:53 AM, William Dunlap wrote: > Your method would not work for, e.g., "a:d". You could look at the "factors" > attribute > of a terms object and select out those columns with non-zero entries for the > variables > in the interaction of interest. E.g., >> fm <- attr(terms

Re: [R] Cannot write a dataframe to xls or csv Windows 7

2012-09-13 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of R. Michael Weylandt > Sent: Thursday, September 13, 2012 2:52 PM > To: pmulonge > Cc: r-help@r-project.org > Subject: Re: [R] Cannot write a dataframe to xls or csv Windows 7 >

Re: [R] Cannot write a dataframe to xls or csv Windows 7

2012-09-13 Thread R. Michael Weylandt
On Thu, Sep 13, 2012 at 4:05 PM, pmulonge wrote: > Hello, > I have a similar issue , but in my case I am using Windows 7 > i try the following command to write a dataframe to xls using the > xlsReadWrite package or the write.csv function > write.xls(DATA,'Reg_IDcleaned.xls') > or I will write.csv

Re: [R] Namespaces without packages?

2012-09-13 Thread R. Michael Weylandt
On Thu, Sep 13, 2012 at 6:44 PM, Ray Griner wrote: > Dear R-help list - > > Here's my problem. I have some programs I want to share with other users in > the department. I currently tell users to use source("/path/to/myfile.R") to > include the program. If I understand correctly, this puts al

Re: [R] Missing Values

2012-09-13 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Jeff Newmiller > Sent: Thursday, September 13, 2012 1:46 PM > To: grond; r-help@r-project.org > Subject: Re: [R] Missing Values > > Don't give it any. Instead of banks$two, use n

Re: [R] cannot read iso639 table

2012-09-13 Thread William Dunlap
> Pragmatically, one can zap the BOM from the output with > > language.ISO.table[1,1] <- substring(language.ISO.table[1,1],2) On Windows with locale "Englist_United States.1252" my R-2.15.1 could not get that far: > socket <- url("http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt";,

Re: [R] simulate from conditional distribution

2012-09-13 Thread Thomas Lumley
On Fri, Sep 14, 2012 at 9:02 AM, li li wrote: > Dear all, > Y, X are bivariate normal with all the parameters known. > I would like to generate numbers from the distribution Y | X > c > where c is a constant. > Does there exist an R function generating > random numbers from such a

Re: [R] Paasing values to sqlQuery like SAS macro

2012-09-13 Thread Thomas Lumley
On Fri, Sep 14, 2012 at 3:54 AM, ramoss wrote: > We lost our SAS licence & I am busy transfering my old SAS programs to R > environment. I am very new to R. In 1 program I was creating SAS macro > vars & passing them into a SQL query to run against the server. There are 3 > variables firm, begi

[R] simulate from conditional distribution

2012-09-13 Thread li li
Dear all, Y, X are bivariate normal with all the parameters known. I would like to generate numbers from the distribution Y | X > c where c is a constant. Does there exist an R function generating random numbers from such a distribution? Thank you very much.

Re: [R] Missing Values

2012-09-13 Thread Jeff Newmiller
Don't give it any. Instead of banks$two, use na.omit(banks$two). --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] cannot read iso639 table

2012-09-13 Thread peter dalgaard
Pragmatically, one can zap the BOM from the output with language.ISO.table[1,1] <- substring(language.ISO.table[1,1],2) and be gone with it. It would be nicer to zap the BOM before read.table, though. It does work for me with the below (notice that the BOM is a single character if you don't us

Re: [R] Missing Values

2012-09-13 Thread Bert Gunter
True != TRUE ## All CAPS! -- Bert On Thu, Sep 13, 2012 at 12:41 PM, grond wrote: > I am using bootstrap and cannot figure how to tell R to ignore missing values > (NA) > > I tried this syntax and it did not work. The name of the file is banks the > column two. > > bootmean(banks$two,na.rm = Tru

Re: [R] Cannot install package xlsx

2012-09-13 Thread Jeff Newmiller
looks like a corrupt file. try again, or try another server. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] Constraining parameters using tag() in SUR model - ZELIG

2012-09-13 Thread Arne Henningsen
On 13 September 2012 18:38, Samantha Azzarello wrote: > Thanks for the help. Ill make sure to cite systemfit along with Zelig. :-) > I cannot see how to constrain parameters based on the manual when there is > more than 2 eqs using the M Matrix. > I have 10 eqns with 6 parameters each and need

Re: [R] cannot read iso639 table

2012-09-13 Thread William Dunlap
It would be helpful if you showed your commands and printed outputs, copied directly from your R session, from the beginning to the end. I put the call to sessionInfo() in my message because it is probably relevant. It is nice to completely include the original email when responding to it so othe

Re: [R] help server slow

2012-09-13 Thread ldecola
ah...McAfee 'free' virus scan invited itself onto my computer a few weeks ago; when i removed it, help() is now it's old, fast self! > sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3

[R] cforest and cforest_unbiased for testing and training datasets

2012-09-13 Thread dub2
Greetings, I am using cforest to predict age of fishes using several variables; as it is rather difficult to age fishes I would like to show that a small subset of fish (training dataset) can be aged, then using RF analysis, age can accurately be predicted to the remaining individuals not in the su

[R] Keeping R active when launching external application

2012-09-13 Thread Biuw, Martin
Hi, This may or may not be slightly off topic, but I'll stick my neck out... I want to launch an external application from R while retaining R as the active application window (with R console as the active R window). I'm using shell.exec() to sequentially open and evaluate the contents in all j

Re: [R] cannot read iso639 table

2012-09-13 Thread Sam Steingold
> * William Dunlap [2012-09-13 19:50:21 +]: > > On Windows with R-2.15.1 in a 1252 locale, I had to read (and toss) out > the initial 3 bytes (the byte-order mark?) to make things work: > > > socket <- > > > url("http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt",open="r",encoding

[R] split plot experiment with a repeated measure

2012-09-13 Thread Mike Palmer
Hello, I would like advice on if and how I might viably analyse this dataset: The experiment has 3 blocks with a three level main plot treatment, split to a two level treatment. In this case most parameters are also measured repeatedly at 1-3 monthly intervals. Ideally I would like to test the

[R] Missing Values

2012-09-13 Thread grond
I am using bootstrap and cannot figure how to tell R to ignore missing values (NA) I tried this syntax and it did not work. The name of the file is banks the column two. bootmean(banks$two,na.rm = True, conf = 90,nrep = 1000) -- View this message in context: http://r.789695.n4.nabble.com/M

[R] Cannot install package xlsx

2012-09-13 Thread ramoss
I get following error message: trying URL 'http://cran.stat.ucla.edu/bin/windows/contrib/2.15/xlsx_0.4.2.zip' Content type 'application/zip' length 365611 bytes (357 Kb) opened URL downloaded 357 Kb Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) : cannot open the co

Re: [R] cannot read iso639 table

2012-09-13 Thread William Dunlap
On Windows with R-2.15.1 in a 1252 locale, I had to read (and toss) out the initial 3 bytes (the byte-order mark?) to make things work: > socket <- url("http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt",open="r",encoding="utf-8";) > readChar(socket, nchars=3, useBytes=TRUE) [1] "ï»

Re: [R] cannot read iso639 table

2012-09-13 Thread peter dalgaard
On Sep 13, 2012, at 19:42 , Sam Steingold wrote: > line 109 did not have 5 elements ... but it did! > empty beginning of file ... but it's not! > > details: > --8<---cut here---start->8--- > get.language.ISO.table <- function () { > socket <- url("http://www.

Re: [R] Parsing "back" to API strcuture

2012-09-13 Thread Eric Fail
Dear Jim, Thank you for your response I appreciate your effort! It is close, I must admit that. What I am looking for is an object that is identical to 'RAW.API,' or at least in the stricture (I guess i do not need the ","`Content-Type`" = structure(c("text/html", "utf-8"), .Names = c("", "charse

Re: [R] remove all terms with interaction factor in formula

2012-09-13 Thread William Dunlap
Your method would not work for, e.g., "a:d". You could look at the "factors" attribute of a terms object and select out those columns with non-zero entries for the variables in the interaction of interest. E.g., > fm <- attr(terms(~a*b*c*d), "factors") > fm a b c d a:b a:c b:c a:d b:d c:d a:b

Re: [R] remove all terms with interaction factor in formula

2012-09-13 Thread David Winsemius
On Sep 13, 2012, at 11:00 AM, Bert Gunter wrote: > ~ a*b*d + a*c*d That seemed pretty clear and obvious, but I started wondering how to tell the machine to do it. Here is another idea: > grep("b:c", attr(terms(~a*b*c*d), "term.labels" ) ,invert=TRUE, value=TRUE) [1] "a" "b" "c" "d

Re: [R] how to create a substraction matrix (subtract a row of every column from the same row in other columns)

2012-09-13 Thread arun
Hi, Try this: vec1<-1:5 library(MCMCpack)  cbind(rep(0,4),xpnd(diff(combn(vec1,2)),4)) ## [,1] [,2] [,3] [,4] [,5] #[1,]    0    1    2    3    4 #[2,]    0    2    1    2    3 #[3,]    0    3    2    1    2 #[4,]    0    4    3    2    1 dat1<-data.frame(difftype= paste0("x",combn(vec1,2,pas

[R] Namespaces without packages?

2012-09-13 Thread Ray Griner
Dear R-help list - Here's my problem. I have some programs I want to share with other users in the department. I currently tell users to use source("/path/to/myfile.R") to include the program. If I understand correctly, this puts all the functions I wrote into the user's namespace. So if I

Re: [R] Constraining parameters using tag() in SUR model - ZELIG

2012-09-13 Thread Samantha Azzarello
Arne, Thanks for the help. Ill make sure to cite systemfit along with Zelig. I cannot see how to constrain parameters based on the manual when there is more than 2 eqs using the M Matrix. I have 10 eqns with 6 parameters each and need to constrain all 6 across the 10 equations. For example B1s n

Re: [R] Package for comparing sensitivity, specificity, PPV, NPV, and accuracy?

2012-09-13 Thread Frank Harrell
Watch out - these are all improper accuracy scoring rules, so statistics computed on them are likely to be misleading. Frank Gang Chen-4 wrote > > Hi, I have two sets of sensitivity, specificity, positive predictive > value, and negative predictive value, and accuracy from two tests on > the same

[R] gee() and geeglm() errors

2012-09-13 Thread Lilia Verchinina
Dear R users, I have a question regarding the gee() (from package gee) and geeglm() (from package geepack). Here is the head() from my data: R> head(compl.samples_long) UserID Intervention PHQ_base compl_bin Sex EFE Neuro depr0 subject time PHQ 1.1 1000416 2 2

[R] Auomatic Download of climate netcdf4 files from the Climate Explorer Website

2012-09-13 Thread ucakmde
Dear R-helpers, I am trying to download some netcdf4 files from the Climate Explorer Website: http://climexp.knmi.nl/start.cgi?id=someone@somewhere In fact, there are 78 distinct files. I have found a way to download a particular file and open it in R, but I have been informed that there exists

Re: [R] Zip a file

2012-09-13 Thread arun
HI, If you look ?zip(), the usage is: zip(zipfile, files, flags = "-r9X", extras = "", zip = Sys.getenv("R_ZIPCMD", "zip")) A.K. - Original Message - From: Rantony To: r-help@r-project.org Cc: Sent: Thursday, September 13, 2012 8:10 AM Subject: [R] Zip a file Hi,

[R] Paasing values to sqlQuery like SAS macro

2012-09-13 Thread ramoss
Hello, We lost our SAS licence & I am busy transfering my old SAS programs to R environment. I am very new to R. In 1 program I was creating SAS macro vars & passing them into a SQL query to run against the server. There are 3 variables firm, begindt, enddt. # of values for each varies month to

[R] Cannot write a dataframe to xls or csv Windows 7

2012-09-13 Thread pmulonge
Hello, I have a similar issue , but in my case I am using Windows 7 i try the following command to write a dataframe to xls using the xlsReadWrite package or the write.csv function write.xls(DATA,'Reg_IDcleaned.xls') or I will write.csv replacin the suffix with .csv I get absolutely no error messa

Re: [R] AICcmodavg

2012-09-13 Thread David Winsemius
On Sep 13, 2012, at 9:00 AM, David Winsemius wrote: > > On Sep 13, 2012, at 5:52 AM, KerryGK wrote: > >> I am using the AICmodavg package and using R version 2.15.1. I need help >> with code that is instead being read as text. >> >> Below is a subset of code... I actually have 12 models, bu

Re: [R] remove all terms with interaction factor in formula

2012-09-13 Thread Bert Gunter
~ a*b*d + a*c*d -- Bert On Thu, Sep 13, 2012 at 10:49 AM, Alexander Shenkin wrote: > Hi Folks, > > I'm trying to find a way to remove all terms in a formula that contain a > particular interaction. > > For example, in the formula below, I'd like to remove all terms that > contain the b:c interacti

[R] remove all terms with interaction factor in formula

2012-09-13 Thread Alexander Shenkin
Hi Folks, I'm trying to find a way to remove all terms in a formula that contain a particular interaction. For example, in the formula below, I'd like to remove all terms that contain the b:c interaction. > attributes(terms( ~ a*b*c*d))$term.labels [1] "a" "b" "c" "d" "a

[R] cannot read iso639 table

2012-09-13 Thread Sam Steingold
line 109 did not have 5 elements ... but it did! empty beginning of file ... but it's not! details: --8<---cut here---start->8--- get.language.ISO.table <- function () { socket <- url("http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt";,

Re: [R] list of funtions

2012-09-13 Thread Uwe Ligges
On 13.09.2012 19:01, Jonathan Phillips wrote: Hi, I have a function called fitMicroProtein which takes a value called form, this can be any integer from 0-38. In a larger function I'm making (it's called Newton), the first thing I want to do is construct a list of functions where form is alread

[R] list of funtions

2012-09-13 Thread Jonathan Phillips
Hi, I have a function called fitMicroProtein which takes a value called form, this can be any integer from 0-38. In a larger function I'm making (it's called Newton), the first thing I want to do is construct a list of functions where form is already set. So in pseudocode fs[[1]](...) <- fitMicro

Re: [R] fractional balanced design conjoint analysis

2012-09-13 Thread S Ellison
>> package BHH2 includes routines for 2-level fractional >> factorials with specified generators. >> package FrF2 provides a different 2-level fractional >> factorial design toolkit. > > Something tells me you won't get a balanced 2x2x2x2x3 > fractional in 16 or fewer runs though. I think 18

Re: [R] how to find end of a FASTA file

2012-09-13 Thread Martin Morgan
On 09/13/2012 04:19 AM, mail me wrote: Hi: I am trying to find end of a FASTA file: library(ShortRead) fastadata <- readFasta("fastafolder", "fa$") file <- tempfile() writeFasta(fastadata, file) var1 <- readLines(file) while(countlength(tmp <- readLines(file, n = -1)) > 0) { #do something } I

Re: [R] AICcmodavg

2012-09-13 Thread David Winsemius
On Sep 13, 2012, at 5:52 AM, KerryGK wrote: > I am using the AICmodavg package and using R version 2.15.1. I need help > with code that is instead being read as text. > > Below is a subset of code... I actually have 12 models, but I am trying to > get this to work for 2 below right now. > >

Re: [R] fractional balanced design conjoint analysis

2012-09-13 Thread S Ellison
> We would like to generate fractional design for a conjoint > analysis. For example we would like to reduce 2x2x2x2x3 --> > 12-16 profiles. package BHH2 includes routines for 2-level fractional factorials with specified generators. package FrF2 provides a different 2-level fractional factoria

Re: [R] package installation problem.

2012-09-13 Thread Uwe Ligges
On 13.09.2012 17:14, R. Michael Weylandt wrote: Easiest answer would be to update to a more recent version of R: I'm not sure binaries are available for 2.10.z anymore. R-2.10.x is no longer supported, but binaries that were built years ago for that version of R are still available on CRAN m

Re: [R] Shading in prediction intervals

2012-09-13 Thread David Winsemius
On Sep 12, 2012, at 10:38 PM, Jonathan Zhang wrote: > > I have the following code for the minimum and maximum of my prediction > interval > >> y.down=lines(x[x.order], set1.pred[,2][x.order], col=109) >> y.up=lines(x[x.order], set1.pred[,3][x.order], col=109) You do not understand what the li

Re: [R] package installation problem.

2012-09-13 Thread R. Michael Weylandt
Easiest answer would be to update to a more recent version of R: I'm not sure binaries are available for 2.10.z anymore. Cheers, M On Thu, Sep 13, 2012 at 12:35 PM, bokaha guy wrote: > Dear friends from the R-community, > > I am djipie, bokaha and live in Germany. I am a student and user of R. D

Re: [R] Zip a file

2012-09-13 Thread Berend Hasselman
On 13-09-2012, at 14:10, Rantony wrote: > Hi, > > How to zip a csv file ? i tried with "zipfile.ZipFile" - but it showing > function could not find. What exactly did you try? > Is there have any other way to zip files without installing any package ? Have you tried ??zip or ?zip in R? Ber

Re: [R] help server slow

2012-09-13 Thread Jeff Newmiller
That sounds more like a networking lookup delay than R. You have not provided sessionInfo(), but it could be due to antivirus software if you are using Windows or Mac. --- Jeff NewmillerThe .

[R] Package for comparing sensitivity, specificity, PPV, NPV, and accuracy?

2012-09-13 Thread Gang Chen
Hi, I have two sets of sensitivity, specificity, positive predictive value, and negative predictive value, and accuracy from two tests on the same subjects. Is there an R package that does such paired comparisons? Thanks, Gang Chen __ R-help@r-project.o

Re: [R] help server slow

2012-09-13 Thread ldecola
help() seems the ONLY operation that's slow, Windows Task Manager doesn't show anything intensive going on, other programs running normally - it's as though a timer is set that diverts the request for a minute. links within the help pages come up quickly, only the requests from the console.

[R] AICcmodavg

2012-09-13 Thread KerryGK
I am using the AICmodavg package and using R version 2.15.1. I need help with code that is instead being read as text. Below is a subset of code... I actually have 12 models, but I am trying to get this to work for 2 below right now. Everything 'appears' to work through the line starting with

[R] bigmatrix and irlba

2012-09-13 Thread federico ferreyra
Hello, good mornig, i have one questions, anybody know how to calculate svd of a matrix of the library bigmatrix with library irlba? thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

[R] how to find end of a FASTA file

2012-09-13 Thread mail me
Hi: I am trying to find end of a FASTA file: library(ShortRead) fastadata <- readFasta("fastafolder", "fa$") file <- tempfile() writeFasta(fastadata, file) var1 <- readLines(file) while(countlength(tmp <- readLines(file, n = -1)) > 0) { #do something } I want the while loop to run till the end

Re: [R] how to create a substraction matrix (subtract a row of every column from the same row in other columns)

2012-09-13 Thread Rui Barradas
Hello, I'm not sure if this is what you want. dat <- data.frame(matrix(1:25 + rnorm(25), ncol=5, dimnames=list(NULL, paste0("x", 1:5 d2 <- apply(dat, 1, diff) nms <- t(outer(names(dat), names(dat), paste0)) res <- data.frame(difftype = nms[lower.tri(nms)], value = d2[lower.tri(d2,

[R] [newbie] aggregating table() results and simplifying code with loop

2012-09-13 Thread Davide Rizzo
Dear all, I'm looking for primary help at aggregating table() results and at writing a loop (if useful) My dataset ( http://goo.gl/gEPKW ) is composed of 23k rows, each one representing a point in the space of which we know the land cover over 10 years (column y01 to y10). I need to analyse it wi

Re: [R] Remove serial number column in a Dataframe into CSV

2012-09-13 Thread Rantony
Thanks. From: Pramod [via R] [mailto:ml-node+s789695n4642989...@n4.nabble.com] Sent: Thursday, September 13, 2012 1:27 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Remove serial number column in a Dataframe into CSV Add another argument to write.csv(MyDataFrame,"c:/MyData.csv",ro

[R] Zip a file

2012-09-13 Thread Rantony
Hi, How to zip a csv file ? i tried with "zipfile.ZipFile" - but it showing function could not find. Is there have any other way to zip files without installing any package ? - Thanks in advance Antony -- View this message in context: http://r.789695.n4.nabble.com/Zip-a-file-tp4643012.html Se

[R] package installation problem.

2012-09-13 Thread bokaha guy
Dear friends from the R-community, I am djipie, bokaha and live in Germany. I am a student and user of R. During the installation of the package "Metrics" I had a pronlem as shown below: > install.packages("Metrics") Warnung in install.packages("Metrics") : Argument 'lib' fehlt: nutze 'C:\Users

[R] I need help for svm package kernlab in R

2012-09-13 Thread okabes
I use the svm package kernlab .I have two question. In R library(kernlab) m=ksvm(xtrain,ytrain,type="C-svc",kernel=custom function, C=10) alpha(m) alphaindex(m) I can get alpha value and alpha index about package. 1. Assumption that number of sample are 20. number of support vectors are 1

Re: [R] help server slow

2012-09-13 Thread John Kane
It sounds like a local system problem. Are you running on a local intranet or have something cpu intenstive running in the background? John Kane Kingston ON Canada > -Original Message- > From: ldec...@comcast.net > Sent: Wed, 12 Sep 2012 18:05:19 + (UTC) > To: r-help@r-project.org

Re: [R] how to create a substraction matrix (subtract a row of every column from the same row in other columns)

2012-09-13 Thread Ben Bolker
csmeredith fs.fed.us> writes: > [snip] > I want to create a matrix similar to a correlation matrix, but with the > difference between the two values, like this > > x1 x2 x3 x4 x5 > x1 x2-x1x3-x1 x4-x1 x5-x1 > x2 x3-x2 x4-x2 x5-x2

Re: [R] random sampling inside a dataset

2012-09-13 Thread Duncan Murdoch
On 12-09-13 7:18 AM, Gian Maria Niccolò Benucci wrote: Thank you very much for your help, I was wondering if is possible to sample randomly specifying to select in a particular group of data inside the matrix, for example only within the whole samples collected in 2011 I would randomly choose 20

Re: [R] random sampling inside a dataset

2012-09-13 Thread Gian Maria Niccolò Benucci
Thank you very much for your help, I was wondering if is possible to sample randomly specifying to select in a particular group of data inside the matrix, for example only within the whole samples collected in 2011 I would randomly choose 20 random samples... Thanks a again, Gian On 13 Septemb

Re: [R] unzipping with ff

2012-09-13 Thread Wijffels, Jan
Hi Dave, You need to save the ff file before you quit R. As in ffsave(ffcolTest, file = \\ffTest') When you reopen R, you can now use ffload(""). Regarding your question on if ff suits your needs. This is probably the case, I'm regularly using it for data size a lot bigger than yours. Remark that

Re: [R] R on Android

2012-09-13 Thread R. Michael Weylandt
On Thu, Sep 13, 2012 at 11:28 AM, Simon Fry wrote: > Hi > > Well i think my problem is, that i don't have the permissions to execute > something in the folder. > > if i try: > > ./configure /sdcard/gcc > or > make /sdcard/gcc > makeinstall /sdcard/gcc > > it only says permission denied > > if i tr

Re: [R] R on Android

2012-09-13 Thread peter dalgaard
On Sep 12, 2012, at 14:24 , Simon Fry wrote: > Hello again > > I tried to do everything how described on the page: > > http://rwiki.sciviews.org/doku.php?id=getting-started:installation:android > > So, i pushed the three files in the folder /sdcard/gcc > Then i tried to extract the files with

Re: [R] rstudio client on the i-pad

2012-09-13 Thread R. Michael Weylandt
You should probably address this to RStudio (which is an independent commercial entity) directly: http://support.rstudio.org/ I've found them wonderfully responsive and capable, so I'm sure they'll be able to sort you out. Cheers, Michael On Thu, Sep 13, 2012 at 10:20 AM, Frans Marcelissen wrot

Re: [R] Inaccurate prediction in R

2012-09-13 Thread R. Michael Weylandt
On Thu, Sep 13, 2012 at 10:15 AM, Vignesh Prajapati wrote: > Hello, > > After development of recommendation engine with the R, before removal of > outliers from data-set value of residual standard error was 1351 and after > removal of outlier its 100. Still there is no accurate prediction which >

Re: [R] rstudio client on the i-pad

2012-09-13 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wrong mailing list: http://rstudio.org/docs/help_with_r Cheers, Rainer On 13/09/12 11:20, Frans Marcelissen wrote: > Hi, The combination of ipad+rstudio (server) would be a fantastic > combination-if it worked. It > _is_ possible to run rstudio in

[R] rstudio client on the i-pad

2012-09-13 Thread Frans Marcelissen
Hi, The combination of ipad+rstudio (server) would be a fantastic combination-if it worked. It _is_ possible to run rstudio in the safari browser of the ipad, but the keyboard doesn't work correctly (blanks are inserted after each character), making it almost impossible to use. Does anyone know a s

[R] Inaccurate prediction in R

2012-09-13 Thread Vignesh Prajapati
Hello, After development of recommendation engine with the R, before removal of outliers from data-set value of residual standard error was 1351 and after removal of outlier its 100. Still there is no accurate prediction which gives 10% correct(near) prediction. For more fitting i also have tried

Re: [R] random sampling inside a dataset

2012-09-13 Thread Berend Hasselman
On 13-09-2012, at 10:42, Gian Maria Niccolò Benucci wrote: > Hi all, > > I am wondering if do exist a function in R that allow me to sample or > choose randomly the rows (i.e., samples) inside a given matrix. Use sample. Like this for example A <- matrix(runif(8*4), nrow=8) A select.row <- sa

[R] random sampling inside a dataset

2012-09-13 Thread Gian Maria Niccolò Benucci
Hi all, I am wondering if do exist a function in R that allow me to sample or choose randomly the rows (i.e., samples) inside a given matrix. Thank you very much in advance. Cheers, -- Gian [[alternative HTML version deleted]] __ R-help@r-pro

Re: [R] Remove serial number column in a Dataframe into CSV

2012-09-13 Thread R. Michael Weylandt
On Thu, Sep 13, 2012 at 8:47 AM, Rantony wrote: > Hi, > > i have an small doubt. > How can we remove serial-number column while writing a dataframe in to a csv > file ? > > for eg:- > write.csv(MyDataFrame,"c:/MyData.csv") > > name place > --- --- > 1 ant

[R] fractional balanced design conjoint analysis

2012-09-13 Thread Boer, Eric
L.S. We would like to generate fractional design for a conjoint analysis. For example we would like to reduce 2x2x2x2x3 --> 12-16 profiles. We tried the R-package "conjoint" and we found an article which describes how to make fractional design for these kinds of studies with Algdesign: http://

[R] problematic p values for Dixon Q test

2012-09-13 Thread ronny
I am using R dixon.test in order to perform Q test for detection of outliers. The p-values for high Q values are consistent with the table in Rorabacher, D.B. (1991) http://www.flworkshop.com/sscs/dixon_test.pdf, but it seems that small Q-values get problematic p-values. For example: dixon.test(c

[R] Remove serial number column in a Dataframe into CSV

2012-09-13 Thread Rantony
Hi, i have an small doubt. How can we remove serial-number column while writing a dataframe in to a csv file ? for eg:- write.csv(MyDataFrame,"c:/MyData.csv") name place --- --- 1 antonyuk 2 john usa 3 arjun ind here, in

  1   2   >