[R] help

2008-02-08 Thread zahid khan
Dear all i am working for seasonal unit root test analysis for quaterly series of Pakistan in R.My question is how i can run Hegy test for quaterly series command in uroot library? If there is another library then help me in this regard.My purpose is just to perform unit root analysis for

Re: [R] Row percentages for a table object

2008-02-08 Thread Jim Lemon
Tom Backer Johnsen wrote: I an stumbling on something that is probably very simple, but I cannot see the solution. I have an object generated by the table () function and want to recompute this table so each cell represents the percentage of the corresponding row sum. Of course a

[R] Checking for linearity by ploting residuals against predicted values (lme)?

2008-02-08 Thread Falco tinnunculus
Hello, Is there a easy way to get p-values when testing linearity of a model by ploting residuals against predicted values? Regards Kes, [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] kinship package: drawing pedigree error

2008-02-08 Thread Neil Shephard
You can also draw pedigrees using the pedtodot() function from the gap package. It does however depend on graphviz (http://www.graphviz.org). An article on drawing pedigrees in R is available in Bioinformatics 22(8):1013-1014 (see http://forums.gentoo.org/viewtopic-t-641204) There _may_ also

[R] cloud + legend

2008-02-08 Thread Neuer Arkadasch
Hello, Is it possible to add a legend to the 3d scatterplot cloud? Thanks alot, Arkadasch - [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Updating US county map in maps package

2008-02-08 Thread John Shonder
Does anyone know how to update the map of US counties that is included with the maps package? The included map is outdated, and is missing several newer counties in various states. The cartographic boundary files from the 2000 census are available at

Re: [R] Row percentages for a table object

2008-02-08 Thread Gerrit Eichner
Tom Backer Johnsen wrote: I an stumbling on something that is probably very simple, but I cannot see the solution. I have an object generated by the table () function and want to recompute this table so each cell represents the percentage of the corresponding row sum. Of course a dedicated

Re: [R] Checking for linearity by ploting residuals against predicted values (lme)?

2008-02-08 Thread Henrique Dallazuanna
I don't know if is there a test for this, but I think you can use the AIC/BIC for the validity of the model On 08/02/2008, Falco tinnunculus [EMAIL PROTECTED] wrote: Hello, Is there a easy way to get p-values when testing linearity of a model by ploting residuals against predicted values?

[R] R 2.6.2 is released

2008-02-08 Thread Peter Dalgaard
I've rolled up R-2.6.2.tar.gz a short while ago. This is a maintenance release and fixes a number of mostly minor bugs. See the full list of changes below. You can get it (in a short while) from http://cran.r-project.org/src/base/R-2/R-2.6.2.tar.gz or wait for it to be mirrored at a CRAN site

[R] xyplot and lsegments

2008-02-08 Thread Alex Brown
Hi, How might I use xyplot to plot segments where the segments are in the input data? (ie a directed acyclic forest). Here's an example in base graphics: n = data.frame(id = c(1,2,3,4), parent = c(0,1,2,2), value = c(5,5.5,7,3), date = c(1,2,3,3.5)) plot(n$date, n$value)

Re: [R] xyplot and lsegments

2008-02-08 Thread hadley wickham
On Feb 8, 2008 9:36 AM, Alex Brown [EMAIL PROTECTED] wrote: Hi, How might I use xyplot to plot segments where the segments are in the input data? (ie a directed acyclic forest). Here's an example in base graphics: n = data.frame(id = c(1,2,3,4), parent = c(0,1,2,2), value =

[R] User-specified correlation structure (e.g., 2-banded Toeplitz)

2008-02-08 Thread Reid Landes
Dear All: I am trying to fit a special case of a 2-banded Toeplitz correlation structure. A 2-banded Toeplitz has ones on the diagonal, a correlation, RHO1, on the first off-diagonal, and a correlation, RHO2, on the second off-diagonal, with zeros on all subsequent off-diagonals. After reading

Re: [R] writing a function

2008-02-08 Thread K. Elo
Hi Mohamed, mohamed nur anisah wrote (8.2.2008): Dear lists, I'm in my process of learning of writing a function. I tried to write a simple functions of a matrix and a vector. Here are the codes: mm-function(m,n){ #matrix function w-matrix(nrow=m, ncol=n) for(i in

[R] learning S4

2008-02-08 Thread cgenolin
Hi the list. I try to learn the S4 programming. I find the wiki and several doc. But I still have few questions... 1. To define 'representation', we can use two syntax : - representation=list(temps = 'numeric',traj = 'matrix') - representation(temps = 'numeric',traj = 'matrix') Is

Re: [R] How to split a factor (unique identifier) into severalothers?

2008-02-08 Thread Tribo Laboy
Hi Greg, The short example you gave cleared it up. I still have some issues with getting used to R indexing. I was desperately trying to do: zzz - rbind(fctrs_list[1], fctrs_list[2]) and was getting: zzz [,1] [1,] Character,3 [2,] Character,3 instead of the zzz -

[R] reshape question

2008-02-08 Thread Ista Zahn
I know there are a lot of reshape questions on the mailing list, but I haven't been able to find an answer to this particular issue. I am trying to get a datafame structured like this: sub - rep(1:5) ta1 - rep(1,5) ta2 - rep(2,5) tb1- rep(3,5) tb2 - rep(4,5) DF -

Re: [R] Catching NaNs from pweibull()

2008-02-08 Thread Ben Bolker
That's odd, it works just fine for me (R 2.6.1, i486-pc-linux-gnu) Can you send the results of sessionInfo() ? # Observed data Prepens.caughtintraps = c(94,45,71,64,71,31,16,19,27,16,113) # Numbers of seeds released Prepens.released = 1250 distances =

Re: [R] writing a function

2008-02-08 Thread Matthew Keller
Hi Mohamed, You want to return the matrix - you're returning an element of the matrix. So in your formula, insert: return(w) instead of return(w[i,j]) On Feb 8, 2008 8:42 AM, mohamed nur anisah [EMAIL PROTECTED] wrote: Dear lists, I'm in my process of learning of writing a function. I

Re: [R] writing a function

2008-02-08 Thread Bob Flagg
Anisah, You just need to omit the indices in the return statements: mm-function(m,n){ #matrix function w-matrix(nrow=m, ncol=n) for(i in 1:m){ for(j in 1:n){ w[i,j]=i+j } } w }

[R] writing a function

2008-02-08 Thread mohamed nur anisah
Dear lists, I'm in my process of learning of writing a function. I tried to write a simple functions of a matrix and a vector. Here are the codes: mm-function(m,n){ #matrix function w-matrix(nrow=m, ncol=n) for(i in 1:m){ for(j in 1:n){ w[i,j]=i+j } }

Re: [R] correlation

2008-02-08 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: Dear list I would like to compare two measurements of disease severity (M1 and M2), one of the is continuous (M1 ranging from 1 to 10) and the other is ordinal (M2 takes Low, Medium, high and very high). Do you think is ok to use cor() function to test whether the

[R] User specified correlation structure (e.g., 2-banded Toeplitz)

2008-02-08 Thread Reid Landes
Dear All: I am trying to fit a special case of a 2-banded Toeplitz correlation structure. A 2-banded Toeplitz has ones on the diagonal, a correlation, RHO1, on the first off-diagonal, and a correlation, RHO2, on the second off-diagonal, with zeros on all subsequent off-diagonals. After reading

Re: [R] ANOVA and lmer

2008-02-08 Thread Douglas Bates
On Feb 7, 2008 3:43 PM, Eric Imbert [EMAIL PROTECTED] wrote: I am analyzing from a very simple experiment. I have measured plants of two different colours (yellow and purple) in 9 different populations. So, I have two different factors : a fixed effect (Colour with two levels) and a random

Re: [R] reshape question

2008-02-08 Thread Chuck Cleland
On 2/8/2008 9:15 AM, Ista Zahn wrote: I know there are a lot of reshape questions on the mailing list, but I haven't been able to find an answer to this particular issue. I am trying to get a datafame structured like this: sub - rep(1:5) ta1 - rep(1,5) ta2 - rep(2,5) tb1-

Re: [R] xyplot and lsegments

2008-02-08 Thread Deepayan Sarkar
On 2/8/08, Alex Brown [EMAIL PROTECTED] wrote: Hi, How might I use xyplot to plot segments where the segments are in the input data? (ie a directed acyclic forest). Here's an example in base graphics: n = data.frame(id = c(1,2,3,4), parent = c(0,1,2,2), value =

Re: [R] Applying lm to data with combn

2008-02-08 Thread Henrique Dallazuanna
I think what you want is this: lapply(apply(combn(5, 4), 2, function(x)mD[,x]), function(x)lm(X.SSMII ~ ., data=x)) On 08/02/2008, AliR [EMAIL PROTECTED] wrote: http://www.nabble.com/file/p15359204/test.data.csv http://www.nabble.com/file/p15359204/test.data.csv test.data.csv Hi, I have

[R] Short Course: Statistical Learning and Data Mining

2008-02-08 Thread Trevor Hastie
Short course: Statistical Learning and Data Mining II: tools for tall and wide data Trevor Hastie and Robert Tibshirani, Stanford University Sheraton Hotel, Palo Alto, California, April 3-4, 2006. This two-day course gives a detailed overview of statistical models for data

[R] Cumulative multinomial regression using VGAM

2008-02-08 Thread Robert Schneider
Hi, I am trying to carry out a multinomial regression using the cumlogit link function. I have tried using the VGAM package, and have gotten some results... fit1 - vgam(Y ~ X1 + X2 + X3 + X4, cumulative(link=logit,intercept.apply=FALSE,parallel=TRUE), data = data1

Re: [R] convertin a data frame column from character to numeric

2008-02-08 Thread Henrique Dallazuanna
Try this: x - cbind(x[1],sapply(x[,2:3], as.numeric)) On 08/02/2008, joseph [EMAIL PROTECTED] wrote: I have a data.frame with all character columns, I would like to convert the last two columns into numeric. x[1:5, ] chrNstart end 1 chr1 71310034

Re: [R] .fortran code

2008-02-08 Thread Ravi Varadhan
I am attaching the Fortran .f files rs.f rg.f, if that would help. You can also get these routines (and more, such as the routines called by rg.f and rs.f) from netlib - http://www.netlib.org/eispack/index.html The reason that you can find these from google search is that they are part of

Re: [R] writing a function

2008-02-08 Thread Jorge Iván Vélez
Hi Mohamed, Just change return(w[i,j]) by return(w), and return(y[i]) by return(y). I hope this helps, Jorge On 2/8/08, mohamed nur anisah [EMAIL PROTECTED] wrote: Dear lists, I'm in my process of learning of writing a function. I tried to write a simple functions of a matrix and a

[R] error propagation

2008-02-08 Thread Steven Van Wilgenburg
Hello, I wish to examine the influence of error in variables on my analyses via error propagation. I have a data frame (x) as follows: id response 1-121 2-131 3-125 etc. I wish to propagate errors for each row in the data frame, where error is distributed around the value

Re: [R] immediate print

2008-02-08 Thread John Kane
Well you can put it within the loop but then it prints 1,000,000 times. --- Waterman, DG (David) [EMAIL PROTECTED] wrote: Hi everyone, I have a function containing a loop that takes some time to complete. Before I enter the loop I want to print a text string to the screen explaining what

[R] Loading Data to R

2008-02-08 Thread Christine Lynn
This is the most basic question ever...I haven't used R in a couple years since college so I forget and haven't been able to find what I'm looking for in any of the manuals. I just need to figure out how to load a dataset into the program from excel! Thanks! CL [[alternative HTML

[R] how to extract characters from a character string

2008-02-08 Thread Weidong Gu
Hi, I ran into a problem when I complied a dataset with UTM coordinates. For calculating distances between sites, I need to reformat the coordinates from, for example, 32?35.421 N, to 35.421, i.e. I need to delete all digits before symbol ? and a space and N at the end of the string. What

Re: [R] matrix loop

2008-02-08 Thread John Kane
You are trying to create a matrix in the loop Try creating the matrix before the loop m - 1:5 n-1:10 y - matrix(rep(NA, 50), nrow=m) for(i in 1:length(m)) { for(j in 1:length(n)) { y[i,j]=sum(i,j) } } However as Jim Holtman points out you can do this particular matrix by

Re: [R] How to search for packages - wrap up!

2008-02-08 Thread John Kane
--- hadley wickham [EMAIL PROTECTED] wrote: A new user will come to the R homepage, go to CRAN via the link under download and from there see Packages and then be swamped by the huge number available. Having Task Views as a link on the R homepage would make these more visible. I

[R] putting mean and sd on a histogram

2008-02-08 Thread dkowalske
Hi, I would like to put the mean and + / - the standard deviation as lines on the x axis of a histogram. My attempts using the histogram function have been unable to do this. My searches are unsucessful on this subject. Any ideas are appreciated. Thanks stemp - 5 6 5 5 5 5 6 5 m -5.25 stanD -

[R] Subsetting a data.frame degenerates at one column?

2008-02-08 Thread Allen S. Rout
Greetings. At the moment, I'm applying R to some AIX 'nmon' output, trying to get a handle on some disk performance metrics. In case anyone's interested: http://docs.osg.ufl.edu/tsm/pdf/ some of them are more edifying than others. (ahem) I'm trying to develop a somewhat general framework for

Re: [R] writing a function

2008-02-08 Thread John Kane
It is doing exactly what you ask. You are asking for the last element in the matrix w[i,j] and the last element in the vector y[i]. Try return(w) and return(y). --- mohamed nur anisah [EMAIL PROTECTED] wrote: Dear lists, I'm in my process of learning of writing a function. I tried

[R] Catching NaNs from pweibull()

2008-02-08 Thread Nakamura
Hello, I am working with the nls() function and inserting a formula into it that use the pweibull function. However the pweibull function is annoyingly producing NaNs, which nls() refuses to handle. I have put a sample of the code below. Is there a way to prevent these NaNs from interfering, for

Re: [R] Catching NaNs from pweibull()

2008-02-08 Thread Duncan Murdoch
On 2/8/2008 12:10 PM, Nakamura wrote: Hello Ben, Ok this is going to sound very bizare, but the code now works. I struggled for a long time to see why it was returning NaN values. I'm sure the code is exactly the same. But anyway it now seems to be working (for the time being). Thanks for

[R] Applying lm to data with combn

2008-02-08 Thread AliR
http://www.nabble.com/file/p15359204/test.data.csv http://www.nabble.com/file/p15359204/test.data.csv test.data.csv Hi, I have used apply to have certian combinations, but when I try to use these combinations I get the error [Error in eval(expr, envir, enclos) : object X.GDAXI not found].

Re: [R] remove the missing value,NA

2008-02-08 Thread Jorge Iván Vélez
Hi Mohamed, May be it's not the best way, but you can try w=c(1,4,5,2,NA,4,5,1,NA) w[-which(is.na(w))] [1] 1 4 5 2 4 5 1 I hope this helps. Jorge On 2/8/08, mohamed nur anisah [EMAIL PROTECTED] wrote: I have two sets of interval data.Below are my two dataset. In these dataset, there

[R] remove the missing value,NA

2008-02-08 Thread mohamed nur anisah
I have two sets of interval data.Below are my two dataset. In these dataset, there is a missing values in each of the data. I want to find the non-overlapping interval values. Here is my code: mysetdiff=function(x,y){ m=length(x) n=length(y) bx = logical(m) by = logical(n)

Re: [R] Subsetting a data.frame degenerates at one column?

2008-02-08 Thread jim holtman
try: input[,targets, drop=FALSE] see: ?[ for an explanation. On 2/8/08, Allen S. Rout [EMAIL PROTECTED] wrote: Greetings. At the moment, I'm applying R to some AIX 'nmon' output, trying to get a handle on some disk performance metrics. In case anyone's interested:

[R] R ver 2.0.1 NA in Probability Vector Error Messages

2008-02-08 Thread Delle Donne, Gabriella
Hello, I am currently operating R version 2.0.1. I am running an analysis that uses previously written fuctions that I load into R 2.0.1 via the file menu (file--load workspace). There are other colleagues on my team that are operating the same version of R, using the same input datafile, the

[R] Newbie on plotting

2008-02-08 Thread Joe Trubisz
Hi... I am issuing a: plot(x,y), where x is a factor. i expect a box-and-whisker plot and I do get it. The data is 'bucketed' into 10 buckets on the x-axis. When I process some data, I get data in buckets 1,7,8,9 and 10. Problem is when I plot it, it shows only those buckets on the x-axis. if I

Re: [R] FW: merge multiple csv files

2008-02-08 Thread jim holtman
Don't have your data, but something like this is close: # something like the following. read into a list for easier processing allFile - Sys.glob(sample*.csv) results - lapply(allFiles, function(.file){ # extract number from file name num - as.integer(sub(^.*?([[:digit:]]+).*, \\1,

Re: [R] Point pattern - Surface pattern statistical link

2008-02-08 Thread Dylan Beaudette
On Friday 08 February 2008, nelson.drew wrote: Hi, I am a graduate student at the University of Maine in forestry. I am studying spatial pattern analysis of tree regeneration. My study design is a contiguous grid in which regeneration is completely sampled, and hopefully analyzed using

Re: [R] correlation

2008-02-08 Thread Bernard Leemon
It is easy to worry too much about using numbers to represent order when using statistics like the correlation. this little example shows that the correlation is essentially a rank-order correlation itself: x - 1:20 y - x^2 cor(x,y) [1] 0.9713482 x and y are definitely not linearly related,

Re: [R] how to extract characters from a character string

2008-02-08 Thread Jorge Iván Vélez
Hi Weidong, It works, but I'm completely sure could be more efficient: # x is a string DELETE=function(x){ x=as.character(x) res=NULL; for(i in 1:nchar(x)) res=c(res,substr(x,i,i)) pos=which(res==?|res== ) # Detecting ? and res2=res[(pos[1]+1):(pos[2]-1)] k=length(res2) res3=NULL; for(i in

Re: [R] how to extract characters from a character string

2008-02-08 Thread Peter Dalgaard
Weidong Gu wrote: Hi, I ran into a problem when I complied a dataset with UTM coordinates. For calculating distances between sites, I need to reformat the coordinates from, for example, 32?35.421 N, to 35.421, i.e. I need to delete all digits before symbol ? and a space and N at the end

Re: [R] Loading Data to R

2008-02-08 Thread Wensui Liu
# READ DATA FROM XLS FILE # xls - read.xls(file = C:/projects/Rintro/Part01/export.xls, sheet = 3, type = data.frame, from = 1, colNames = TRUE) On Feb 8, 2008 3:49 PM, Christine Lynn [EMAIL PROTECTED] wrote: This is the most basic question ever...I haven't used R in a couple

Re: [R] how to extract characters from a character string

2008-02-08 Thread Gabor Grothendieck
Match the start (^) followed by anything (.*) to the question mark ([?]) or (|) a space ( ) followed by anything (.*) to the end ($) and replace each of those with nothing (). gsub(^.*[?]| .*$, , 32?35.421 N) On Feb 8, 2008 3:36 PM, Weidong Gu [EMAIL PROTECTED] wrote: Hi, I ran into a problem

[R] Point pattern - Surface pattern statistical link

2008-02-08 Thread nelson.drew
Hi, I am a graduate student at the University of Maine in forestry. I am studying spatial pattern analysis of tree regeneration. My study design is a contiguous grid in which regeneration is completely sampled, and hopefully analyzed using surface pattern techniques. I am also interested in

Re: [R] a kinder view of Type III SS

2008-02-08 Thread Johan Jackson
I feel out of my league responding to a discussion among such an august group of statisticians. But I think I can maybe provide some insight from someone who migrated from SPSS into R and learned R on my own. I must say that I found it quite confusing to understand why my ANOVA results in R were

Re: [R] Error propagation

2008-02-08 Thread Christian Ritz
Hi Steve, I think you need to use apply() as in the following tiny example: x - data.frame(response = c(-121,-131,-135)) apply(x, 1, function(response){rnorm(10, mean = response, sd = rnorm(10, mean = 9.454398, sd = 1.980136))}) Christian __

[R] FW: merge multiple csv files

2008-02-08 Thread Gator Connection
Dear list:I have a folder that contains more than 50 csv files labels sequencially like sample01.csv to sample50.csv. for each file the first 5 rows are descriptive of the data collected (useful but not needed in data merge). each file then start the data at row 6 and have 2 variables x

Re: [R] how to extract characters from a character string

2008-02-08 Thread jim holtman
This should do it for you: x [1] 32?35.421 N sub(^.*?([[:digit:].]+) N, \\1, x, perl=TRUE) [1] 35.421 On 2/8/08, Weidong Gu [EMAIL PROTECTED] wrote: Hi, I ran into a problem when I complied a dataset with UTM coordinates. For calculating distances between sites, I need to reformat the

Re: [R] Catching NaNs from pweibull()

2008-02-08 Thread Nakamura
Hello Ben, Ok this is going to sound very bizare, but the code now works. I struggled for a long time to see why it was returning NaN values. I'm sure the code is exactly the same. But anyway it now seems to be working (for the time being). Thanks for the input though. Regards, Rob -- View

Re: [R] cloud + legend

2008-02-08 Thread Deepayan Sarkar
On 2/8/08, Deepayan Sarkar [EMAIL PROTECTED] wrote: On 2/8/08, Neuer Arkadasch [EMAIL PROTECTED] wrote: Hello, Is it possible to add a legend to the 3d scatterplot cloud? Yes (the relevant arguments are described in ?xyplot). For example, Sorry, the example I meant to give was

[R] When I cbind the POSIXct gets lost

2008-02-08 Thread Ken Spriggs
I would like to create a new dataframe from the DateTime column of an existing dataframe and a numeric vector. When I do cbind(x[,1], y) the result is: [1,] 1199370600 12.500 [2,] 1199371200 69.375 [3,] 1199371800 23.750 where the first column you see used to look like: 2008-01-03

[R] Error propagation

2008-02-08 Thread VanWilgenburg,Steve [Sas]
Hello, I wish to examine the influence of error in variables on my analyses via error propagation. I have a data frame (x) as follows: id response 1-121 2-131 3-125 etc. I wish to propagate errors for each row in the data frame, where error is distributed around the value of

Re: [R] [R-SIG-Finance] where do I find stochastic volatilities models in R or Matlab?

2008-02-08 Thread Brian G. Peterson
Michael wrote: Okay I am ordering the book... Does anybody know any recent papers discussing about comparison about these SV estimation methods? I don't have any paper references handy. I know that Prof. Zivot has some working papers on volatility modeling on his website at the

[R] question_encoding

2008-02-08 Thread Jan Tuma
Hallo, I would like to ask you, for one question. When I export graph to .pdf and I need some czech font, I use a parameter encoding=ISOLatin2.enc for these special fonts. But exported text is bad. I try ISOLatin1 and MacRoman, but it is some one. I don't know, what Iam doing bad, because in

[R] Using cv.tree to assign cases to specific cv-groups

2008-02-08 Thread jshuter
Hello, I would like to use cv.tree to run a 10-fold cross-validation experiment on a tree object to help me choose a tree size. Many users seem to allow their cases to be assigned to CV groups randomly, but I have assigned each case to one of 10 cv groups, such that the data from each of

Re: [R] putting mean and sd on a histogram

2008-02-08 Thread Jorge Iván Vélez
Hi David, Try abline(v=c(m-stanD,m+stanD),col=2,lty=2) I hope this helps, Jorge On 2/8/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I would like to put the mean and + / - the standard deviation as lines on the x axis of a histogram. My attempts using the histogram function have

Re: [R] the union of several data frame rows

2008-02-08 Thread Scot W. McNary
Hi, Thanks to Henrique Dallazuanna, Erik Iverson, Mark Leeds, and J. Scott Olson for pointing me down the path of joy. I finally figured out a solution to the problem: Given the following list of partially overlapping test keys, a data frame called keys1: ID X1 X2 X3 X4 X5 X6

Re: [R] Bode plots in ggplot2

2008-02-08 Thread Tribo Laboy
Hi Hadley and Thiery Thanks for the responses. I worked through the code provided by Thiery and at the end I realized that the scales for the phase and the gain are the same, which in practice is not the case. Then I read Hadley's comment and worked with it a bit too. It is already quite late

[R] correlation

2008-02-08 Thread darteta001
Dear list I would like to compare two measurements of disease severity (M1 and M2), one of the is continuous (M1 ranging from 1 to 10) and the other is ordinal (M2 takes Low, Medium, high and very high). Do you think is ok to use cor() function to test whether the two agree, i.e correlate? I

Re: [R] When I cbind the POSIXct gets lost

2008-02-08 Thread Gabor Grothendieck
Use data.frame: tt - ISOdate(2000, 1:3, 1) cbind(tt, tt) tttt [1,] 946728000 946728000 [2,] 949406400 949406400 [3,] 951912000 951912000 data.frame(tt, tt) tttt.1 1 2000-01-01 12:00:00 2000-01-01 12:00:00 2 2000-02-01 12:00:00 2000-02-01

[R] Can I index a dataframe with a reference from/to a second dataframe?

2008-02-08 Thread Thompson, David (MNR)
Hello, I am unable to figure out how to code a new column in a data frame based on an existing column that matches a column in a reference data frame, in a relational-db fashion. I would like this to maintain a minimum set of reference tables that may be reused over several similar datasets.

Re: [R] When I cbind the POSIXct gets lost

2008-02-08 Thread Matthew Keller
Ken, not sure, but you might try data.frame(whatever1=x[,1],whatever2=y) this should maintain the classes of the vectors. I'm guessing that y and x are of different classes. From ?cbind: For the default method, a matrix combining the ... argument. The type of a matrix result determined from

Re: [R] cloud + legend

2008-02-08 Thread Deepayan Sarkar
On 2/8/08, Neuer Arkadasch [EMAIL PROTECTED] wrote: Hello, Is it possible to add a legend to the 3d scatterplot cloud? Yes (the relevant arguments are described in ?xyplot). For example, cloud(Sepal.Length ~ Petal.Length * Petal.Width | Species, data = iris, screen = list(x =

Re: [R] error propagation

2008-02-08 Thread Henrique Dallazuanna
Perhaps: sim - apply(x, 1, function(.x)rnorm(1000, .x[2], rnorm(1000,mean= 9.454398,sd=1.980136))) On 08/02/2008, Steven Van Wilgenburg [EMAIL PROTECTED] wrote: Hello, I wish to examine the influence of error in variables on my analyses via error propagation. I have a data frame (x) as

[R] Correction: Short Course: Statistical Learning and Data Mining

2008-02-08 Thread Trevor Hastie
Apologies, my last email announcing this course had the wrong dates. Here is the corrected header: Short course: Statistical Learning and Data Mining II: tools for tall and wide data Trevor Hastie and Robert Tibshirani, Stanford University Sheraton Hotel, Palo Alto, California,

Re: [R] Can I index a dataframe with a reference from/to a second dataframe?

2008-02-08 Thread jim holtman
try this: Bos$type - tree$Type[match(Bos$spp, tree$spp)] On Feb 8, 2008 3:17 PM, Thompson, David (MNR) [EMAIL PROTECTED] wrote: Hello, I am unable to figure out how to code a new column in a data frame based on an existing column that matches a column in a reference data frame, in a

Re: [R] R version of SAS Proc Varclus

2008-02-08 Thread Frank E Harrell Jr
Mary Black wrote: I am interested in finding an R version of SAS Proc Varclus. SAS's Proc Varclus implements an oblique cluster analysis based on principal components. How can I find out if R has a package that runs the same algorithm implemented in SAS Proc Varclus? Thank you, Mary

Re: [R] how to connect S-Plus to Matlab?

2008-02-08 Thread Spencer Graves
1. Have you tried a search at http://www.insightful.com/;? 2. Have you asked Insightful tech support and / or [EMAIL PROTECTED]? 3. Do you have S-PLUS 8? Insightful claims that with S-PLUS 8, open source analytics developed in R ... can be imported

[R] R version of SAS Proc Varclus

2008-02-08 Thread Mary Black
I am interested in finding an R version of SAS Proc Varclus. SAS's Proc Varclus implements an oblique cluster analysis based on principal components. How can I find out if R has a package that runs the same algorithm implemented in SAS Proc Varclus? Thank you, Mary Helen Black

[R] convertin a data frame column from character to numeric

2008-02-08 Thread joseph
I have a data.frame with all character columns, I would like to convert the last two columns into numeric. x[1:5, ] chrNstart end 1 chr1 71310034 71310064 2 chr14 23354088 23354118 3 chr14 71310034 71310064 4 chr15 37759058 37759088 5 chr22

Re: [R] Loading Data to R

2008-02-08 Thread Gabor Csardi
It is a good idea to start with RSiteSearch(Excel) G. On Fri, Feb 08, 2008 at 03:49:29PM -0500, Christine Lynn wrote: This is the most basic question ever...I haven't used R in a couple years since college so I forget and haven't been able to find what I'm looking for in any of the manuals.

Re: [R] learning S4

2008-02-08 Thread Martin Morgan
Hi Christophe -- [EMAIL PROTECTED] writes: Hi the list. I try to learn the S4 programming. I find the wiki and several doc. But I still have few questions... 1. To define 'representation', we can use two syntax : - representation=list(temps = 'numeric',traj = 'matrix') -

[R] Vector Size

2008-02-08 Thread Oscar A
Hello everybody!! I'm from Colombia (South America) and I'm new on R. I've been trying to generate all of the possible combinations for a 6 number combination with numbers that ranges from 1 to 53. I've used the following commands: datos-c(1:53)

Re: [R] Vector Size

2008-02-08 Thread jim holtman
How much memory do you have on your system? What type of system do you have? There is information in the archive about generating a sequence like this without having to have it all in memory at once. BTW, your matrix will require 1GB to store a single copy, so you will probably need at least

Re: [R] a kinder view of Type III SS

2008-02-08 Thread Bill.Venables
Hi Johan, I happen to agree with most of what you say - at least in principle... Let me begin by accentuating the positive, (as Bing may have said): * R help files could be much improved - agreed. No question. But let's look at your example. ?anova points out (in parenthesis, admittedly)

[R] shortest distance between two point pattern

2008-02-08 Thread Milton Cezar Ribeiro
Hi R-experts. I am working in a R-code where I have two datasets with x and y coordinates on each dataset. I intent to identify the shortest distance between this two datasets. I wrote a short code to do that. But when I join the datasets to compute the distances, the merge function run so

[R] Question

2008-02-08 Thread Alexander Ovodenko
I have recently started learning R. I converted a Stata datafile into an R image file, but I am unable to do anything with the data. For example, I am unable to calculate the mean of any variable or create a scatterplot of some of the data. I always get a message saying, Error in plot(rgnpc,

Re: [R] shortest distance between two point pattern

2008-02-08 Thread Gabor Grothendieck
Try using dist: ix - 1:nrow(df.1) m - as.matrix(dist(rbind(df.1, df.2)))[ix, -ix] which(min(m) == m, arr = TRUE) On Feb 8, 2008 11:01 PM, Milton Cezar Ribeiro [EMAIL PROTECTED] wrote: Hi R-experts. I am working in a R-code where I have two datasets with x and y coordinates on each

Re: [R] shortest distance between two point pattern

2008-02-08 Thread Bill.Venables
With points in R^2 it's often more transparent to do this directly in the complex plane. set.seed(20080209) # today x0 - rnorm(n = 500, mean = 1, sd = runif(1)) y0 - rnorm(n = 500, mean = 3, sd = runif(1)) x1 - rnorm(n = 700, mean = 8, sd = runif(1)) y1 - rnorm(n = 700, mean = 5, sd = runif(1))

Re: [R] question_encoding

2008-02-08 Thread Prof Brian Ripley
Please see the footer of this message -- we don't know what you did nor what was 'bad' about the result, so cannot even guess that what the issue is. The R-News article cited in ?pdf may help -- it has examples of using Polish and special fonts. On Fri, 8 Feb 2008, Jan Tuma wrote: Hallo, I