[R] generate random numbers

2011-03-31 Thread Anna Lee
Hey List, does anyone know how I can generate a vector of random numbers from a given distribution? Something like "rnorm" just for non normal distributions??? Thanks a lot! Anna -- Der Inhalt dieser E-Mail ist vertraulich. Sollte Ihnen die E-Mail irrtümlich zugesandt worden sein, bitte ich

[R] How to call data elements

2011-04-06 Thread Wonjae Lee
Hi, I have a stupid and simple question. Please forgive me. In an example below, please tell me how to call "1947" in mydata. Thank you in advance. Wonjae > mydata [[1]] [1] "1947""83" "234.289" "235.6" "159" "107.608" "1947" [8] "60.323" > mydata[[1],1] error:unex

[R] as.Date function error

2011-04-17 Thread Wonjae Lee
Hi, I have some problems with as.Date function. After I applied as.Date for my data, "2010" changed to "2020" as below Where am I wrong? Thanks Wonjae > x=c("11/16/2010","11/17/2010","11/18/2010","11/19/2010") > x=as.Date(x,"%m/%d/%y") > x [1] "2020-11-16" "2020-11-17" "2020-11-18" "2020-11-19"

[R] as.Date error

2011-04-17 Thread Wonjae Lee
Thank you for replying the as.Date error question. I have one more question as below. I used cbind command, and data x changed, 2010-11-16 to 14929, 2010-11-17 to 14930. What happened to them? What should I do to see -mm-dd format data? > x=c("11/16/2010","11/17/2010","11/18/2010","11/19/201

[R] Interpreting parameters of sigmoid fct

2011-08-17 Thread Anna Lee
Dear list, I'm trying to fit a chapman-richards equation to my data, only I cannot interpret the parameters a, b and d. I know that the parameter b denotes the asymptote, but for the others I couldn't figure out. But I do need to know this in order to set my starting values. Here's the model: mod

[R] Fwd: Interpreting parameters of sigmoid fct

2011-08-18 Thread Anna Lee
Dear list, I'm trying to fit a chapman-richards equation to my data, only I cannot interpret the parameters a, b and d. I know that the parameter b denotes the asymptote, but for the others I couldn't figure out. But I do need to know this in order to set my starting values. Here's the model: mod

[R] what characteristics of model curve do parameters denote

2011-08-18 Thread Anna Lee
Dear list, I'm trying to fit a chapman-richards equation to my data, only I cannot interpret the parameters a, b and d. I know that the parameter b denotes the asymptote, but for the others I couldn't figure out. But I do need to know this in order to set my starting values. Here's the model: mod

[R] Change Variable Labels in Quantile Plot

2011-08-22 Thread Kitty Lee
I have spent hours on this ---looked through the quantreg manual and r-help site--- still couldn't figure out the answer. Can someone please help me on this? I plot the result from quantile regression and want to change the variable labels: temp<-rq(dep~inc+age50, data=newdata, tau=1:9/10)

[R] Change Variable Labels in Quantile Plot

2011-08-23 Thread Kitty Lee
Hi Roger, Maybe I'm missing a clue. Here's an example: x<-rnorm(50) x1<-rnorm(50) y<-x+x1+rnorm(50) out<-rq(y~x+x1, tau=1:9/10) plot(summary(out)) plot.out<-plot(summary(out)) #I change the variable names dimnames(plot.out)<-list(c("intercept", "sex", "inc")) #Look at the plot #it's ONE si

[R] Change Variable Labels in Quantile Plot

2011-08-23 Thread Kitty Lee
Why not just change the names of the variables before invoking the call to rq, and its formula? Because I won't be able to do longer label e.g. 'Population Density Per Square Mile'. I actually found the solution by accident--- x<-rnorm(50) x1<-rnorm(50) y<-x+x1+rnorm(50) out<-rq(y~x+x1, tau=1:9/

[R] prediction of sales with VAR model

2012-06-12 Thread Michael Lee
Hi, I work in a kitchen production factory and I try to predict sales of kitchen for an horizon of 12 weeks, and I have to turn into account promotions. My sales are express in number of command, my promotion are express with dummy variables. (1 if promotion, 0 else). The first problem is that my

[R] MCMCfactanal inquiries

2012-06-15 Thread Haillie Lee
Dear list, Hi, I am emailing to see if it would be possible to get some help on running MCMCfactanal on R. I am trying to derive a single score measuring a likelihood to recieve IMF loans from 8 different variables related to IMF representation but for reason, my codes do not seem to take me to wh

[R] Predicted values for zero-inflated Poisson

2012-07-09 Thread Lee, Laura
Hi all- I fit a zero-inflated Poisson model to model bycatch rates using an offset term for effort. I need to apply the fitted model to a datasets of varying levels of effort to predict the associated levels of bycatch. I am seeking assistance as to the correct way to code this. Thanks in adva

Re: [R] Predicted values for zero-inflated Poisson

2012-07-09 Thread Laura Lee
Thanks for your reply. I do have a copy of "Zero Inflated Models and Generalized Linear Mixed Models with R" and have been using that as a guide. I applied the predict function (type="count") to the dataset for which I built the model to compare the predicted bycatch numbers to the observed to ensu

Re: [R] Predicted values for zero-inflated Poisson

2012-07-10 Thread Laura Lee
012 5:20 PM To: Lee, Laura Subject: Re: Predicted values for zero-inflated Poisson Laura Lee laura.lee at ncdenr.gov Mon Jul 9 22:51:40 CEST 2012 Previous message: [R] Predicted values for zero-inflated Poisson Next message: [R] Lavaan Package - How to Extract Residuals in Data V

Re: [R] Predicted values for zero-inflated Poisson

2012-07-10 Thread Laura Lee
led effort), would I use sum(predict(ZIP,newdata=effort,type="response"))? I want to be certain I am understanding the coding--this is my first time using the predict function. Thanks, Laura - Laura M. Lee Senior Stock Assessment Scientist North Carolina Division of Marine Fis

