Re: [R] populating an array

2009-10-14 Thread Charles C. Berry
On Wed, 14 Oct 2009, tdm wrote: Hi, Can someone please give me a pointer as to how I can set values of an array? See ?Subscript and study the examples. What do you suppose array( 1:4, dim=c(2, 2) )[1][2] is? R is not C. HTH, Chuck Why does the code below not work

Re: [R] Cacheing computationally expensive getter methods for S4 objects

2009-10-14 Thread Steve Lianoglou
Hi, On Wed, Oct 14, 2009 at 4:23 PM, Martin Morgan wrote: > Steve Lianoglou wrote: >> Very clever, that looks to do the trick! > > I think though that all Square's then share the same environment > (created in the prototype) and hence area. > >> area(new("Square", length=50, width=100)) > Accessi

Re: [R] .Call() function

2009-10-14 Thread cls59
sdlywjl666 wrote: > > Dear all, > What is the usage of the ".Call()"? > What is the meaning of the follows: > > S=.Call("RS_fractal_spectral_density_function_direct",x,as.vector(taper.),as.logical(center),as.logical(recenter),TRUE,as.integer(npad),COPY=rep(FALSE,6),CLASSES=c(rep("matri

Re: [R] When modeling with negbin from the aod package...

2009-10-14 Thread Ben Bolker
alexander russell gmail.com> writes: > > Hi, > When modeling with negbin from the aod package, parameters for a given count > > y | lambda~Poisson(lambda) > > with lambda following a Gamma distribution Gamma(r, theta) > > are estimated. > The intercept is called phi. > Some other parameters m

[R] populating an array

2009-10-14 Thread tdm
Hi, Can someone please give me a pointer as to how I can set values of an array? Why does the code below not work? my_array <- array(dim=c(2,2)) my_array[][] = 0 my_array [,1] [,2] [1,]00 [2,]00 for(i in seq(1,2,by=1)){ for(j in seq(1,2,by=1)){ my_array[i][j] = 5 } }

[R] performing function on lists where each element is a data frame

2009-10-14 Thread ewaters
I have browsed the archive, and played around with a whole bunch of ways of approaching the problem, and I cannot get the answer that I want. I have a list with 2000 elements. Each element is a data frame with 2 columns. As an example, see element 1999 below. [[1999]] H N 60.54 26 10

[R] .Call() function

2009-10-14 Thread sdlywjl666
Dear all, What is the usage of the ".Call()"? What is the meaning of the follows: S=.Call("RS_fractal_spectral_density_function_direct",x,as.vector(taper.),as.logical(center),as.logical(recenter),TRUE,as.integer(npad),COPY=rep(FALSE,6),CLASSES=c(rep("matrix",2),rep("logical",3),"integer")

[R] When modeling with negbin from the aod package...

2009-10-14 Thread alexander russell
Hi, When modeling with negbin from the aod package, parameters for a given count y | lambda~Poisson(lambda) with lambda following a Gamma distribution Gamma(r, theta) are estimated. The intercept is called phi. Some other parameters may be also be estimated from factors in the data: the estimate

Re: [R] installing R on Ubuntu, can ignore warning messages?

2009-10-14 Thread David Winsemius
On Oct 14, 2009, at 11:01 PM, Robert Wilkins wrote: It does, thank you. I was able to understand enough of it to do the install successfully . Still trying to understand the later paragraphs such as install.package() and the r-cran-foo build dependencies. (the site you pointed me to is the same

Re: [R] installing R on Ubuntu, can ignore warning messages?

2009-10-14 Thread Ista Zahn
I should have also mentioned that you can search for r-cran in the synaptic package manage if you're more comfortable with that than the command line. This will also show you which packages are installed/available. -Ista On Wed, Oct 14, 2009 at 11:25 PM, Ista Zahn wrote: > On Wed, Oct 14, 2009 a

Re: [R] installing R on Ubuntu, can ignore warning messages?

2009-10-14 Thread Ista Zahn
On Wed, Oct 14, 2009 at 11:01 PM, Robert Wilkins wrote: > It does, thank you. I was able to understand enough of it to do the > install successfully . Still trying to understand the later paragraphs > such as install.package() and the r-cran-foo build dependencies. (the > site you pointed me to is

Re: [R] installing R on Ubuntu, can ignore warning messages?

2009-10-14 Thread Robert Wilkins
It does, thank you. I was able to understand enough of it to do the install successfully . Still trying to understand the later paragraphs such as install.package() and the r-cran-foo build dependencies. (the site you pointed me to is the same site i did a printout of yesterday to try to do an inst

Re: [R] installing R on Ubuntu, can ignore warning messages?

2009-10-14 Thread Ista Zahn
Hi, Instructions for authenticating the cran repositories are here: http://cran.r-project.org/bin/linux/ubuntu/ r-base comes with whatever the base R libraries are (stats, graphics etc.). I don't know if MASS in particular is in base because I don't use it directly. As far as I know it's safe to

[R] Announcement: New R book--50% off today only

2009-10-14 Thread Steven Hong
Hi all, This is Steven with Manning Publications. I wanted to announce the launch of a new R book: R in Action by Rob Kabacoff. Rob was recently interviewed for this piece on Teradata about the growth of R into new fields and the future of R. The book gives thorough coverage of the R envir

[R] Help with R and webserver

2009-10-14 Thread cvsrc
My goal is to provide data analysis statistics and graphs by taking input from a user from their browser. The data is on a SQL server, we are using an IIS 7.0 web server with ColdFusion on Windows. I want to do the statistics and graphs part using R. Can anyone suggest the best way to get coldF

[R] installing R on Ubuntu, can ignore warning messages?

2009-10-14 Thread robstdev
Installing R on Ubuntu 8.10, ( using sudo apt-get install r-base , and using one of the cran sites (cran.cnr.berkeley.edu)) the installation process says something about not having some gpg public key and "are you sure you want to download non-authenticated stuff [y/n]" (to which I answered yes).

[R] Can R do specific factor analysis?

2009-10-14 Thread Tiger Guo
Hello, Can R do factor analysis using eigenvalue greater than one to automatically determine the number of factors to extract? I am afraid that R cannot provide the function we want. But I can use R to write a function to do the specific factor analysis. Because the functions needed for developi

Re: [R] axis labels

2009-10-14 Thread jonas garcia
Problem solved! thanks J On Wed, Oct 14, 2009 at 12:31 AM, S Ellison wrote: > They probably look different because the y-axis distance is to the > bottom of the number and the x-axis to the top; character adjustment is > putting the actual locations in the 'same' place but with opposing > orien

Re: [R] Taking specific/timed differences in a zoo timeseries

2009-10-14 Thread Gabor Grothendieck
Suggest you use chron class rather than Date class since the format you indicate is the default format for chron. > library(zoo) > library(chron) > > set.seed(12345) > data <- round(runif(27)*10+runif(27)*5, 0) > dates <- chron(c("09/03/09", "09/04/09", "09/07/09", "09/09/09", + "09/10/09", "09/11

Re: [R] Time Dependent Cox Model

2009-10-14 Thread joris meys
On Wed, Oct 14, 2009 at 9:19 PM, quaildoc wrote: > > Some suggested that go into more detail on what I wanted to accomplish and > the rest of my code.  I want to accomplish exactly what Fox did in this > article( http://www.nabble.com/file/p25897307/appendix-cox-regression.pdf > appendix-cox-regre

Re: [R] packaging R

2009-10-14 Thread Duncan Murdoch
On 14/10/2009 6:35 PM, H Rao wrote: Hi, I am planning to use R as the backend in my application and VB as the front end. I want to be able to distribute it as a stand alone application and my users should not have to install R separately to use the application. I want to be able to integrate the

[R] packaging R

2009-10-14 Thread H Rao
Hi, I am planning to use R as the backend in my application and VB as the front end. I want to be able to distribute it as a stand alone application and my users should not have to install R separately to use the application. I want to be able to integrate the R interpreter into the application so

Re: [R] Extract data from tseries stl function

2009-10-14 Thread David Winsemius
On Oct 14, 2009, at 5:05 PM, nmo wrote: I have generated a table using the stl function from tseries. How? How can I extract (other than manual copy) Huh? data from a column (eg trend) First you look at the structure of the object. In my case, since you did not provide a worked ex

Re: [R] Cacheing computationally expensive getter methods for S4 objects

2009-10-14 Thread hadley wickham
Just a note: this technique is called memoisation. Hadley On Wed, Oct 14, 2009 at 3:42 PM, Benilton Carvalho wrote: > Thank you very much, Martin. :) > > b > > On Oct 14, 2009, at 5:23 PM, Martin Morgan wrote: > >> Steve Lianoglou wrote: >>> >>> Very clever, that looks to do the trick! >> >> I th

Re: [R] Beginning R help?

2009-10-14 Thread Peter Dalgaard
Katie Miller wrote: Hi all, I'm currently working through the "Beginner's Guide to R" (Zurr et al.) and I'm wondering about the first exercise in chapter 3: I imported the data from BirdFluCases.txt and executed the 'names' and 'str' functions as follows: Bird = read.table(file='C:\\rbook\\Bir

[R] Extract data from tseries stl function

2009-10-14 Thread nmo
I have generated a table using the stl function from tseries. How can I extract (other than manual copy) data from a column (eg trend) any help very much appreciated -- View this message in context: http://www.nabble.com/Extract-data-from-tseries-stl-function-tp25898987p25898987.html Sent from

[R] ltm package error for grm (IRT)

2009-10-14 Thread ben kelcey
Using the grm function (graded response IRT model) in the ltm package I receive the following error: Error: subscript out of bounds for several scales I'd like to examine. Here's a small example that if run a few times will likley produce the error at least once ch<-array(round(runif(50,1,5)),c

[R] Removing Embedded Null characters from text/html

2009-10-14 Thread David Young
Hi, I'm trying to download some data from the web and am running into problems with 'embedded null' characters. These seem to indicate to R that it should stop processing the page so I'd like to remove them. I've been looking around and can't seem to identify exactly what the character is and con

[R] Beginning R help?

2009-10-14 Thread Katie Miller
Hi all, I'm currently working through the "Beginner's Guide to R" (Zurr et al.) and I'm wondering about the first exercise in chapter 3: I imported the data from BirdFluCases.txt and executed the 'names' and 'str' functions as follows: Bird = read.table(file='C:\\rbook\\BirdFluCases2.txt', heade

[R] help with loops

2009-10-14 Thread Marcio Resende
Hi guys, my doubt is quite simple, I´ll try to explain: test = matrix(0, nrow = 783, ncol = 12) for (x in 1:9){ for (y in 1:12){ ### In the original script for each y its generated a vector (87x1) ### 87 times 9(x) = 783 (equals the number of rows I want to fill in the "test" matrix } } W

Re: [R] Netalg

2009-10-14 Thread David Winsemius
I do not think it is in the CRAN (or BioConductor) repository. (... not everything is.) http://lmgtfy.com/?q=%22r-project%22+netalg So ... http://www.meduniwien.ac.at/user/georg.dorffner/netalg.html On Oct 14, 2009, at 4:39 PM, Andre Barbosa Oliveira wrote: Hi, I would like to use the p

Re: [R] Cacheing computationally expensive getter methods for S4 objects

2009-10-14 Thread Benilton Carvalho
Thank you very much, Martin. :) b On Oct 14, 2009, at 5:23 PM, Martin Morgan wrote: Steve Lianoglou wrote: Very clever, that looks to do the trick! I think though that all Square's then share the same environment (created in the prototype) and hence area. area(new("Square", length=50, wid

[R] Plot overview xy plots from data frame?

2009-10-14 Thread Joel Fürstenberg-Hägg
Hi, I've got a data frame (556 rows and 36 columns) from which I need to create several xy plots and print to pdf, in order to detect outliers and trends in the data. 16 of the columns contains numerical values, and I would like to create graphs for all combinations. It can be done manually, b

[R] Netalg

2009-10-14 Thread Andre Barbosa Oliveira
Hi, I would like to use the package netalg made for Stefan Neubauer and Georg Dorffner. In this package there are functions similars with netlab, a package for Matlab. I searched for this package and didn't found it. This package had his name changed??? How I can download this package?? Be

Re: [R] Cacheing computationally expensive getter methods for S4 objects

2009-10-14 Thread Martin Morgan
Steve Lianoglou wrote: > Very clever, that looks to do the trick! I think though that all Square's then share the same environment (created in the prototype) and hence area. > area(new("Square", length=50, width=100)) Accessing [1] 50 Which is quite efficient at doing the calculation, but maybe

Re: [R] change order of bar plot categories

2009-10-14 Thread Felipe Carrillo
Is this what you want? temp<-c(rep("Low",2),rep("Medium",2),rep("High",2)) light<-rep(c("Dark","light"),3) avg<-dat.avg2[,3] # se<-dat.avg2[,4] dat.avg.temp<-data.frame(cbind(avg,se)) dat.avg.temp<-data.frame(cbind(temp,light,dat.avg.temp)) dat.plot<-qplot(light,avg, fill=factor(temp),data=dat.avg

Re: [R] R neophyte question.

2009-10-14 Thread Ben Bolker
Katie Miller gmail.com> writes: > > Hi all, > > I'm currently working through the "Beginner's Guide to R" (Zurr et al.) and > I'm wondering about the first exercise in chapter 3: > [snip] > I don't know how to obtain the answers for 'Which country has had the most > cases?', 'Which country

Re: [R] Cacheing computationally expensive getter methods for S4 objects

2009-10-14 Thread Steve Lianoglou
Very clever, that looks to do the trick! Thanks, -steve On Oct 14, 2009, at 2:57 PM, Benilton Carvalho wrote: If you change 'area' to an environment, you may be able to get something close to what you want. For example: setClass("Square", representation( len

[R] Clustering for Ordinal data

2009-10-14 Thread Paul Evans
Hi, I just wanted to check whether there is a clustering package available for ordinal data. My data looks something like: #1 #2 #3 #4. A B C D... D B C A... D C A A... where each column represents a sample, and each row some ordinal values. I would like to cluster such that similar samples

[R] R neophyte question.

2009-10-14 Thread Katie Miller
Hi all, I'm currently working through the "Beginner's Guide to R" (Zurr et al.) and I'm wondering about the first exercise in chapter 3: I imported the data from BirdFluCases.txt and executed the 'names' and 'str' functions as follows: Bird = read.table(file='C:\\rbook\\BirdFluCases2.txt', heade

Re: [R] Scatter plot using icons (from a gif) instaed of points - is it possible ?

2009-10-14 Thread Greg Snow
The help page for the subplot function in the TeachingDemos package shows an example of doing what you ask. The my.symbols function in the same package may work better (depending on what exactly you want). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s.

Re: [R] pairs

2009-10-14 Thread Greg Snow
Looking at the question again, I don't think pairs2 is the answer. I think it will be easier to do this by hand than to get pairs to do it for you (though you could make your own function as a modification of pairs). Does this do what you want? xx <- matrix(scan(), ncol=3, byrow=TRUE) 0.30 0.4

Re: [R] Time Dependent Cox Model

2009-10-14 Thread quaildoc
Some suggested that go into more detail on what I wanted to accomplish and the rest of my code. I want to accomplish exactly what Fox did in this article( http://www.nabble.com/file/p25897307/appendix-cox-regression.pdf appendix-cox-regression.pdf ) (starting with page 7), except using "habitat"

[R] different L2 regularization behavior between lrm, glmnet, and penalized?

2009-10-14 Thread Robert V (Bob) Sasseen
The following R code using different packages gives the same results for a simple logistic regression without regularization, but different results with regularization. This may just be a matter of different scaling of the regularization parameters, but if anyone familiar with these pa

Re: [R] Cacheing computationally expensive getter methods for S4 objects

2009-10-14 Thread Benilton Carvalho
If you change 'area' to an environment, you may be able to get something close to what you want. For example: setClass("Square", representation( length='numeric', width='numeric', area='environment'

Re: [R] Scatter plot using icons (from a gif) instaed of points - is it possible ?

2009-10-14 Thread baptiste auguie
Hi, You'll probably find that there are two parts to your query: 1- import a bitmap into R, for this I'd suggest the wiki page, http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:display-images 2- place the image (now some sort of matrix of colour points) at different locations on a

Re: [R] RPostgreSQL: unable to load shared library

2009-10-14 Thread Joe Conway
Fanfaar wrote: > I'm using R 2.9.2 on a WinXP system, and I installed the RPostgreSQL > Error: package/namespace load failed for 'RPostgreSQL' > I don't suppose DLL should be directly in my PATH, right? > Thanks for any hints, I don't use Windows, much, but if I recall correctly the DLLs do nee

Re: [R] puzzle using gsub (and encodings maybe)

2009-10-14 Thread Duncan Murdoch
On 10/14/2009 2:29 PM, Adrian Dragulescu wrote: Thank you. If I use gsub(" \xad", "-", x) [1] "NEW YORK-NEW ENGLAND" I get what I want. Right, that's simpler than what I suggested. Duncan Murdoch Adrian sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=En

Re: [R] RPostgreSQL: unable to load shared library

2009-10-14 Thread Prof Brian Ripley
On Wed, 14 Oct 2009, Fanfaar wrote: Hello list, I'm using R 2.9.2 on a WinXP system, and I installed the RPostgreSQL library using the package installer. When trying to load it, I get the following error: library('RPostgreSQL') Error in inDL(x, as.logical(local), as.logical(now), ...) : una

Re: [R] puzzle using gsub (and encodings maybe)

2009-10-14 Thread Adrian Dragulescu
Thank you. If I use gsub(" \xad", "-", x) [1] "NEW YORK-NEW ENGLAND" I get what I want. Adrian sessionInfo() R version 2.9.2 (2009-08-24) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=

[R] Cacheing computationally expensive getter methods for S4 objects

2009-10-14 Thread Steve Lianoglou
Hi, I was wondering if there was a way to store the results of a computationally expensive "getter" call on an S4 object, so that it is only calculated once for each object. Trivial example: let's say I want to cache the "expensive" area calculation of a square object. setClass("Square"

Re: [R] puzzle using gsub (and encodings maybe)

2009-10-14 Thread Duncan Murdoch
On 10/14/2009 2:16 PM, Adrian Dragulescu wrote: I get the same results (not working) using R 2.9.2 and R.10.0 beta. But it is working: the dash is an "ad" in x, not a "2d". You need to ask to substitute for the "ad" character, e.g. by spacelongdash <- rawToChar(as.raw(c(0x20, 0xad))) gsub(

Re: [R] puzzle using gsub (and encodings maybe)

2009-10-14 Thread Adrian Dragulescu
I get the same results (not working) using R 2.9.2 and R.10.0 beta. Thank you for looking at this. On Wed, 14 Oct 2009, Duncan Murdoch wrote: On 10/14/2009 1:41 PM, Adrian Dragulescu wrote: charToRaw(x) [1] 4e 45 57 20 59 4f 52 4b 20 ad 4e 45 57 20 45 4e 47 4c 41 4e 44 charToRaw(y)

Re: [R] puzzle using gsub (and encodings maybe)

2009-10-14 Thread Prof Brian Ripley
On Wed, 14 Oct 2009, Adrian Dragulescu wrote: charToRaw(x) [1] 4e 45 57 20 59 4f 52 4b 20 ad 4e 45 57 20 45 4e 47 4c 41 4e 44 charToRaw(y) [1] 4e 45 57 20 59 4f 52 4b 20 2d 4e 45 57 20 45 4e 47 4c 41 4e 44 So they are different. We really do need the 'at a minimum' information we asked

Re: [R] Handle lot of variables - Regression

2009-10-14 Thread Frank E Harrell Jr
anna0102 wrote: Hey, I've got a data set (e.g. named Data) which contains a lot of variables, for example: s1, s2, ..., s50 My first question is: It is possible to do this: Data$s1 But is it also possible to do something like this: Data$s1:s50 (I've tried a lot of versions of those without a re

[R] Scatter plot using icons (from a gif) instaed of points - is it possible ?

2009-10-14 Thread Tal Galili
Hello dear R-help group. I wish to plot a scatter plot using icons (or images) instead of points. Is it possible? and how so? Thanks, Tal -- My contact information: Tal Galili E-mail: tal.gal...@gmail.com Phone number: 972-52-7275845 FaceBook: T

Re: [R] puzzle using gsub (and encodings maybe)

2009-10-14 Thread Duncan Murdoch
On 10/14/2009 1:41 PM, Adrian Dragulescu wrote: charToRaw(x) [1] 4e 45 57 20 59 4f 52 4b 20 ad 4e 45 57 20 45 4e 47 4c 41 4e 44 charToRaw(y) [1] 4e 45 57 20 59 4f 52 4b 20 2d 4e 45 57 20 45 4e 47 4c 41 4e 44 So they are different. Adrian I use R 2.8.1 on WinXP But that's ancient.

Re: [R] puzzle using gsub (and encodings maybe)

2009-10-14 Thread Adrian Dragulescu
charToRaw(x) [1] 4e 45 57 20 59 4f 52 4b 20 ad 4e 45 57 20 45 4e 47 4c 41 4e 44 charToRaw(y) [1] 4e 45 57 20 59 4f 52 4b 20 2d 4e 45 57 20 45 4e 47 4c 41 4e 44 So they are different. Adrian I use R 2.8.1 on WinXP On Wed, 14 Oct 2009, Duncan Murdoch wrote: On 10/14/2009 1:30 PM, A

Re: [R] puzzle using gsub (and encodings maybe)

2009-10-14 Thread Duncan Murdoch
On 10/14/2009 1:30 PM, Adrian Dragulescu wrote: Hello, Below is some output that shows my issue. I have a variable x that I read from a file (more on this below) x [1] "NEW YORK NEW ENGLAND" gsub(" -", "-", x)# this does not work! [1] "NEW YORK NEW ENGLAND" It looks as though

[R] puzzle using gsub (and encodings maybe)

2009-10-14 Thread Adrian Dragulescu
Hello, Below is some output that shows my issue. I have a variable x that I read from a file (more on this below) x [1] "NEW YORK NEW ENGLAND" gsub(" -", "-", x)# this does not work! [1] "NEW YORK NEW ENGLAND" Encoding(x) # is x in a special encoding? no [1]

[R] RPostgreSQL: unable to load shared library

2009-10-14 Thread Fanfaar
Hello list, I'm using R 2.9.2 on a WinXP system, and I installed the RPostgreSQL library using the package installer. When trying to load it, I get the following error: > library('RPostgreSQL') Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared library 'C:/PROGRA~

Re: [R] Getting indeices of intersecting elements.

2009-10-14 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Praveen Surendran > Sent: Wednesday, October 14, 2009 9:15 AM > To: r-help@r-project.org > Subject: [R] Getting indeices of intersecting elements. > > Hi, > > Is there a command

[R] Large data sets with high dimensional fixed effects

2009-10-14 Thread dcervone
Hi, I have a data set that consists of about 2 million observations and several high dimensional fixed effects (2 factors at around 1000 levels each, and others with a few hundred levels). I'm looking to run linear and logit regressions. I've tried packages such as filehash and biglm to store som

Re: [R] SPSS long variable names

2009-10-14 Thread Orvalho Augusto
Ok. I will try that then. Caveman On Wed, Oct 14, 2009 at 6:53 PM, joris meys wrote: > You could read in the sps file in R with readLines() for example, and > then use the tools for regular expression and substring to find the > label statements. Then you can just use R to add the labels to it

Re: [R] pairs

2009-10-14 Thread Greg Snow
Does the pairs2 function in the TeachingDemos package do what you want? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On

[R] "Error: testing 'stats' failed" - R 2.9.2 on Linux

2009-10-14 Thread John Murdie
I've just built R 2.9.2 from source on Slackware Linux 13.0 - 32-bit (will try 64-bit also next) - and seen: > Collecting examples for package 'stats' > Running examples in package 'stats' > Error: testing 'stats' failed > Execution halted > make[3]: *** [test-Examples-Base] Error 1 Looking at R-

Re: [R] Tunnelling X for R graphics

2009-10-14 Thread Santosh
In an ssh client, under connections section, there is an option for tunneling. Please ensure that the tunneling options are turned on.. and if applicable, incoming/outgoing tunnels, listen/destination ports, etc. are set. Thanks, Santosh On Tue, Feb 3, 2009 at 2:03 PM, Adam D. I. Kramer wrote: >

Re: [R] Survival and nonparametric

2009-10-14 Thread David Winsemius
On Oct 14, 2009, at 12:47 PM, David Winsemius wrote: http://finzi.psych.upenn.edu/views/Survival.html # lots of 404 link errors The finzi.psych server does something weird to the task view pages, so you would get greater "linkability" with the actual CRAN version: http://cran.r-project.

Re: [R] SPSS long variable names

2009-10-14 Thread joris meys
You could read in the sps file in R with readLines() for example, and then use the tools for regular expression and substring to find the label statements. Then you can just use R to add the labels to it, without having to pass through PSPP. So you could actually just create an R script that takes

Re: [R] Survival and nonparametric

2009-10-14 Thread David Winsemius
http://finzi.psych.upenn.edu/views/Survival.html Kalbfleisch & Prentice "The Statistical Analysis of Failure Time Data" Therneau & Grambsch "Modeling Survival Data" Harrell "Regression Modeling Strategies" On Oct 14, 2009, at 12:35 PM, Ashta wrote: Hi all, Has any body the exprience to icl

Re: [R] currency conversion function?

2009-10-14 Thread Liviu Andronic
Hello On 10/14/09, Henrique Dallazuanna wrote: > foo('BRL', 'USD', '2009-10-14') > Nice function, thank you. Two issues, though: - it seems to provide reverse output. Example: ## how many dollars do you get "from" one euro? > foo('EUR', 'USD', '2009-10-14') [1] 0.67544 ## however, the equivalent

Re: [R] Getting indeices of intersecting elements.

2009-10-14 Thread David Winsemius
On Oct 14, 2009, at 12:15 PM, Praveen Surendran wrote: Hi, Is there a command to get the indices of intersecting elements of two vectors as intersect() will give the elements and not its indices. ?which samp1 <- sample(seq(3,198, by=3), 20); samp2 <- sample(seq(3,198, by=3), 20) in

Re: [R] plot discriminant analysis

2009-10-14 Thread David Winsemius
On Oct 14, 2009, at 12:24 PM, Alejo C.S. wrote: Hi Alain, thanks for the fast response. I've the same results with iris data, but when I use my data (mentioned in the first message), You are apparently under the false impression that the data made it through the listserv. Read the Posting

[R] Survival and nonparametric

2009-10-14 Thread Ashta
Hi all, Has any body the exprience to iclude a nonparametric component into the survival analysis using R package? *Can someone recommend *me * some ** references? * Thanks a lot Ashta [[alternative HTML version deleted]] __ R-help@r-proje

Re: [R] Time Dependent Cox Model

2009-10-14 Thread joris meys
Well, it might be wise to elaborate a bit more about the variables and what exactly you want e.g. death-time to be. I'd interprete it as time of death, but the fact that it is 0/1, means it is a logical (?) binary variable of some sort. Please ask your question in such a way that somebody who doe

Re: [R] plot discriminant analysis

2009-10-14 Thread Alejo C.S.
Hi Alain, thanks for the fast response. I've the same results with iris data, but when I use my data (mentioned in the first message), I have different results. Regards, Alejo 2009/10/14 Alain Guillet > Hi, > > I did it with > > Iris <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]), Sp

[R] Getting indeices of intersecting elements.

2009-10-14 Thread Praveen Surendran
Hi, Is there a command to get the indices of intersecting elements of two vectors as intersect() will give the elements and not its indices. Thanks in advance. Praveen Surendran School of Medicine and Medical Sciences University College Dublin Belfield, Dublin 4 Ireland.

[R] Problem with NLSstClosestX; and suggested fix

2009-10-14 Thread Keith Jewell
Problem is demonstrated with this code, intended to find the approximate 'x' at which the 'y' is midway between the left and right asymptotes. This particular data set returns NA, which is a bit silly! -- sXY <- structure(list(x = c(0, 24, 27, 48, 51, 72, 75, 96, 99), y = c(4.98227,

Re: [R] SPSS long variable names

2009-10-14 Thread Orvalho Augusto
Hi The .dat file is a tab delimited file with the long variables names on it. The .sps file has the instructions to read the .dat and place all the variable and value labels. The ideia of reading the dat directely is good but I need the labels placed. Yes I could read the dat file and parese myse

Re: [R] post-hoc test with kruskal.test()

2009-10-14 Thread Thomas Lumley
On Wed, 14 Oct 2009, Meyners, Michael, LAUSANNE, AppliedMathematics wrote: Robert, What do you mean by "not symmetric"? If you mean unbalanced in terms of sample size, that's not a problem if you choose the right specifications for wilcox.test. The Kruskal-Wallis-Test is a generalization of t

Re: [R] Taking specific/timed differences in a zoo timeseries

2009-10-14 Thread Sergey Goriatchev
Dear Gabor, Thank you very much for your help! I'm now using your suggestion with my data. May I ask a stupid question? The output's index now has format "2009-10-14". How can I transform it back into original "10/14/09" and use this in a zoo object? Regards, Sergey On Wed, Oct 14, 2009 at 17:0

Re: [R] Creating a list of empty lists

2009-10-14 Thread Magnus Torfason
On 10/13/2009 10:06 AM, Henrique Dallazuanna wrote: Try this: replicate(3, list()) Thanks! I now have three ways to achieve my goal: 1: rep(list(list()), 3) 2: replicate(3, list()) 3: Due to the way R recycles arguments, I found that it is enough to have construct a list(list()), and then

Re: [R] Time Dependent Cox Model

2009-10-14 Thread quaildoc
Does anyone have suggestions? Thanks! quaildoc wrote: > > I am having trouble formatting some survival data to use in a time > dependent cox model. My time dep. variable is habitat and I have it > recorded for every day (with some NAs). I think it is working properly > except for calculating th

Re: [R] SPSS long variable names

2009-10-14 Thread joris meys
On Wed, Oct 14, 2009 at 2:45 PM, Robert Baer wrote: >> The problem is the limit of 8 characters long on variable >> names. > > And again, my answer is that one approach would be to map SHORT names to > long variable LABELS.  This was a common use of labels before variable names > supporte

Re: [R] axis label

2009-10-14 Thread Gabor Grothendieck
Try this: plot(0, main = ~ g(sigma * "|" * alpha)) On Wed, Oct 14, 2009 at 11:12 AM, maram salem wrote: > Hi all, > I want the y-axis label to be ( in symbols) > g(sigma given alpha) > where given is the conditional sign. > I've tried > ylab=expression(g(sigma|alpha))) > but it gave me > g(|(si

Re: [R] axis label

2009-10-14 Thread Jorge Ivan Velez
Hi Maram, How about this? plot(1, ylab = expression(sigma*"|"*alpha)) HTH, Jorge On Wed, Oct 14, 2009 at 11:12 AM, maram salem <> wrote: > Hi all, > I want the y-axis label to be ( in symbols) > g(sigma given alpha) > where given is the conditional sign. > I've tried > ylab=expression(g(sigma|a

[R] axis label

2009-10-14 Thread maram salem
Hi all, I want the y-axis label to be ( in symbols) g(sigma given alpha) where given is the conditional sign. I've tried ylab=expression(g(sigma|alpha))) but it gave me g(|(sigma,alpha)) where the sigma and alpha are in greek but the conditional sign is misplaced (before the bracket) Any help woul

Re: [R] Selecting initial numerals

2009-10-14 Thread joris meys
Josh, One way would be to convert the numeric vector to a character and use the function substr(). Following code returns a numeric vector with the 2 first digits of every element. naics=c(238321, 624410, 484121 ,238911, 81, 531110, 621399,541613,524210 ,236115 ,811121 ,236115 ,236115 ,621610

Re: [R] metaMDS NMDS: use of alternative distances?

2009-10-14 Thread Gavin Simpson
On Wed, 2009-10-14 at 16:57 +0200, Kim Vanselow wrote: > Dear r-helpers! > How can I integrate other distances (in the form of a dist object) > into function metaMDS? The problem: metaMDS needs the original > data.frame for the calculation and only the default distances of > function vegdist are al

Re: [R] Taking specific/timed differences in a zoo timeseries

2009-10-14 Thread Gabor Grothendieck
Try this: library(zoo) # temp <- ... from post asking question # create a day sequence, dt, with no missing days # and create a 0 width series with those times. # merge that with original series giving original # series plus a bunch of times having NA values. # Use na.locf to fill in those values

Re: [R] Strange characters that block import

2009-10-14 Thread Prof Brian Ripley
On Wed, 14 Oct 2009, Duncan Murdoch wrote: On 10/14/2009 8:25 AM, arnaud Mosnier wrote: Dear useRs, I try to import a text file that contain some strange characters coming from the misinterpretation of foreign language characters by another software (see below).

[R] metaMDS NMDS: use of alternative distances?

2009-10-14 Thread Kim Vanselow
Dear r-helpers! How can I integrate other distances (in the form of a dist object) into function metaMDS? The problem: metaMDS needs the original data.frame for the calculation and only the default distances of function vegdist are allowed. Any suggestions are greatly appreciated! Thank you, Kim

Re: [R] Linear Regression Question

2009-10-14 Thread Peter Ehlers
Alexandre, Let me add two small points to Ted's exposition: 1. you can use the extractor function coefficients(), or just coef() on the summary: coef(summary(regression)) which will also give you the matrix of estimates, etc. 2. You will find that using the function str() often is

[R] Taking specific/timed differences in a zoo timeseries

2009-10-14 Thread Sergey Goriatchev
Hello everyone. I have a specific problem that I have difficulties to solve. Assume I have a zoo object: set.seed(12345) data <- round(runif(27)*10+runif(27)*5, 0) dates <- as.Date(c("09/03/09", "09/04/09", "09/07/09", "09/09/09", "09/10/09", "09/11/09", "09/14/09", "09/16/09", "09/17/09", "09/18

Re: [R] RCMD Rdconv debugging output

2009-10-14 Thread Duncan Murdoch
On 10/14/2009 8:42 AM, Erich Neuwirth wrote: Thanks Duncan, this solved my problem. Here is another thingy I noticed \title{RExcel - Using \R from within Excel} produces RExcel - Using list() from within Excel So the \R macro cannot be used in titles. Is this intentional? Yes, and it is docume

Re: [R] Strange characters that block import

2009-10-14 Thread Duncan Murdoch
On 10/14/2009 8:25 AM, arnaud Mosnier wrote: Dear useRs, I try to import a text file that contain some strange characters coming from the misinterpretation of foreign language characters by another software (see below). Here is an example of text with a

Re: [R] Handle lot of variables - Regression

2009-10-14 Thread Dieter Menne
anna0102 wrote: > > I've got a data set (e.g. named Data) which contains a lot of variables, > for example: s1, s2, ..., s50 > > My first question is: > It is possible to do this: Data$s1 > But is it also possible to do something like this: Data$s1:s50 (I've tried > a lot of versions of those

Re: [R] problem when resizing graphics devices

2009-10-14 Thread Erik Iverson
Can you give us a reproducible example of R commands that cause these messages on your system? Like by creating simulated data.frames, opening several devices, etc? > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of Lucie Buch

[R] R version of MATLAB symbolic toolbox (variable substitution)

2009-10-14 Thread Jennifer Young
I'm translating some MATLAB code into R and have not found a simple equivalent of the function R = subs(S,old,new). I have, for example, a matrix such as this mx<- function(){ matrix( c(0, f1, f2, s1, 0, 0, 0, s2, 0), 3,3, byrow=T) } and a matrix of data dat<-matrix(c(1

[R] problem when resizing graphics devices

2009-10-14 Thread Lucie Buchi
Dear R users, When I try to resize a graphics device in R, I often get this warning message (mostly when I already have several other graphics devices open) : "Not enough memory to modify the size. Alpha blending is desactivated" (translation from the french message: "Mémoire insuffisante pour

  1   2   >