Re: [R] ROCR for combination of markers

2012-04-23 Thread suo
Hi R users, I am sort of new on those. In the following logistic regression function tigol( 0.3 + 3*x + 5*z + 7*w ) , why the intercept was set 0.3, and the coefficients were set 3 ,5 and 7? Thanks. -- View this message in context:

[R] interval censoring

2012-04-23 Thread Christopher Kelvin
Hello, May i know whether it is possible to generate data twice from Weibull distribution and use one as the start time and the  other as the end time, below is my code. Any suggestion on how to estimate the parameters of Weibull distribution with interval data will be highly appreciated. Thank

[R] standard error

2012-04-23 Thread Christopher Kelvin
Hello, I have tried obtaining the value of standard error from the code below but i get different values when i compare it with the  standard error obtained from the hessian matrix. Can somebody help me out? Thank you n=100;rr=1000 p1=1.2;b=1.5 sq11=sq21=0 for (i in 1:rr){

Re: [R] PCA sensitive to outliers?

2012-04-23 Thread Martin Maechler
SL == Steve Lianoglou mailinglist.honey...@gmail.com on Mon, 23 Apr 2012 01:10:31 -0400 writes: SL On Mon, Apr 23, 2012 at 12:01 AM, Michael SL comtech@gmail.com wrote: yes, but that is not a good Review or Survey... thx SL But the packages listed there do have their

[R] subset daily to monthly in a zoo or xts

2012-04-23 Thread Vikram Bahure
Dear R users, I want to subset a daily zoo series according to its month, find % of NA in each month. I am finding it difficult to subset the daily dataset into monthly for the given operation.I am planning to do this for a huge dataset. Thanks in advance. Regards Vikram [[alternative

Re: [R] subset daily to monthly in a zoo or xts

2012-04-23 Thread Achim Zeileis
On Mon, 23 Apr 2012, Vikram Bahure wrote: Dear R users, I want to subset a daily zoo series according to its month, find % of NA in each month. I am finding it difficult to subset the daily dataset into monthly for the given operation.I am planning to do this for a huge dataset. Use

Re: [R] subset daily to monthly in a zoo or xts

2012-04-23 Thread Enrico Schumann
Hi Vikram, maybe something like this? require(zoo) ## a daily zoo series z - zoo(1:200, as.Date(2012-01-01) + 1:200) ## add some NAs z[ceiling(runif(10)*200)] - NA ## aggregate to monthly aggregate(z, format(index(z), %Y-%m), length) aggregate(z, format(index(z), %Y-%m), function(x)

Re: [R] How to take ID of number 7.

2012-04-23 Thread Yellow
Thanks for the help. :) I was also looking at attach() but this one works perfect. -- View this message in context: http://r.789695.n4.nabble.com/How-to-take-ID-of-number-7-tp4577998p4579982.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Splitting a dataframe by character vector

2012-04-23 Thread S Ellison
-Original Message- I am just trying to split a dataframe of 750 observations of 29 variables by Site, which is a vector in the dataframe with five text names (ex. PtaCaracol). A couple of methods. i) First, look up ?split, which chops your data frame into a list of five data

[R] take data from a file to another according to their correlation coefficient

2012-04-23 Thread jeff6868
Hi everyone. I have a question about a work on R I have to do for my job. I have temperature data coming from 70 weather stations. One data file corresponds to one station for one year (so 70 files for one year). Each file looks like this (important: each file contains NAs): time

Re: [R] take data from a file to another according to their correlation coefficient

2012-04-23 Thread Sarah Goslee
Hi, Even your example should show why this is a bad way to fill in missing weather data: you end up with a sequence for station 1 of 1, 2, 10, 4 even though that's certainly wrong because Station 2 is reliably 7 units above Station 1. Correlated doesn't mean identical. There are other better

[R] Overlay Gene Expression on SNP (copy number) data

2012-04-23 Thread Ekta Jain
Hello, Can anyone please suggest any packages in R that can be used to overlay gene expression data on SNP (affymetrix) copy number ? Thanks, Ekta Senior Research Associate Bioinformatics Department Jubilant Biosys Pvt Ltd, #96, Industrial Suburb, 2nd Stage Yeshwantpur, Bangalore 560 022 Ph No :

Re: [R] [BioC] Overlay Gene Expression on SNP (copy number) data

2012-04-23 Thread Steve Lianoglou
Hi, On Mon, Apr 23, 2012 at 7:33 AM, Ekta Jain ekta_j...@jubilantbiosys.com wrote: Hello, Can anyone please suggest any packages in R that can be used to overlay gene expression data on SNP (affymetrix) copy number ? I guess you mean visually? If so, I'd suggest skimming through the

Re: [R] How to take ID of number 7.

2012-04-23 Thread Steve Lianoglou
Small mistake in my subset example. I mean to remove the `$ID` part at the end so that you can play with the whole subset-ted data.frame, and not just get back the ID column. Instead of this: R interesting - subset(DataFile, log2 = 7)$ID do this: R interesting - subset(DataFile, log2 = 7) I

[R] Add attributes to igraph vector by name, not index

2012-04-23 Thread cwdillon
Hi, So I've been figuring out how to use igraph in R and like it for it's speed and simplicity. Now I have a graph built from an edgelist where vectors have a $name attribute. I have another dataframe with attributes tied to a vector ID, which is the same as the $name attribute of vectors

[R] Different results for sparse and dense version of model matrix using contrasts and interactions

2012-04-23 Thread Jelmer Ypma
Dear all, I've been getting different results from the sparse and dense version of model.Matrix when used with sparse contrasts and interactions between factors. The same happens when using model.matrix and sparse.model.matrix. When calculating list.contrasts I get the same results for sparse and

Re: [R] lm()

2012-04-23 Thread Mariam
Hi, Jorge! Help me please! I made a classification tree (rpart package) according to my train data and set of variables. How can I validate my test data? I want to check if the test data will classified properly by the same tree. Thanks cheers Maria Tue, 10 Apr 2012 08:44:39 -0700 (PDT) от

[R] compare bivariate normal distributions

2012-04-23 Thread Fabian Roger
Dear all, I have tow (several) bivariate distributions with a known mean and variance-covariance structure (hence a known density function) that I would like to compare in order to get an intersect that tells me something about how different these distributions are (as t-statistics for

Re: [R] take data from a file to another according to their correlation coefficient

2012-04-23 Thread jeff6868
Hi Sarah, Thank you for your answer. Yes I know that my proposition is not necessary the better way to do it. But my problem concerns only big gaps of course (more than half a day of missing data, till several months of missing data). I've already filled small gaps with the interpolation that you

[R] OLS Estimating

2012-04-23 Thread phillip03
Hi I am looking for a efficient way to estimate all parameters in your data.frame set using a specific function: for example ln(T)=b_0 + b_1*ln(Y_i*Y_j) + b_2*ln()+ ... + etc. Thanks, Ph -- View this message in context: http://r.789695.n4.nabble.com/OLS-Estimating-tp4580055p4580055.html Sent

Re: [R] OLS Estimating

2012-04-23 Thread Uwe Ligges
On 23.04.2012 12:42, phillip03 wrote: Hi I am looking for a efficient way to estimate all parameters in your data.frame set using a specific function: for example ln(T)=b_0 + b_1*ln(Y_i*Y_j) + b_2*ln()+ ... + etc. Sounds like you are looking for lm(). Uwe Ligges Thanks, Ph -- View

Re: [R] lm()

2012-04-23 Thread Stephen Sefick
Rpart has a built in cross-validation proceedure. the xerror and so on are based on a ten fold cross validation, I believe. Read the manual for more results. If you plot the fit with post and then look at the postscript file it should have a misclassification rate under the terminal nodes.

Re: [R] Survreg

2012-04-23 Thread Terry Therneau
On 04/22/2012 05:00 AM, r-help-requ...@r-project.org wrote: I am trying to run Weibull PH model in R. Assume in the data set I have x1 a continuous variable and x2 a categorical variable with two classes (0= sick and 1= healthy). I fit the model in the following way.

Re: [R] How to take ID of number 7.

2012-04-23 Thread Yellow
Thanks for saying. :) This morning I tried out some things with this code, and different variants with it. Works nice. -- View this message in context: http://r.789695.n4.nabble.com/How-to-take-ID-of-number-7-tp4577998p4580364.html Sent from the R help mailing list archive at Nabble.com.

[R] PCA sensitive to outliers?

2012-04-23 Thread Igor Carron
I could not reply directly to the initial thread with the same title. There are two sorts of Robust PCA, those that were devised before the recent string of Low Rank approaches and then the new set of algorithms that provide robust PCA in light of sparse but potentially large errors/outliers

[R] save model summary

2012-04-23 Thread Eiko Fried
Hello, I'm working with RStudio, which does not display enough lines in the console that I can read the summary of my (due to the covariance-matrix rather long) model. There are no ways around this, so I guess I need to export the summary into a file in order to see it ... I'm new to R, and R

[R] How does survreg ordered factors vs not ordered factors?

2012-04-23 Thread wwreith
Consider the following generic code for a survival model survobj-Surv(data$Time,data$Satisfactory) survmodel-survreg(survobj~x1+x2+x3+x4+x5+x6, data=data, dist=weibull) survsum-summary(survmodel) survsum My question: Does anyone know what exactly survreg() does differently if x1-factor(data$x1,

Re: [R] save model summary

2012-04-23 Thread Berend Hasselman
On 23-04-2012, at 15:20, Eiko Fried wrote: Hello, I'm working with RStudio, which does not display enough lines in the console that I can read the summary of my (due to the covariance-matrix rather long) model. There are no ways around this, so I guess I need to export the summary into a

[R] clusplot() for all used variables - not only for 2 principal components?

2012-04-23 Thread greatest.possible.newbie
Hi there, To see the results of my clustering graphically I was using clusplot. But it only provides a look at the two most important components of the dataset. I recently found the Mclust() function which produces very nice colored pair plots for the clustered dataset. see Graph:

Re: [R] R-help Digest, Vol 110, Issue 23

2012-04-23 Thread Terry Therneau
Yes, the (start, stop] formalism is the easiest way to deal with time dependent data. Each individual only needs to have sufficient data to describe them, so for if id number 4 is in house 1, their housemate #1 was eaten at time 2, and the were eaten at time 10, the following is sufficient

Re: [R] [BioC] Overlay Gene Expression on SNP (copy number) data

2012-04-23 Thread Paul Shannon
Another possibility for visual display of several kinds of data is RCytoscape, for which an example can be seen here: http://rcytoscape.systemsbiology.net/versions/current/gallery/TCGA/subnet.TCGA.02.0014.png This portrays 1) gene expression (green: under-expression; red: over-expression)

Re: [R] How does survreg ordered factors vs not ordered factors?

2012-04-23 Thread Marc Schwartz
On Apr 23, 2012, at 8:29 AM, wwreith wrote: Consider the following generic code for a survival model survobj-Surv(data$Time,data$Satisfactory) survmodel-survreg(survobj~x1+x2+x3+x4+x5+x6, data=data, dist=weibull) survsum-summary(survmodel) survsum My question: Does anyone know what

Re: [R] Solve an ordinary or generalized eigenvalue problem in R

2012-04-23 Thread John C Nash
This thread reveals that R has some holes in the solution of some of the linear algebra problems that may arise. It looks like Jim Ramsay used a quick and dirty approach to the generalized eigenproblem by using B^(-1) %*% A, which is usually not too successful due to issues with condition of B

Re: [R] [BioC] Overlay Gene Expression on SNP (copy number) data

2012-04-23 Thread Tengfei Yin
On Mon, Apr 23, 2012 at 6:33 AM, Ekta Jain ekta_j...@jubilantbiosys.comwrote: Hello, Can anyone please suggest any packages in R that can be used to overlay gene expression data on SNP (affymetrix) copy number ? Hi Ekta, If you mean visually, as Steve suggested, you could try packages like

Re: [R] take data from a file to another according to their correlation coefficient

2012-04-23 Thread jeff6868
Hi Rui, Yes you're right. It's me again ^^ This post is the last part (I hope) of my job. You helped me a lot last time for the correlation matrices. I have to leave my work now, so I'll check and test your proposition tomorrow. But it makes no doubt that it'll help me a lot again. I'll tell

[R] How can I run package ca (correspondence analysis), which needs rgl, without X11?

2012-04-23 Thread Jocelyn Ireson-Paine
I want to invoke R on a Linux Web server from Java, in order to analyse data in ways that would take too long to code, and run too slowly, in Java. In particular, to do correspondence analyses. To this end, I've installed R version 2.15.0 on my Web host's x86_64 GNU/Linux machine, and tried

[R] Selecting columns whose names contain mutated except when they also contain non or un

2012-04-23 Thread Paul Miller
Hello All, Started out awhile ago trying to select columns in a dataframe whose names contain some variation of the word mutant using code like: names(KRASyn)[grep(muta, names(KRASyn))] The idea then would be to add together the various columns using code like: KRASyn$Mutant_comb -

Re: [R] Selecting columns whose names contain mutated except when they also contain non or un

2012-04-23 Thread David Winsemius
On Apr 23, 2012, at 12:10 PM, Paul Miller wrote: Hello All, Started out awhile ago trying to select columns in a dataframe whose names contain some variation of the word mutant using code like: names(KRASyn)[grep(muta, names(KRASyn))] The idea then would be to add together the various

Re: [R] Selecting columns whose names contain mutated except when they also contain non or un

2012-04-23 Thread Paul Miller
Hello Dr. Winsemius, Unfortunately, I also have terms like krasmutated. So simply selecting words that start with muta won't work in this case. Thanks, Paul --- On Mon, 4/23/12, David Winsemius dwinsem...@comcast.net wrote: From: David Winsemius dwinsem...@comcast.net Subject: Re: [R]

Re: [R] How can I run package ca (correspondence analysis), which needs rgl, without X11?

2012-04-23 Thread Duncan Murdoch
On 23/04/2012 12:05 PM, Jocelyn Ireson-Paine wrote: I want to invoke R on a Linux Web server from Java, in order to analyse data in ways that would take too long to code, and run too slowly, in Java. In particular, to do correspondence analyses. To this end, I've installed R version 2.15.0 on my

[R] plot function creating bars instead of lines

2012-04-23 Thread la mer
Hello, I am having a problem where code that plots lines using a different data frame plots bars with the current data frame (I am intended to plot lines). The code specifies lines (see below), so I can't figure out why the results are bars. I suspect that it may have something to do with the

[R] write a png inside a pdf for large graphics?

2012-04-23 Thread Adam Wilson
I routinely write graphics into multi-page PDFs, but some graphics (i.e. plots of large spatial datasets using levelplot()) can result in enormous files. I'm curious if there is a better way. For example: #First, make some data: library(lattice) d=expand.grid(x=1:1000,y=1:1000)

Re: [R] take data from a file to another according to their correlation coefficient

2012-04-23 Thread Rui Barradas
Hello, jeff6868 wrote Hi Sarah, Thank you for your answer. Yes I know that my proposition is not necessary the better way to do it. But my problem concerns only big gaps of course (more than half a day of missing data, till several months of missing data). I've already filled small

[R] Can I specify POSIX[cl]t column classes inside read.csv?

2012-04-23 Thread Thomas Levine
I'm loading a nicely formatted csv file.     #!/usr/bin/env Rscript     kpi - read.csv(       # This is a dump of the username, date_joined and last_login columns       # from the auth_user Django table.       'data/2012-04-23.csv',       colClasses = c('character')     )    

[R] glmnet sparse matrix error: dim specifies too large an array

2012-04-23 Thread Nathan Stephens
I'm running into an unexpected error using the glmnet and Matrix packages. I have a matrix that is 8 million rows by 100 columns with 75% of the entries being zero. When I run a vanilla glmnet logistic model on my server with 300 GB of RAM, the task completes in 20 minutes: x # 8 million x 100

Re: [R] Splitting a dataframe by character vector

2012-04-23 Thread Ben Neal
Thanks Steve, your explanation of the == is very helpful, and I will look up ?by. Ben -Original Message- From: S Ellison [mailto:s.elli...@lgcgroup.com] Sent: Mon 4/23/2012 3:19 AM To: Ben Neal; r-help@r-project.org Subject: RE: Splitting a dataframe by character vector

[R] How to insert filename as column in a file

2012-04-23 Thread Shivam
Hi, I am relatively new to R. Have scourged the help files and the www but havent been able to get a solution. I have around 250 csv files, one file for each date. They have columns of all types, numeric, string etc. The name of each file is the date in the form of 'mmdd'. There is no column

[R] check for difference.

2012-04-23 Thread aoife doherty
Hello I have two lists of numbers, each list is ~800 numbers long. I want to know if the two lists are significantly different from each other. Could anyone suggest what library in R to use? I think maybe the mann-whitney test, as it is not parametric, but i am unsure if it is suitable as my list

Re: [R] How can I run package ca (correspondence analysis), which needs rgl, without X11?

2012-04-23 Thread Prof Brian Ripley
On 23/04/2012 17:33, Duncan Murdoch wrote: On 23/04/2012 12:05 PM, Jocelyn Ireson-Paine wrote: I want to invoke R on a Linux Web server from Java, in order to analyse data in ways that would take too long to code, and run too slowly, in Java. In particular, to do correspondence analyses. To

Re: [R] write a png inside a pdf for large graphics?

2012-04-23 Thread Duncan Murdoch
On 23/04/2012 10:49 AM, Adam Wilson wrote: I routinely write graphics into multi-page PDFs, but some graphics (i.e. plots of large spatial datasets using levelplot()) can result in enormous files. I'm curious if there is a better way. For example: #First, make some data: library(lattice)

Re: [R] Selecting columns whose names contain mutated except when they also contain non or un

2012-04-23 Thread Bert Gunter
Below. -- Bert On Mon, Apr 23, 2012 at 9:10 AM, Paul Miller pjmiller...@yahoo.com wrote: Hello All, Started out awhile ago trying to select columns in a dataframe whose names contain some variation of the word mutant using code like: names(KRASyn)[grep(muta, names(KRASyn))] The idea

Re: [R] Selecting columns whose names contain mutated except when they also contain non or un

2012-04-23 Thread David Winsemius
On Apr 23, 2012, at 12:25 PM, Paul Miller wrote: Hello Dr. Winsemius, Unfortunately, I also have terms like krasmutated. So simply selecting words that start with muta won't work in this case. You are aware that negative indexing can be used with grep aren't you? -- David. Thanks,

Re: [R] Selecting columns whose names contain mutated except when they also contain non or un

2012-04-23 Thread Bert Gunter
But maybe ... (see below) -- Bert On Mon, Apr 23, 2012 at 9:25 AM, Paul Miller pjmiller...@yahoo.com wrote: Hello Dr. Winsemius, Unfortunately, I also have terms like krasmutated. So simply selecting words that start with muta won't work in this case. Thanks, Paul --- On Mon, 4/23/12,

Re: [R] Can I specify POSIX[cl]t column classes inside read.csv?

2012-04-23 Thread David Winsemius
On Apr 23, 2012, at 11:48 AM, Thomas Levine wrote: I'm loading a nicely formatted csv file. #!/usr/bin/env Rscript kpi - read.csv( # This is a dump of the username, date_joined and last_login columns # from the auth_user Django table. 'data/2012-04-23.csv',

[R] glmnet_1.7.3 on windows

2012-04-23 Thread Trevor Hastie
We are aware that glmnet_1.7.3 does not pass for windows and are looking into the problem. It has something to do with the gcc compiler being slightly different on windows versus linux/mac platforms. As soon as we have resolved the issue, we will post a new version to CRAN Trevor Hastie

[R] Problem extracting enough coefs from gam (mgcv package)

2012-04-23 Thread Martijn Wieling
Dear useRs, I have used using the excellent mgcv package (version 1.7-12) to create a generalized additive model (gam) including random effects - represented with s(...,bs=re) - on the basis of dialect data. My model contains two random-effect factors (Word and Key - the latter representing a

Re: [R] Assignment problems

2012-04-23 Thread Rui Barradas
Hello, phillip03 wrote Thank you Rui Can you help me with my ifelse problem - I would like to add a list to my data.frame where avgflow in those rows where ONLY my country pair both are in euro First of all, try to use better (much, much better) code writing. What are you trying to do

Re: [R] OLS Estimating

2012-04-23 Thread David Winsemius
On Apr 23, 2012, at 12:53 PM, phillip03 wrote: So how would I use the lm() to estimate b_0 and b_1 for example My Y_i and Y_j are data observations how does the lm() use my data.frame ? Have your read An Introduction to R. Section 11 would appear to cover all the needed topics.

Re: [R] Solve an ordinary or generalized eigenvalue problem in R?

2012-04-23 Thread Jonathan Greenberg
Building in Berend's suggestions I think this function should work for most people (I'm going to wrap it into a package but figured people may want to grab this directly): # Please see http://www.netlib.org/lapack/double/dggev.f for a description of inputs and outputs. Rdggev -

Re: [R] How to insert filename as column in a file

2012-04-23 Thread jim holtman
This might do it for you: for (i in fileNames){ input - read.table(i, .) # you might want to use regular expressions to extract just the date. input$fileName - i write.table(i, ) } On Mon, Apr 23, 2012 at 12:29 PM, Shivam shivamsi...@gmail.com wrote: Hi, I am

Re: [R] Selecting columns whose names contain mutated except when they also contain non or un

2012-04-23 Thread Paul Miller
Hi Bert, Yes, code like: x - names(yourdataframe) grepl(muta,x) !grepl(nonmuta|unmuta,x) works perfectly. Thanks very much for your help. Paul --- On Mon, 4/23/12, Bert Gunter gunter.ber...@gene.com wrote: From: Bert Gunter gunter.ber...@gene.com Subject: Re: [R] Selecting columns

[R] How to test if a slope is different than 1?

2012-04-23 Thread Mark Na
Dear R-helpers, I would like to test if the slope corresponding to a continuous variable in my model (summary below) is different than one. I would appreciate any ideas for how I could do this in R, after having specified and run this model? Many thanks, Mark Na Call: lm(formula =

[R] Newbie Question on making subsets for every element of a table column

2012-04-23 Thread cyclondude
Hello, very new to R, playing with tables, and I am trying to do x - subset(data, columnlabel == x) for every element in my column that I could find by using table (data [,columnlabel]) I'd appreciate any useful help and I'm sorry if I didn't get the terminology perfect. Thanks. -- View

Re: [R] Assignment problems

2012-04-23 Thread phillip03
Hi RUI Thank you so much ! I know I have a lot to learn : / sorry for that. If I want to make a new data.frame where it is the NONEURO avgflows. how do I do that ? Ph -- View this message in context: http://r.789695.n4.nabble.com/Assignment-problems-tp4578672p4581164.html Sent from the R

Re: [R] how to cut files from any folder to another folder?

2012-04-23 Thread MacQueen, Don
see file.rename() -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 4/22/12 1:25 AM, sagarnikam123 sagarnikam...@gmail.com wrote: i want to cut file from e.g. abc folder put it into another location with folder name e.g. xyz

Re: [R] How to insert filename as column in a file

2012-04-23 Thread MacQueen, Don
This little example might help. foo - data.frame(a=1:10, b=letters[1:0]) foo a b 1 1 a 2 2 a 3 3 a 4 4 a 5 5 a 6 6 a 7 7 a 8 8 a 9 9 a 10 10 a foo$date - '20120423' foo a b date 1 1 a 20120423 2 2 a 20120423 3 3 a 20120423 4 4 a 20120423 5 5 a 20120423

Re: [R] ggplot2 - geom_bar

2012-04-23 Thread Brian Diggs
On 4/23/2012 9:24 AM, Matthias Rieber wrote: Hello, I've some problem with the ggplot2. Here's a small example: --8-- library(ggplot2) molten- data.frame(date=c('01','01','01','01', '02','02','02','02'), channel=c('red','red','blue','blue',

[R] .rda vs. .RData

2012-04-23 Thread Shi, Tao
Are they the same with .RData being the newer format?  Thanks, ...Tao __ 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 provide commented,

Re: [R] Assignment problems

2012-04-23 Thread Rui Barradas
If I want to make a new data.frame where it is the NONEURO avgflows. how do I do that ? Exactly like above, but without the negation (the exclamation mark). You must also start to use the help system, for instance: ?! Rui Barradas -- View this message in context:

Re: [R] How to insert filename as column in a file

2012-04-23 Thread Shivam
a foo$date - '20120423' foo a b date 1 1 a 20120423 2 2 a 20120423 3 3 a 20120423 4 4 a 20120423 5 5 a 20120423 6 6 a 20120423 7 7 a 20120423 8 8 a 20120423 9 9 a 20120423 10 10 a 20120423 In other words, immediately after reading the data into a data frame, add

Re: [R] write a png inside a pdf for large graphics?

2012-04-23 Thread baptiste auguie
Hi, On 24 April 2012 05:00, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 23/04/2012 10:49 AM, Adam Wilson wrote: I routinely write graphics into multi-page PDFs, but some graphics (i.e. plots of large spatial datasets using levelplot()) can result in enormous files.  I'm curious if

[R] automating a script to read a file

2012-04-23 Thread Steve_Friedman
Hi, The following script (which I did not develop) is used to calculate and plot a skewed normal curve. The script currently requires the user to input six parameters, rather than reading these directly from a file. I've been spinning wheels here, trying to figure out how to modify the script

Re: [R] need advice on using excel to check data for import into R

2012-04-23 Thread Greg Snow
This is really a job for a database, and Excel is not a database (even though many think it is). I have some clients that I have convinced to create an Access database rather than use Excel (still MS product so it can't be that scary, right?). They were often a little reluctant at first because

Re: [R] Assignment problems

2012-04-23 Thread phillip03
Thank you! Do you know why ifelse() sometimes returns NULL ? -- View this message in context: http://r.789695.n4.nabble.com/Assignment-problems-tp4578672p4581491.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] Assignment problems

2012-04-23 Thread Berend Hasselman
On 23-04-2012, at 21:37, phillip03 wrote: Thank you! Do you know why ifelse() sometimes returns NULL ? Please provide a reproducible example for this phenomenon. Berend __ R-help@r-project.org mailing list

Re: [R] Newbie Question on making subsets for every element of a table column

2012-04-23 Thread Petr Savicky
On Mon, Apr 23, 2012 at 10:58:26AM -0700, cyclondude wrote: Hello, very new to R, playing with tables, and I am trying to do x - subset(data, columnlabel == x) for every element in my column that I could find by using table (data [,columnlabel]) Hi. The following may be close to what

Re: [R] automating a script to read a file

2012-04-23 Thread Petr Savicky
On Mon, Apr 23, 2012 at 04:02:45PM -0400, steve_fried...@nps.gov wrote: Hi, The following script (which I did not develop) is used to calculate and plot a skewed normal curve. The script currently requires the user to input six parameters, rather than reading these directly from a file.

[R] [R-pkgs] new version of QCAGUI

2012-04-23 Thread Adrian Duşa
Dear All, I have just submitted a new version of the QCAGUI package on CRAN, it should be propagated in a couple of days. This version is nothing but a quick update to the latest Rcmdr base package, and works (as usual) with the QCA package up to version 0.6-5 For the later versions of the QCA

Re: [R] Selecting columns whose names contain mutated except when they also contain non or un

2012-04-23 Thread Greg Snow
Here is a method that uses negative look behind: tmp - c('mutation','nonmutated','unmutated','verymutated','other') grep((?!un)(?!non)muta, tmp, perl=TRUE) [1] 1 4 it looks for muta that is not immediatly preceeded by un or non (but it would match unusually mutated since the un is not

Re: [R] How to test if a slope is different than 1?

2012-04-23 Thread Greg Snow
One option is to subtract the continuous variable from y before doing the regression (this works with any regression package/function). The probably better way in R is to use the 'offset' function: formula = I(log(data$AB.obs + 1, 10)-log(data$SIZE,10)) ~ log(data$SIZE, 10) + data$Y formula =

Re: [R] Assignment problems

2012-04-23 Thread phillip03
Hi EMU1993-(for (i in 1:nrow(data)){ + ifelse(year==1992,sum(avgflowEMU),0) + }) EMU1993 NULL -- View this message in context: http://r.789695.n4.nabble.com/Assignment-problems-tp4578672p4581590.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Assignment problems

2012-04-23 Thread R. Michael Weylandt
That's not the ifelse() that's the for loop returning NULL (everything's a function!). If you put the assignment inside you'll get expected behavior. x - (for(i in 1:5) i) # Strange for(i in 1:5) x- i # Normal (but notice you only get the last value because previous ones are overwritten) Michael

Re: [R] Assignment problems

2012-04-23 Thread David Winsemius
On Apr 23, 2012, at 5:21 PM, R. Michael Weylandt wrote: That's not the ifelse() that's the for loop returning NULL (everything's a function!). If you put the assignment inside you'll get expected behavior. x - (for(i in 1:5) i) # Strange for(i in 1:5) x- i # Normal (but notice you only get

Re: [R] Newbie Question on making subsets for every element of a table column

2012-04-23 Thread cyclondude
Yes. That is what I was looking for. Is there a simple way to (in this scenario) out[[1]] v1 v2 1 a 1 4 a 2 7 a 3 a - out[[1]] for each one? Thanks! -- View this message in context:

Re: [R] automating a script to read a file

2012-04-23 Thread Steve_Friedman
Petr, Thank you very much this works. A little more tweaking and I'll have what I need. Thanks Steve Friedman Ph. D. Ecologist / Spatial Statistical Analyst Everglades and Dry Tortugas National Park 950 N Krome Ave (3rd Floor) Homestead, Florida 33034 steve_fried...@nps.gov Office (305) 224

Re: [R] Newbie Question on making subsets for every element of a table column

2012-04-23 Thread R. Michael Weylandt
There are, but it's generally considered better style to keep them all in a single list and use lapply() if you want to do things to each element. Michael On Mon, Apr 23, 2012 at 5:33 PM, cyclondude hans.thomps...@gmail.com wrote: Yes. That is what I was looking for.  Is there a simple way to

Re: [R] Can I specify POSIX[cl]t column classes inside read.csv?

2012-04-23 Thread Jeff Newmiller
I recommend not putting POSIXlt vectors in data frames because of memory use and added complexity of the resulting data frame. That is, use colClasses = c('character', 'POSIXct', 'POSIXct') instead. The POSIXlt values will still be created as temporary variables for reading in, but the data

Re: [R] .rda vs. .RData

2012-04-23 Thread Jeff Newmiller
No, RData saves both the variable name and corresponding content of multiple variables. rda saves content of one variable, with no associated name. The latter allows for greater flexibility in importing the data later into different working environments, the former is convenient for

[R] summing two probability density functions from Gompertz hazard model

2012-04-23 Thread piltdownpunk
Hi, r-help members. I have a question about summing two density distributions. I have two samples from which I've estimated hazard parameters for a Gompertz mortality model. With those parameters, I can calculate the PDF (survival function times hazard function) of ages-at-death in a birth

[R] Bivariate Von Mises Distributions

2012-04-23 Thread Cedric Neumann
All, I am trying to estimate the parameters of a bivariate Von Mises distributions. I am looking for somebody to point me in the direction of an R package or function that does this. I have noted the existing packages that allow for obtaining the density values once the parameters have been

[R] change color scheme in mvpart

2012-04-23 Thread leanne heisler
Hello everyone, I am currently using the mvpart package and would like to change the color scheme it uses, and was hoping someone could help me out. All of the papers I have found have used a grayscale but I can't seem to figure out how they did that! Currently, mvpart plots barplots in a

Re: [R] .rda vs. .RData

2012-04-23 Thread Ista Zahn
Hi Jeff. Can you point me toward the documentation for rda saves content of one variable, with no associated name? I don't seem to find it in ?save ?load etc. Thanks, Ista On Mon, Apr 23, 2012 at 5:58 PM, Jeff Newmiller jdnew...@dcn.davis.ca.us wrote: No, RData saves both the variable name and

[R] nnet multinom question

2012-04-23 Thread Moritaka Hosotsubo
I'd like to fit a multinomial log-linear model for 4 categories of the form: log[(P(D=i | x)/P(D=0 | x)] = alpha + beta_i x for i = 1,2,3. Is there a way to impose such a constraint in the multinom function of nnet or another function of some library? regards, Hosotsubo -- Moritaka

[R] zipfR help

2012-04-23 Thread meh L
Hi, I have a question on generating random variables based on zipf-mandelbrot distribution. So when I execute the following lines: ZM = lnre (zm, alpha = 2/3, B=0.1) zmsample = rlnre (ZM, n =100) zmsample It generates 100 random values based on a zipf-mandelbrot distribution as below. But how

Re: [R] check for difference.

2012-04-23 Thread R. Michael Weylandt
Lists of numbers of length ~1000 are no problem for the wilcox.test() function (Mann-Whitney is a special case) if you leave the default exact = NULL. The choice of test is all yours. Michael On Mon, Apr 23, 2012 at 12:39 PM, aoife doherty aaral.si...@gmail.com wrote: Hello I have two lists

Re: [R] .rda vs. .RData

2012-04-23 Thread Jeff Newmiller
My bad, I was thinking of rds (?saveRDS). RData and rda are mentioned under ?data as alternate file extensions for the same data format. Sorry for posting without checking first. --- Jeff NewmillerThe

Re: [R] plot function creating bars instead of lines

2012-04-23 Thread R. Michael Weylandt
It is indeed the fact you're plotting factors, but unless you say what as intended is, it's hard to provide exactly what you're seeking. Perhaps this will help though: X - factor(sample(letters[1:5], 15, TRUE)) Y - rnorm(15) dats - data.frame(X, Y) plot(Y ~ X, data = dats) # No good plot(X ~ Y,

Re: [R] zipfR help

2012-04-23 Thread R. Michael Weylandt
It depends how you want to ensure that condition -- if you just want to censor at an upper bound of 6k, this is easy: pmin(zmsample, 6000) If you want to sample as before but it just happens to all be less than 6000 -- that's not really a rigorous statement, but just go with it -- intuitively,

[R] change color scheme in mvpart

2012-04-23 Thread leanne heisler
From: dwinsem...@comcast.net To: leanneheis...@hotmail.com Subject: Re: [R] change color scheme in mvpart Date: Mon, 23 Apr 2012 19:20:06 -0400 The fact that you are posting in HTML indicates that a) you have either not read the Posting Guide or b) do not know enough about your mailer to

[R] Scatter plot / LOESS, or LOWESS for more than one parameter

2012-04-23 Thread David Doyle
Hi folks. If I have the following in my data eventpH1pH2 14.0 6.0 24.3 5.9 34.1 6.1 44.0 5.9 and on and on. for about 400 events Is there a way I can get R to plot event vs. pH1 and event vs. pH2 and then do a loess or

  1   2   >