Re: [R] Predicted values for zero-inflated Poisson

2012-07-10 Thread Laura Lee
5n4636025...@n4.nabble.com] Sent: Tuesday, July 10, 2012 1:52 PM To: Lee, Laura Subject: Re: Predicted values for zero-inflated Poisson *Laura Lee* laura.lee at ncdenr.gov <mailto:r-help%40r-project.org?Subject=Re%3A%20%5BR%5D%20Predicted%20values%20for%20zero-inflated%20Poisson&In-Reply-To=%3

[R] Predicted values when using offset in ZIP GLM

2012-07-12 Thread Lee, Laura
Hi all! I have built a model to predict interactions with turtles and the model includes an offset for effort: ZIP<-zeroinfl(Sturgeon~fMesh+fSeason+offset(LogEffort),dist="poisson",link="logit",data=data) I wasn't clear about one aspect of the response to a similar question I recently posted..

[R] matching items in a data frame

2011-07-06 Thread Lee Averell
ge 4a blink 4a orange 4a bedroom 4acurb 4abowl Some of the words are presented to multiple participants others are not. I am trying to get an index of 1) which words are repeated and 2) how many times they are repeated. Any suggestion

[R] combining elements in a data frame

2011-07-14 Thread Lee Averell
RT for each word and add that as a column in the second data frame. Any help would be appreciated Cheers Lee Data frame 1 > head(alldat) s expt session cycle trial left.right freq concrword rt resp Response correct corrResp 121 1aa 1C1 1 1 lfhc pian

[R] How to convert 3-digits hours

2011-07-21 Thread Wonjae Lee
Hi, all Here is what I tried to do. > strptime('20110101 0900',"%Y%m%d %H%M") [1] "2011-01-01 09:00:00" > strptime('20110101 900',"%Y%m%d %H%M") [1] NA If I have a 3-digit hour like '900', please show me how to convert it to 09:00:00. Thank you in advance. Wonjae -- View this message in co

[R] Matplot & Polygon

2011-08-02 Thread Kitty Lee
I used matplot to plot multiple lines (over 300 lines). I'd like to draw a polygon and shade the area between upper and lower boundary. I know the plot function works pretty well with polygon(). How about matplot? I have too many lines and my upper/lower boundaries are formed by many different

[R] Row means of matrix.

2012-08-17 Thread Yingwei Lee
Hi all, I'm just having trouble getting row means of a matrix which contain zero. For example. m=matrix(c(1:4, c(0, 0, 0, 0), c(1, 0, 1, 1)), nc=4, byrow=TRUE) I want to be able to calculate means for non-zero elements for each row. ## what i have is this apply((m[apply(m != 0, MARGIN

[R] Theil decomposition

2011-11-15 Thread Kitty Lee
I came across the package 'ineq' that computes a variety of inequality measures (e.g. gini, theil etc). I want to compute the Theil index (racial segregation) and decompose the total into sub-components (by geog levels). I think the package doesn't report the decomposition (correct me if I'm wro

[R] matrix calculation

2011-12-09 Thread Junyu Lee
Hello, I have a matrix animaltime A01 A02 A d0 -5.4 2.7 A d1124.6 5.9 A d224 3.96.3 B

[R] Correlated count data technique advice

2012-01-06 Thread Lee Davis
nt here). Thank you in advance, Lee [[alternative HTML version deleted]] __ 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 c

[R] converting commas to points

2011-10-06 Thread Anna Lee
Hello everyone! I work with a german excell version which uses commas instead of points for seperating decimal places. R work with points so in order to be able to save my excell tables without changing the commas to points, whenever I load a table I type in: read.table(..., dec = ",") only R puts

Re: [R] converting commas to points

2011-10-06 Thread Anna Lee
Sorry guys, I allready found the solution. Excell showed some of the numbers in the format: 1,90053-E05 and R interpreted it as 1.9... I changed that in Excel Cheers, Anna Am 6. Oktober 2011 17:48 schrieb Uwe Ligges : > > > On 06.10.2011 17:39, Anna Lee wrote: >> >> Hello e

[R] Odd characters at beginning of file

2012-04-13 Thread Lee Hachadoorian
e still there, because if I edit a pgAdmin-created file in Notepad or gedit, then save and read into R with readLines, they are there. Best, --Lee -- Lee Hachadoorian PhD, Earth & Environmental Sciences (Geography) Research Associate, CUNY Center for U

[R] Calculate t.test for a matrix

2012-04-14 Thread Junyu Lee
Hello everyone, I have a data frame (tt), see below (I only show 2 genes, actually I have a lot): groupgene1 gene2 Control 28.9776 9.9355 Control 28.9499 10.0997 Control 29.5468 14.2995 Control 29.5246 13.9561 Test1 29.1864 9.7718 Test1 29.2048 10.0388 Test1 34.95

Re: [R] Calculate t.test for a matrix

2012-04-14 Thread Junyu Lee
Hello everyone, I posted a question this morning, when I got replies, I realized that the data I posted was messy. So I am going to re-post it. Here is my data frame: groupgene1 gene2 Control 28.9776 9.9355 Control 28.9

Re: [R] Odd characters at beginning of file

2012-04-14 Thread Lee Hachadoorian
On 04/14/2012 09:37 AM, Duncan Murdoch wrote: sql <- sub("\uFEFF", "", sql) Thank you, this worked exactly. Best, --Lee -- Lee Hachadoorian PhD, Earth& Environmental Sciences (Geography) Research Associate, CUNY Center for Urban Research http://f

[R] zeroinfl package - Year effect and precision

2012-02-03 Thread Lee, Laura
Hello. I am using the zeroinfl package to fit a zero-inflated negative binomial. The explanatory variables are Year and Depth x STemp (interaction). I am in need of guidance for extracting the year effect and the associated precision. Thank you for your time. Cheers, Laura

[R] Advise in R- plotting graphs

2008-05-23 Thread Jason Lee
Hi I have a data table matrix,"data" which looks like below:- V1V2 V3 1 -6382.719 -1096.554 6998994 2 -some values- 3 -some values- 4 -some values- 5 -some values- Querying dim of "data" gives me 3 columns and 5 rows. And currently I want to plot "V1" against "V2" with the

[R] Fwd: Advise in R- plotting graphs

2008-05-23 Thread Jason Lee
00), ncol=3) > plot(x[,1], x[,2], type='l') > points(x[5,1], x[5,2], pch=17, cex=3, col='red') # plot point #5 > > On Fri, May 23, 2008 at 8:50 AM, Jason Lee <[EMAIL PROTECTED]> wrote: > >> Hi >> >> I have a data table matrix,"data

[R] How to pass variable of for loop on read table text

2008-05-23 Thread Jason Lee
Hi, I have a couple of text and would like to automate of reading these multiple files using (namely; text1.txt, text2.txt) for(y in 3:10){ data$y<-read.table('text$y.txt')} But it seems not allow. Any idea? Thanks. [[alternative HTML version deleted]] ___

[R] Need advise in grab the line number of sorted list in R

2008-06-02 Thread Jason Lee
Hi, I have a data frame which format is like below:- X Y Z 131 22.2 3.4 4.4 150 20.0 12.2 4.5 etc... And I have sorted the data frame. However, I would like to grab one of these elements in the data frame. Also, i would like to number these rows so that when i grab a particul

Re: [R] Need advise in grab the line number of sorted list in R

2008-06-02 Thread Jason Lee
e calculation? On Tue, Jun 3, 2008 at 12:02 AM, Marc Schwartz <[EMAIL PROTECTED]> wrote: > on 06/02/2008 08:45 AM Jason Lee wrote: > >> Hi, >> >> I have a data frame which format is like below:- >> >>X Y Z >> 131 22.2 3.4 4.4 >

[R] Problem in executing R on server

2008-06-05 Thread Jason Lee
Hi R-listers, I have problem in executing my R on server. It returns me Error: cannot allocate vector of size 15.8 Mb each time when i execute R on the server. But it doesnt give me any problem when i try executing on my own Pc (except it runs extremely slow). Any pointers to this? I tried to r

Re: [R] Problem in executing R on server

2008-06-05 Thread Jason Lee
I am running on Sun Solaris server. Please advise. Thanks. On Fri, Jun 6, 2008 at 11:50 AM, Erik Iverson <[EMAIL PROTECTED]> wrote: > > > Jason Lee wrote: > >> Hi R-listers, >> >> I have problem in executing my R on server. It returns me >> >&g

Re: [R] Problem in executing R on server

2008-06-05 Thread Jason Lee
<[EMAIL PROTECTED]> wrote: > > On 6/06/2008, at 1:36 PM, Jason Lee wrote: > > Hi R-listers, >> >> I have problem in executing my R on server. It returns me >> >> Error: cannot allocate vector of size 15.8 Mb >> >> each time when i execute

Re: [R] Problem in executing R on server

2008-06-05 Thread Jason Lee
d in your Sun Solaris server? How much RAM is > installed on your PC? > > Jason Lee wrote: > >> Hi, >> >> I am actually trying to do some matrix multiplications of large datasets >> of 3000 columns and 150 rows. >> >> And I am running R version 2.7.0.

Re: [R] Problem in executing R on server

2008-06-05 Thread Jason Lee
t; wrote: > And what is your sessionInfo() in each case! > > Jason Lee wrote: > >> Hi, >> >> I query free -m, >> >> On my server it is, >> >> total used free sharedbuffers cached >> Mem: 321

Re: [R] Problem in executing R on server

2008-06-05 Thread Jason Lee
. Thanks. On Fri, Jun 6, 2008 at 2:49 PM, Ray Brownrigg <[EMAIL PROTECTED]> wrote: > What does the limit (or "ulimit -a" in sh or bash) command (outside of R) > respond with? > > In Solaris, there can be per-user limits to memory use. > > HTH, > Ray Brownrigg

[R] R and Fortran

2008-06-11 Thread Derrick Lee
0.1 year 2004 month11 day 15 language R Any help to this query would be very much appreciated. Cheers. Sincerely - Derrick Derrick Lee, MSc Candidate Department of Statistics The University of British Columbia LSK-314A | 604 - 822 - 1299 x532 d.lee at stat dot ubc dot ca | dgylee

[R] R and Fortran

2008-06-11 Thread Derrick Lee
month11 day 15 language R Any help to these queries would be very much appreciated. Cheers. Sincerely - Derrick Derrick Lee, MSc Candidate Department of Statistics The University of British Columbia LSK-314A | 604 - 822 - 1299 x532 d.lee at stat dot ub

Re: [R] R and Fortran

2008-06-11 Thread Derrick Lee
rrick! Is your subroutine named "chol"? There is a function in R by the name of chol. You might be having a problem with that. thanks, Erin On Wed, Jun 11, 2008 at 2:39 PM, Derrick Lee <[EMAIL PROTECTED]> wrote: Dear Fellow R-Users, I am having some difficulties loading a For

[R] R and Fortran

2008-06-11 Thread Derrick Lee
month11 day 15 language R Any help to these queries would be very much appreciated. Cheers. Sincerely - Derrick Derrick Lee, MSc Candidate Department of Statistics The University of British Columbia LSK-314A | 604 - 822 - 1299 x532 d.lee at

[R] Help in using PCR

2008-06-30 Thread Jason Lee
Hi, Currently I have a dataset of 2400*408. And I would like to apply PCR method to study the any correlation between the tests. My current data is in data.frame and I have formed horizontal(1-407) to be the exact data, and (408) to be my results data(Yes and No) I have also binarized these Yes an

[R] Query on packages for Emerging Patterns

2008-07-01 Thread Jason Lee
Hi, Currently I have a data set of 2 classes and I am interedted to use emerging patterns algorithm. I wondered if there is any packages or recommended code available for this? Please advise.Thanks. [[alternative HTML version deleted]] __ R-h

Re: [R] Help in using PCR

2008-07-01 Thread Jason Lee
Hi, Thanks for the reply. Basically I dont have any label for my data except column 1 which is labeled with Sample1, Sample2...etc...(vertical). My cancerv1 data is data.frame. So, I used df <- data.frame( x=I(coef(cancerv1(,2:407))), y=cancerv1[,408])before feeding to PCR. However, I get the b

[R] Problem in installing Biobase

2008-07-04 Thread Jason Lee
Hi, Recently I try to install Biobase component using the tutorials from cran.r-project.org/doc/Rnews/Rnews_2006-5.pdf I tried u <- "http://bioconductor.org/biocLite.R"; > source(u) > biocLite("pkgDepTools", dependencies=TRUE) Running biocinstall version 2.0.8 with R version 2.5.1 Your version o

[R] How can i do an automatic upgrade of R 2.5.1 to R 2.7.1

2008-07-06 Thread Jason Lee
Hi, I am aware this is somehow FAQ question but I ve been searching from R-cran archive about the related matter and could not find anything closer to this. I want to upgrade my R version from 2.5.1. to 2.7.1. What is the best way to load the latest one apart from installing the packages (tar.gz)

Re: [R] How can i do an automatic upgrade of R 2.5.1 to R 2.7.1

2008-07-06 Thread Jason Lee
I checked from Ubuntu distro and the latest package only show 2.5.1. Anyone has the similar problem too? On Mon, Jul 7, 2008 at 11:39 AM, Jason Lee <[EMAIL PROTECTED]> wrote: > Hi, > > I am aware this is somehow FAQ question but I ve been searching from R-cran > archive about

[R] How to extract component number of RMSEP in RMSEP plot

2008-07-15 Thread Jason Lee
Hi R-listers, I would like to know how can i extract component no. when the RMSEP is lowest? Currently, I only plot it manually and then only feed the ncomp to the jack knife command. However, I would like to automate this step. Please let me know. Many thanks. Rgrds, [[alternative HTM

Re: [R] Exporting of R dendrogram object in the format of E isen´s Cluster

2008-03-23 Thread Julian Lee
Hi You can try using the ctc package to export your dendrogram objects and use Cluster to open them. This package is part of biocondutor. >>source("http://bioconductor.org/biocLite.R";) >>biocLite('ctc') regards Julian Lee - Original Message - From: Ji

[R] Histogram Label Font Size

2008-04-14 Thread Sue Lee
Hi! I'm having a trouble changing font size of histogram label. I have tried help(hist), but I couldn't find anything explain how to fix label's font size. Could you help me please? Thank you. _ Going green? See the top 12 foods t

[R] nlme function in S+ and R

2008-05-15 Thread d . lee
cerely - Derrick Derrick Lee, MSc Candidate Department of Statistics The University of British Columbia LSK-314A | 604 - 822 - 1299 x532 d.lee at stat dot ubc dot ca | dgylee at mun dot ca www.stat.ubc.ca/~d.lee/ | www.math.mun.ca/~derrick0/ __ R-

[R] Need help in matrix multiplication error

2008-05-19 Thread Jason Lee
Hi, I have a data file which is named test.txt as below. Prior to that, I have converted the last row from nominal to numeric using as.integer. Statement T1001 T1002 T1003 T1004 T1005 T100 T1014 T1021 T1022 T1023 1 0 0 0 0 0 00 0 1 0 0 20

[R] Problem in converting natural numbers to bits and others

2008-05-21 Thread Jason Lee
Hi, I just started using R for about one week and I have few problems. i)I have a problem in finding right function to convert a table of natural numbers to bitwise. For a simple example; I have the below table:- Column Col1 Col2 Col3 Sample1 57 10 Sample2 02 1 S

[R] Dual Core vs Quad Core

2007-12-17 Thread Kitty Lee
Dear R-users, I use R to run spatial stuff and it takes up a lot of ram. Runs can take hours or days. I am thinking of getting a new desktop. Can R take advantage of the dual-core system? I have a dual-core computer at work. But it seems that right now R is using only one processor. The new

[R] Installing R on BSD

2008-01-08 Thread Kitty Lee
Dear users, I try to follow the instruction on this page to install R on 4.4BSD network. http://cran.r-project.org/doc/manuals/R-admin.html#Using-make I can unpack the file but the system can't recognize the command: ./configure make Any ideas what should be the right command? Thanks!! K.

[R] Invoking R on BSD

2008-01-08 Thread Kitty Lee
Thanks to Saeed Abu Nimeh. I used pkg_add to install R package on 4.4BSD. My directory now has the following: BUILDDIRMakefrag.cc_lo config.log m4 tests MakeconfMakefrag.cxxconfig.status po tools MakefileR-2.6.1 doc

[R] are these the same?

2008-09-16 Thread Kitty Lee
Dear members, I was trying to simulate W which is iid and depends on X and Y. Here are 2 methods: Method 1: x<-rnorm(100) y<-rnorm(100) w<-rnorm(100, 2x+y,1) Method 2: x<-rnorm(100) y<-rnorm(100) w<-2x+y+rnorm(100,0,1) Are these methods comparable? Since x and y are vectors, the term 2x

[R] data frame column name as a function argument

2008-09-26 Thread eric lee
Hello, I'd like to pass a column name as the argument for a function, but I'm getting "NULL" as a return value. Any suggestions? Thanks. > d <- data.frame(cbind(x=1, y=1:10)) > d x y 1 1 1 2 1 2 3 1 3 4 1 4 5 1 5 6 1 6 7 1 7 8 1 8 9 1 9 10 1 10 > testing <- function(var) {

[R] using tapply on a data frame in a function

2008-09-28 Thread eric lee
Hello, I'm trying to use tapply to find group means in a function. It works outside of a function, but I get the error message from the following code: "Error in tapply(index, cluster, mean) : arguments must have same length." Any suggestions? Thanks. eric d <- data.frame(cbind(cluster=1:2, va

[R] adding labels to tapply results

2008-09-29 Thread eric lee
Hi, How do I get labels onto the output from tapply? I need the labels to merge the output with another data frame. Thanks. eric d <- data.frame(cbind(x=1:3, y=1:10)) a <- with(d, tapply(y, x, sum)) [[alternative HTML version deleted]] __ R

[R] How to remove columns of table in R recursively

2008-09-29 Thread Jason Lee
Hi R-list, I would like to know how to perform any elimination of attribute (column) in R. E.g I have:- 20,21,22,23,24,25,normal 1,2,3,4,5,5,normal 0,1,0,2,3,4,abnormal ... I intend to do a checking on each column:- If the column sum of abnormal is 0 but the column sum of normal is nonzero, i

[R] merging a list and data frame

2008-09-30 Thread eric lee
Hi, I'd like to merge the following list and data frame by matching the first column in the data frame to the first number in each object of the list. I'd also like the merged object to be a list. Any suggestions? Thanks. eric a <- list(c(1,11), c(2,12), c(3,13), c(4,14), c(5,16)) b <- data.f

[R] lapply where each list object has multiple parts

2008-10-01 Thread eric lee
Hi. I have a list where each object in the list has multiple parts. I'd like to take the mean of just one part of each object. Is it possible to do this with lapply? If not, can you recommend another function? Thanks. eric > x1 <- c(0,1,2,3) > x2 <- c(7,8) > x3 <- c(2,6,6,8) > x4 <- c(4,8) >

[R] Error message in ifthen else

2008-10-02 Thread Jason Lee
Hi, I came across the below error when I try to do ifelse condition:- Error in "[<-"(`*tmp*`, test, value = rep(yes, length = length(ans))[test]) : incompatible types What I am trying to accomplish is :- for(x in 1:ncol(filterpred)){ sumno<-sum(filterpred[no,x]) sumyes<-sum(filterpred[

Re: [R] Error message in ifthen else

2008-10-02 Thread Jason Lee
ing. When I put that on a loop, it gives me the above error. Please advise. Thanks. On Fri, Oct 3, 2008 at 1:57 PM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 02/10/2008 10:07 PM, Jason Lee wrote: > >> Hi, >> >> I came across the below error when I try to do

[R] find bayesian information criterion for all variable combinations

2008-10-17 Thread eric lee
Hi, I have data for one dependent variable and multiple independent variables y = b0 + b1*x1 + b2*x2 + ... I want to a list of all models that have some subset of the independents (just x1 x2, and not x3, etc.) and their corresponding BIC values. Is there a pre-existing function that does this?

[R] ad.test exponential distribution

2008-10-22 Thread eric lee
Hi, I'm trying to use ad.test or ad2.test to test whether a given data set is exponential. I see that one of the function inputs is "distn", but I try "exponential" and 5 other variants, but I still get the error message: ad.test(test2, distn="exponential", fit=list(estimate = 0.167685), H=NA, s

[R] Plot link points

2009-01-10 Thread Kitty Lee
Hi. This may be a straight-forward question... I have a time series from 1950 to 2000 (by year) with missing values. Sometimes only a year has value and the adjacent years have missing data, e.g. 1950 2.7 1951 1952 1953 3.4 1954 1955 1956 2.9 1957 3.6 1958 2.7 When I use plot (type='l'), the

[R] how to generate multiple random variables that are correlated

2009-02-02 Thread eric lee
Hi. I have two variables, x and y, that are each normally distributed with mean 0 and have known standard deviations. The variables also have a known correlation, so I can represent their correlations in a matrix like so: a <- array(c(0.3,0.1,0.1,0.2),c(2,2)) a Is there an R function that gener

[R] How to calculate the marginals of the data for some model

2009-02-09 Thread Power LEE
Hi all, I have modeled my observations/data,say, D=y(i) (i=1,2,...,2), as a univariate non-gausian distribution, gamma distribution y(i)~gamma(a,b) for example, and I have also obtained N samples of a, b via WinBUGS(Gibbs sampling), my question is: how to calculate the marginal density of D, m

[R] which zip file is the emulator package?

2009-02-26 Thread eric lee
Hi. I'm trying to run the elliptic package on my computer (windows platform, version 2.7.2). I downloaded the elliptic package zip file from http://lib.stat.cmu.edu/R/CRAN/ and installed it, but it says that it needs the "emulator" package. Can you tell me where to download this? The only simi

Re: [R] which zip file is the emulator package?

2009-02-26 Thread eric lee
n port 80. I assume it's something on my end because I've been having connectivity issues here. Thanks again for your help. eric On Thu, Feb 26, 2009 at 11:22 AM, Duncan Murdoch wrote: > On 2/26/2009 11:08 AM, eric lee wrote: >> >> Hi.  I'm trying to run the elliptic

Re: [R] which zip file is the emulator package?

2009-02-26 Thread eric lee
Thanks, Duncan. The BACCO package worked. On Thu, Feb 26, 2009 at 11:22 AM, Duncan Murdoch wrote: > On 2/26/2009 11:08 AM, eric lee wrote: >> >> Hi.  I'm trying to run the elliptic package on my computer (windows >> platform, version 2.7.2).  I downloaded the ellipti

[R] predict.glm predicted prob above 1?

2009-03-08 Thread Kitty Lee
I have a puzzle When I include an interaction in the model, many predicted probabilities are above 1. Is that a problem with my model? I thought the predicted prob can't be bigger than 1... Any help would be really appreciated! Thanks! K. reg1<-glm(pyea~male+edu+married+inc+relig+factor(

[R] Huge number

2008-02-18 Thread Hyojin Lee
Hi, I'm trying to calculate p-value to findout definitely expressed genes compare A to B situation. I got this data(this is a part of data) from whole organism , and each number means each expression values (that means, we could think 'a' gene is 13 in A situation, and it turns 30 in B situation)

[R] double y-axis heatmap

2008-02-25 Thread Lee Zamparo
ew = TRUE, las=1) > axis(2,at = axTicks(4), labels = as.character(kwResults[,2])) but the axis on side 2 is never scaled as the first axis on side 4. I've also checked par(), and the ylim for the graph is the same as what I set with at in the call to axis(). Can anyone shed some light

[R] getting the p-value from lm as a list object

2008-10-31 Thread eric lee
Hi, I'm trying to get the p-value from the 'lm' regression function as a list object. For example, I can get r^2 from the following code by entering summary(fm)$r.squared. Is there a way to get the p-value? If not, is there a function where I can enter the f-value and degrees of freedom to get

[R] lines, ecdf and colors

2008-11-08 Thread eric lee
Hi. I'm trying to plot two ecdf's on the same graph using two different colors. I can plot using the same color, but it doesn't work when I change colors? Any suggestions? Thanks in advance for your help. x <- c(0.80, 0.83, 1.89, 1.04, 1.45, 1.38, 1.91, 1.64, 0.73, 1.46) y <- c(1.15, 0.88, 0.9

[R] Levelplot + Mosaic Plot hybrid?

2008-11-17 Thread Kitty Lee
Hi. I have built a levelplot with 3 variables, X, Y, and Z where X and Y are the two axes and Z represents the intensity (i.e. Z~X*Y). Now I want to adjust the size of the grid (like a mosaic plot) where the size of each grid is weighted by a variable, W. Just wonder how can I do that with lev

[R] difftime

2008-12-09 Thread eric lee
Hi. I'm trying to take the difference in days between two times. Can you point out what's wrong, or suggest a different function? When I try the following code, The following code works fine: a <- strptime(1911100807,format="%Y%m%d%H",tz="GMT") b <- strptime(1911102718,format="%Y%m%d%H",tz="GM

[R] Broken links (???) in R-FAQ

2015-06-24 Thread Chel Hee Lee
Bioconductor, * Bioconductor software packages <http://www.bioconductor.org/packages/bioc/> Under the section 7.39 How do I create a plot with two y-axes?, * http://rwiki.sciviews.org/doku.php?id=tips:graphics-base:2yaxes I appreciate your helps! Chel Hee Lee _

[R] Broken links (???) in rw-FAQ

2015-06-24 Thread Chel Hee Lee
http://windowsvistablog.com/blogs/windowsvista/archive/2007/01/23/security-features-vs-convenience.aspx I appreciate your help! Chel Hee Lee __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

Re: [R] Broken links (???) in R-FAQ

2015-06-25 Thread Chel Hee Lee
Thank you so much, Jim. Yes, I also see that the wiki (rwiki.sciviews.org) is not found. Chel Hee Lee On 15-06-25 04:54 AM, Jim Lemon wrote: Hi Chel Hee, The last link (for FAQ 7.39) is dead and the domain (rwiki.sciviews.org) is not there either. Jim On Thu, Jun 25, 2015 at 3:45 AM, Chel

Re: [R] Broken links (???) in rw-FAQ

2015-06-25 Thread Chel Hee Lee
Thank you so much, David! I also confirmed that the link moved is not found. Chel Hee Lee On 15-06-24 04:15 PM, David Winsemius wrote: On Jun 24, 2015, at 10:52 AM, Chel Hee Lee wrote: Could you also kindly check the following links in the rw-FAQ manual at <http://cran.r-project.org/

[R] Translation of R Manuals

2015-07-05 Thread Chel Hee Lee
this project. Please contact me if you voluntarily participate in or offer your help with this project of translating R manuals. Comments and corrections is of course most welcome. Chel Hee Lee __ R-help@r-project.org mailing list -- To UNSUBSCRIBE

[R] Party package: varimp(..., conditional=TRUE) error: term 1 would require 9e+12 columns (fwd)

2015-07-13 Thread Julie Lee-Yaw
Hello, I'm following previous threads on the use of varimp in the R "party" package. I'm running up against similar problems to that described here (and the thread referenced therein): https://stat.ethz.ch/pipermail/r-help/2011-October/292897.html Specifically, I'm running cforest and then varim

Re: [R] Getting the most recent dates in a new column from dates in four columns using the dplyr package (mutate verb)

2014-12-03 Thread Chel Hee Lee
class [1] "rowwise_df" "tbl_df" "tbl""data.frame" $row.names [1] 1 2 3 4 5 6 7 > attributes(new2) $names [1] "id" "mrjdate" "cocdate" "inhdate" "haldate" "oiddate" $row.names [1] 1 2 3

Re: [R] combining unequal dataframes based on a common grouping factor

2014-12-03 Thread Chel Hee Lee
1.65 2 1 3.3 1.65 3 1 3.3 1.65 4 2 10.0 5.00 5 2 10.0 5.00 6 3 30.0 15.00 7 4 40.0 20.00 > Is this what you are looking for? I hope this helps. Chel Hee Lee On 12/03/2014 03:14 PM, Brock Huntsman wrote: I apologize if this is

Re: [R] coerce data to numeric

2014-12-03 Thread Chel Hee Lee
tX = rbind(tX, as.data.frame(cbind(GId =0,Grp = 0, S = fm, T = fm))) Of course you have to do little more works with this change in order to get final bar plots. I hope this helps. Chel Hee Lee On 12/03/2014 12:29 PM, Charles R Parker wrote: I am trying to create groups of barplot

Re: [R] R installation

2014-12-03 Thread Chel Hee Lee
This question seems to be the problem specific to Ubuntu. What if you post the message to ?? I hope you get answers from that mailing list. Chel Hee Lee On 12/02/2014 11:10 AM, VG wrote: Hi everyone, I was having trouble with R i installed some time ago on my local ubuntu machine. So i

Re: [R] FW: R Statistics

2014-12-03 Thread Chel Hee Lee
0,19.0,24.0),right=FALSE) > levels(achtergrond$spits) <- c("between","morning","between","evening","between") > table(achtergrond$spits) between morning evening 1636 579 142 > You can also use function 'findInterval()

Re: [R] Rename multiple files in a directory and write renamed files back to directory

2014-12-04 Thread Chel Hee Lee
example_02.dat" "new_example_03.dat" [4] "new_example_04.dat" "new_example_05.dat" "new_example_06.dat" > > file.rename(from=file_names, to=new_names) [1] TRUE TRUE TRUE TRUE TRUE TRUE > list.files(pattern="*.dat") [1] "new_ex

Re: [R] Rename multiple files in a directory and write renamed files back to directory

2014-12-04 Thread Chel Hee Lee
I see that a function 'format()' is used in your code. > format(c(1,5,32,100), width=3, flag="0") [1] " 1" " 5" " 32" "100" > formatC(c(1,5,32,100), width=3, flag="0") [1] "001" "005" "032&quo

<    1   2   3   4   >