Re: [R] shorten str() output for long list

2009-12-04 Thread Martin Maechler
DW == David Winsemius dwinsem...@comcast.net on Fri, 4 Dec 2009 01:18:56 -0500 writes: DW On Dec 3, 2009, at 10:11 PM, Peng Yu wrote: x=split(1:1000,1:1000) str(x) Although str() can suppress long output for vectors, but it can not suppress long output for

Re: [R] R igraph clusters component

2009-12-04 Thread Gábor Csárdi
Hi, On Fri, Dec 4, 2009 at 3:12 AM, Gaurav Kumar gau...@gauravkumar.org wrote: Hi R-users, I'm using igraph for an undirected graph. i used clusters() igraph function to know the component size(subgraphs) as shown bellow: c -clusters(g) # component sizes size - sort(c$csize,

Re: [R] Formatting of numbers on y axis

2009-12-04 Thread Jim Lemon
On 12/04/2009 03:16 AM, Wells Oliver wrote: Hello all. I have the following: plot(salaries$yearID, salaries$salary, type='n', xaxt='n', xlab='', yaxt='n', ylab='') axis(1, at=unique(salaries$yearID), labels=unique(salaries$yearID), lwd=.25, tck=-0.05) axis(2, axTicks(2), format(axTicks(2),

Re: [R] Data Manipulation Question

2009-12-04 Thread Barry Rowlingson
On Thu, Dec 3, 2009 at 9:52 PM, John Filben johnfil...@yahoo.com wrote: Can R support data manipulation programming that is available in the SAS datastep?  Specifically, can R support the following: -  Read multiple dataset one record at a time and compare values from each; then base

[R] How to draw a big heatmap?

2009-12-04 Thread Ning Ma
Hi everyone. How can I draw a big heatmaps? png(foo.png,1,1) heatmap(x) dev.off() where x is a big matrix, say 200*200. The code above generates a small heatmap in the middle of the png file and leaves big margins. I expect it to take up more space so that the labels are not

[R] Solve linear program without objective function

2009-12-04 Thread Andreas Wittmann
Dear R-users, i try to solve to following linear programm in R 0 * x_1 + 2/3 * x_2 + 1/3 * x_3 + 1/3 * x_4 = 0.3 x_1 + x_2 + x_3 + x_4 = 1 x_1, x_2, x_3, x_4 0, x_1, x_2, x_3, x_4 1 as you can see i have no objective function here besides that i use the following code. library(lpSolve)

[R] Combinations and joint probabilities

2009-12-04 Thread Amelia Livington
  Dear R helpers   Suppose I have two sets of ranges (interest rates) as   Range 1 : (7 – 7.50, 7.50 – 8.50, 8.50 – 10.00) with respective probabilities 0.42, 0.22 and 0.36.     Range II : (11-12, 12-14, 14-21) with respective probabilities 0.14, 0.56 and 0.30 respectively.     My

[R] Logarithm interpolation

2009-12-04 Thread giuseppef...@libero.it
Dear all, i want to know if in R exist a method that give a logarithm interpolation of a two columns of dates. I try to do the lm of logarithm of the dates: a-lm(log(vettore)~log(as.numeric(pippo2[3,]))) but this is a linear correlation and not that i want. thanks giuseppe

[R] Confidence Intervals for proportion according to Blyth, Still Casella

2009-12-04 Thread Öhagen Patrik
Are the confidence Intervals for proportion according to Blyth,Still Casella implemented in R? Thank you in advance! Cheers, Patrik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Dividing a pixel image into factors - (cut.im(), cut.default())

2009-12-04 Thread Gough Lauren
Hi, I have a numeric pixel image which I would like to divide into factors for analysis in Spatstat. I have found that I can use cut.im() function to divide the range of pixel values into a series of equal length intervals (e.g. if my pixels values range from 0 to 60, cut.im(X.im,breaks=2)

[R] pseudoreplication - LME

2009-12-04 Thread Rita
Need some help please I am trying to use this model because I have temporal replication in my data results-read.table(file=file.choose(),header=T) attach(results) names(results) results-na.omit(results) library(nlme) library(lattice) results-groupedData(weight~date|group,outer=~diet,results)

[R] matrix^(-1/2)

2009-12-04 Thread Greg Dropkin
re [R] matrix^(-1/2) re the discussion in November on this thread. I don't know about expm but the problem must be equivalent to solve(B^(1/2)) and a solution will exist iff B is invertible and has a square root A with A%*%A = B. For 2x2 matrices necessary and sufficient conditions for B to have

Re: [R] Lattice : Help with changing the labels of x-axis in respective panels

2009-12-04 Thread Deepayan Sarkar
On Fri, Dec 4, 2009 at 11:53 AM, Sunny Srivastava research.b...@gmail.com wrote: Dear R-Helpers, I am not very experienced in using lattice and I am still in the learning stage I have a data set which looks like this: (I have deleted a few lines in order to save space)   Chromosome marker

Re: [R] R will not load

2009-12-04 Thread Petr PIKAL
Hi It sometimes occur if I work on different computers. When I save work on one and try to start with another it has to have installed all packages used in a saved session. So I need to add a package(s) yet uninstalled and than the session is started. Petr Pikal petr.pi...@precheza.cz

[R] writing 'output.csv' file

2009-12-04 Thread Maithili Shiva
Dear R helpers   Suppose   M - c(1:10)  #  length(M) = 10 N - c(25:50) #  length(N) = 26    I wish to have an outut file giving M and N. So I have tried   write.csv(data.frame(M, N), 'output.csv', row.names = FALSE)   but I get the following error message   Error in data.frame(M, N) :  

Re: [R] writing 'output.csv' file

2009-12-04 Thread Chuck Cleland
On 12/4/2009 5:12 AM, Maithili Shiva wrote: Dear R helpers Suppose M - c(1:10) # length(M) = 10 N - c(25:50) # length(N) = 26 I wish to have an outut file giving M and N. So I have tried write.csv(data.frame(M, N), 'output.csv', row.names = FALSE) but I get the

Re: [R] GLM Question

2009-12-04 Thread Knut Krueger
Peter Flom schrieb: What do you mean by better? Dear Peter Thank you for your kind respons as well. You are right, we are in constant debate whether it makes sense to remove variables (no matter whether significant or not) from a total dataset which in itself has a certain meaning and may not

Re: [R] Get back to the console with ssh access

2009-12-04 Thread Jakson A. Aquino
On Fri, Dec 04, 2009 at 02:23:18AM +0100, Timothée Poisot wrote: I am currently learning how to work with a new shared computer (a Mac pro) in our lab, that is dedicated to execute R code for large simulations (over a few days). We have a VNC option to remote control the computer, with a

[R] Saving predict

2009-12-04 Thread Jose Narillos de Santos
Hi all,,I´m using function arima() I.e series is my data model-arima(series,c(1,0,0)) forecast-predict(model,80) I want to create a variable: b1-forecast$pred - 1.96*forecast$se and save in a txt file but using this: save(b1, file= b1.txt) creates afile butwith this inside: ‹

Re: [R] writing 'output.csv' file

2009-12-04 Thread Maithili Shiva
Dear Mr Signer and Mr Cleland,   Thanks a lot for you great help. However, the output which I am getting is as given below -   x 1;25 2;26 3;27 4;28 5;29 6;30 7;31 8;32 9;33 10;34  ;35  ;36  ;37  ;38  ;39  ;40  ;41  ;42  ;43  ;44  ;45  ;46  ;47  ;48  ;49  ;50  

[R] Substitute Object not found with NA

2009-12-04 Thread Veronesi, Fabio
Hi everybody, I'm trying to create a script that picks a txt file with 2 columns of coordinates (depth and variable1) and automatically tries to fit several polynomial with the function nls(). After that, it creates a list of observed, predict, residuals and other, and then it calculates AIC,

Re: [R] Solve linear program without objective function

2009-12-04 Thread Hans W Borchers
Andreas Wittmann andreas_wittmann at gmx.de writes: Dear R-users, i try to solve to following linear programm in R 0 * x_1 + 2/3 * x_2 + 1/3 * x_3 + 1/3 * x_4 = 0.3 x_1 + x_2 + x_3 + x_4 = 1 x_1, x_2, x_3, x_4 0, x_1, x_2, x_3, x_4 1 as you can see i have no objective function

[R] Confidence Intervals for proportion according to Blyth, Still Casella

2009-12-04 Thread Öhagen Patrik
Are the confidence Intervals for proportion according to Blyth,Still Casella implemented in R? Thank you in advance! Cheers, Patrik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Problems while plotting with ROCR

2009-12-04 Thread Heiko Strathmann
Hello all, I have two problems with the ROCR package. First Problem: the add=TRUE option does not work for plotting performance objects The following code is taken from the reference manual (example for ROCR.hiv, page2) data(ROCR.hiv) attach(ROCR.hiv) pred.svm - prediction(hiv.svm$predictions,

Re: [R] Substitute Object not found with NA

2009-12-04 Thread Duncan Murdoch
Veronesi, Fabio wrote: Hi everybody, I'm trying to create a script that picks a txt file with 2 columns of coordinates (depth and variable1) and automatically tries to fit several polynomial with the function nls(). After that, it creates a list of observed, predict, residuals and other, and

[R] Odp: Substitute Object not found with NA

2009-12-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.12.2009 12:09:08: Hi everybody, I'm trying to create a script that picks a txt file with 2 columns of coordinates (depth and variable1) and automatically tries to fit several polynomial with the function nls(). After that, it creates a list

[R] Odp: How build hist combining data

2009-12-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 03.12.2009 10:45:44: I would like to ask if there is some simple way for building a hist from the following data. mm -c(2,3,0,4,5,0,2,9,0) mmm - matrix(mm,ncol=3, nrow=3) x - c(0,1.45,2.9) in mmm there are frequencies (each column is

[R] multidimensional point.in.polygon??

2009-12-04 Thread Keith Jewell
Hi, I seek to identify those points in/outside a multidimensional convex hull (geometry::convhulln). Any suggestions? Background just in case I'm going down a really wrong road: Given an observed data set with one dependent/observed variable (Y) and multiple (3 to 10) independent/design

[R] length of a density curve (or any curve)

2009-12-04 Thread sylvain willart
Hello R users, When I type d - density(MyData$x) I obtain a density object I can plot, But I wonder if there is a way to easily compute the length of the density curve ? ( I imagine I could compute the distances between the 512 equally spaced points using their x and y, but does it exist a

Re: [R] Solve linear program without objective function

2009-12-04 Thread Soetaert, Karline
Andreas, I don't know what it is exactly that you want to do, but perhaps you can try using limSolve, which solves for the equations Ex=F, Gx=H. In the code below, lsei calculates the least squares solution (min sum(x^2)), xranges estimates the range of your variables, and xsample takes a

Re: [R] length of a density curve (or any curve)

2009-12-04 Thread milton ruser
hi Sylvain, did you try ?density regards milton On Fri, Dec 4, 2009 at 7:19 AM, sylvain willart sylvain.will...@gmail.comwrote: Hello R users, When I type d - density(MyData$x) I obtain a density object I can plot, But I wonder if there is a way to easily compute the length of the

Re: [R] Combinations and joint probabilities

2009-12-04 Thread G. Jay Kerns
Dear Amelia, On 12/4/09, Amelia Livington amelia_living...@yahoo.com wrote: Dear R helpers Suppose I have two sets of ranges (interest rates) as Range 1 : (7 – 7.50, 7.50 – 8.50, 8.50 – 10.00) with respective probabilities 0.42, 0.22 and 0.36. Range II : (11-12, 12-14, 14-21) with

Re: [R] writing 'output.csv' file

2009-12-04 Thread jim holtman
The csv file is exactly as you describe it. ;35 represents two columns of data. If you read it is, you will probably get NA as the value in the first column. So what problem are you having in reading in the data? x - read.csv(textConnection(8;32 + 9;33 + 10;34 + ;35 + ;36 + ;37 + ;38),

Re: [R] length of a density curve (or any curve)

2009-12-04 Thread sylvain willart
Yes, sure (and I just did it again) but I can't see an answer... did I miss sthg ? regards, SW 2009/12/4 milton ruser milton.ru...@gmail.com: hi Sylvain, did you try ?density regards milton On Fri, Dec 4, 2009 at 7:19 AM, sylvain willart sylvain.will...@gmail.com wrote: Hello R

Re: [R] length of a density curve (or any curve)

2009-12-04 Thread Ted Harding
True enough -- ?density does not address the issue of computing the length pf the curve! One simple way of implementing the idea you first thought of would be on the following lines: d - density(MyData$x) sum(sqrt(diff(d$x)^2 + diff(d$y)^2)) which simply sums the lengths of the

[R] selective subsetting of a correlation matrix

2009-12-04 Thread Lee William
Dear All, I have a correlation matrix say 'M' (4000x4000) for 4000 genes and I want to subset it to 'N' (190x190) for 190 genes. The list of those 190 genes are in variable 't'. So the idea is to read the names of genes from variable 't' and subset the matrix M accordingly. Any thoughts are

Re: [R] selective subsetting of a correlation matrix

2009-12-04 Thread Romain Francois
On 12/04/2009 02:18 PM, Lee William wrote: Dear All, I have a correlation matrix say 'M' (4000x4000) for 4000 genes and I want to subset it to 'N' (190x190) for 190 genes. The list of those 190 genes are in variable 't'. So the idea is to read the names of genes from variable 't' and subset the

Re: [R] selective subsetting of a correlation matrix

2009-12-04 Thread jim holtman
Will something like this work for you: x - matrix(1:100,10) dimnames(x) - list(letters[1:10], LETTERS[1:10]) x A B C D E F G H I J a 1 11 21 31 41 51 61 71 81 91 b 2 12 22 32 42 52 62 72 82 92 c 3 13 23 33 43 53 63 73 83 93 d 4 14 24 34 44 54 64 74 84 94 e 5 15 25 35 45

[R] z to r transformation within print.rma.uni and forest from the package metafor

2009-12-04 Thread Sebastian Stegmann
Dear R community, I'm using the ,metafor'-package by Wolfgang Viechtbauer (Version: 0.5-5) to calculate random-effects meta-analyses using Correlations and Sample Sizes as the raw data. (By the way: Really a nice piece of work, Wolfgang! Thanks heaps.) I specified the rma.uni' function

Re: [R] Data Manipulation Question

2009-12-04 Thread Gray Calhoun
This is probably far more discussion than the question warranted, but... On Thu, Dec 3, 2009 at 11:14 PM, David Winsemius dwinsem...@comcast.net wrote: On Dec 3, 2009, at 10:52 PM, Gray Calhoun wrote: The data import/export manual can elaborate on a lot of these; this is all straightforward,

Re: [R] selective subsetting of a correlation matrix

2009-12-04 Thread Romain Francois
On 12/04/2009 02:24 PM, Romain Francois wrote: On 12/04/2009 02:18 PM, Lee William wrote: Dear All, I have a correlation matrix say 'M' (4000x4000) for 4000 genes and I want to subset it to 'N' (190x190) for 190 genes. The list of those 190 genes are in variable 't'. So the idea is to read

[R] set working directory in Windows XP

2009-12-04 Thread Ivan Calandra
Hello everybody, I'm new in the R world and I'm struggling to set the working directory. Up to now, I just set it up every time I start R ( 'setwd()' ) but I'd like it to be set automatically. I've read the FAQ as well as the help on Startup ('?Startup') about the environment variables and

Re: [R] multidimensional point.in.polygon??

2009-12-04 Thread baptiste auguie
Hi, Yet another one of my very naive ideas on the subject: maybe you can first evaluate the circumscribed and inscribed spheres of the base set of points (maximum and minimum of their distances to the center of gravity). Any points within a distance smaller than the infimum is good, any point

[R] cycling k times a realization of a random walk.....problems..

2009-12-04 Thread Federico Bonofiglio
hello R-masters. i have an R-issue here that i don't know if you'd wish to help me  about it: briefly i'd like to generate many (say hundred) realizations of a random walk, execute a few operations on each of them (mean time of return), and graph each realization on the same plot. IN OTHER

[R] question about invers gamma trancted

2009-12-04 Thread khazaei
Hi I want to generate from invers gamma distribution truncated but when I use the rinvegamma() function, the system can not find this function. Is ther someone to help me please? thanks soleiman __ R-help@r-project.org mailing list

[R] Error when running Conditional Logit Model

2009-12-04 Thread Hien Nguyen
Dear R-helpers, I am very new to R and trying to run the conditional logit model using clogit command. I have more than 4000 observations in my dataset and try to predict the dependent variable from 14 independent variables. My command is as follows clmtest1 -

[R] Logistic geographical weighted regression

2009-12-04 Thread Pazur, Robert
Dear all, is it possible to perform logstic type of geographical weighted regression in R software? thanks in advance. robert. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] latex.table for table with character and numeric columns

2009-12-04 Thread Gerrit Draisma
Hallo, I have a dataset with one or two columns with character data and the rest with numeric data. Using latex.table from the quantreg package produced a table, but I cannot set the decimals. For instance: --- x-data.frame(Name=c(Jan,Piet,Jan), V=c(1,2.991,3))

[R] curve fitting to data

2009-12-04 Thread Pascale Weber
Hi to all This is the first time I am quoting a question and I hope, my question is not too basic... For the following data, I wish to draw a fitted curve. x - c(123,129,141,144,144,145,149,150,158,159,163,174,183,187,242,248) y -

Re: [R] length of a density curve (or any curve)

2009-12-04 Thread sylvain willart
Thanks for your answer, @Dennis Murphy: no, I don't know the functionnal form, this is purely empirical data @ Ted Harding: Thank you for your lines of code, they are actually a pretty smart way... SW 2009/12/4 Ted Harding ted.hard...@manchester.ac.uk: True enough -- ?density does not address

[R] flexmix and mclust help

2009-12-04 Thread osazuta
Hello, I'm trying out flexmix and mclust for the first time on some univariate data which is typically best described as lognormal, but can sometimes be gamma distributed as well. I first tried using EM on mclust assuming the data was lognormally distributed and could only get it to work in E

[R] stepAIC function

2009-12-04 Thread Ashta
Hi All, I am trying to run the following script but have problem, coxm- coxph(Surv(sdat$time, sdat$cens)~hd+nawtg+nwwg+ntpg+cy+nseas,data=sdat) coxm-stepAIC(coxm,~.^2) The error message is Error: could not find function stepAIC I tried to install the package but I could not find it. Where

Re: [R] cycling k times a realization of a random walk.....problems..

2009-12-04 Thread Gavin Simpson
On Fri, 2009-12-04 at 05:54 -0800, Federico Bonofiglio wrote: hello R-masters. i have an R-issue here that i don't know if you'd wish to help me about it: briefly i'd like to generate many (say hundred) realizations of a random walk, execute a few operations on each of them (mean time of

Re: [R] curve fitting to data

2009-12-04 Thread Gabor Grothendieck
A simple y vs log(x) fit seems to work pretty well here: fit - lm(y ~ log(x)) summary(fit) plot(y ~ log(x)) abline(fit) On Fri, Dec 4, 2009 at 9:06 AM, Pascale Weber pascale.we...@wsl.ch wrote: Hi to all This is the first time I am quoting a question and I hope, my question is not too

Re: [R] Tobit model fluid milk consumption

2009-12-04 Thread Terry Therneau
First, note that all attachments are removed from messages sent to R-help, please use plain text only. I took the time to bring up the attachment in a web browser (there is a link to it), but you are unlikely to get a lot of readers when the question is captured as a pdf. 1. Tobit regression on

Re: [R] Arules - Association Rules

2009-12-04 Thread Michael Hahsler
Alexandre, You are mining for association rules with an absolute support count of 1001*0.01 = 10.1. From your 40 minutes processing time I guess that your survey data set is very dense and that results in an enormous number of frequent itemsets (potentially up to 2^k - k - 1 which is in your

[R] csimtest function in multcomp package

2009-12-04 Thread d . m . perkins
Hello all, Quick question: I want to do posthoc contrasts for a linear mixed effects model. However, when trying to use the csimtest function in multcomp package I receive an error message saying it cannot find the function, even after installing and loading package multcomp. Any

[R] Converting a Matrix in a colum vector

2009-12-04 Thread Jose Narillos de Santos
Hi all, Imagine I have a matrix G with N rows and M columns So L=NxM is the number of different cells in my matrix. I want to create a column vector F whose size will be F(L,1) So the fisrt row in F is G(1,1) Second row in F is G(1,2) When we arrive to a point M the element M+1 will be G(2,

Re: [R] stepAIC function

2009-12-04 Thread David Winsemius
On Dec 4, 2009, at 9:29 AM, Ashta wrote: Hi All, I am trying to run the following script but have problem, coxm- coxph(Surv(sdat$time, sdat$cens)~hd+nawtg+nwwg+ntpg+cy +nseas,data=sdat) coxm-stepAIC(coxm,~.^2) The error message is Error: could not find function stepAIC Perhaps you have

[R] Source code for some grid package documentation

2009-12-04 Thread Sebastien Bihorel
Dear R-users, I was wondering if anybody would have the source code used to create the last figure in the frame.pdf documentation distributed with the grid package. Thanks in advance. __ R-help@r-project.org mailing list

Re: [R] csimtest function in multcomp package

2009-12-04 Thread Achim Zeileis
On Fri, 4 Dec 2009, d.m.perk...@qmul.ac.uk wrote: Hello all, Quick question: I want to do posthoc contrasts for a linear mixed effects model. However, when trying to use the csimtest function in multcomp package I receive an error message saying it cannot find the function, even after

Re: [R] csimtest function in multcomp package

2009-12-04 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
Daniel, quick guess: There has been a major change in the package some time ago, with quite a few functions vanishing and others added. So I guess your recycled code was based on an older version of multcomp. My current version (1.1-0) does not have csimtest anymore either. I guess you want to

[R] Problem with date x-axis

2009-12-04 Thread PtitBleu
Hello, I have a friday problem. I'm trying to plot the number of measures by day with this command between the 2008-07-31 and the 2009-11-13 (it works) : plot(unique(as.Date(strptime(data$date, format=%Y-%m-%d %H:%M:%S))), measuresbyday) then I would like to plot vertical lines for each month.

Re: [R] Converting a Matrix in a colum vector

2009-12-04 Thread Benilton Carvalho
matrix(t(G), nc=1) b On Dec 4, 2009, at 1:19 PM, Jose Narillos de Santos wrote: Hi all, Imagine I have a matrix G with N rows and M columns So L=NxM is the number of different cells in my matrix. I want to create a column vector F whose size will be F(L,1) So the fisrt row

Re: [R] Source code for some grid package documentation

2009-12-04 Thread Romain Francois
On 12/04/2009 04:28 PM, Sebastien Bihorel wrote: Dear R-users, I was wondering if anybody would have the source code used to create the last figure in the frame.pdf documentation distributed with the grid package. file.show( vignette( frame, package = grid )$file ) Thanks in advance.

Re: [R] set working directory in Windows XP

2009-12-04 Thread Prof Brian Ripley
You set this on the properties of the shortcut you use to start R, just like any other Windows application. R's working directory is always initially the directory it is started from. This *is* in the FAQ: http://cran.r-project.org/bin/windows/base/rw-FAQ.html#How-do-I-run-it_003f even

Re: [R] z to r transformation within print.rma.uni and forest from the package metafor

2009-12-04 Thread Viechtbauer Wolfgang (STAT)
Dear Sebastian, Glad to hear you find the package useful. Before I get to your questions, just as an aside - you can leave default arguments out of the call. So: MAergebnis-rma.uni(ri=PosOutc, ni=N, data=dm, slab=c(dm$Article, dm$StudyNo), measure=ZCOR, method=DL) would do exactly the same as

Re: [R] Logistic geographical weighted regression

2009-12-04 Thread Paul Hiemstra
Pazur, Robert wrote: Dear all, is it possible to perform logstic type of geographical weighted regression in R software? thanks in advance. robert. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Error when running Conditional Logit Model

2009-12-04 Thread David Winsemius
On Dec 4, 2009, at 9:22 AM, Hien Nguyen wrote: Dear R-helpers, I am very new to R and trying to run the conditional logit model using clogit command. I have more than 4000 observations in my dataset and try to predict the dependent variable from 14 independent variables. My command is as

Re: [R] Source code for some grid package documentation

2009-12-04 Thread Sebastien Bihorel
Thank you Romain, I appreciate the help. Romain Francois wrote: On 12/04/2009 04:28 PM, Sebastien Bihorel wrote: Dear R-users, I was wondering if anybody would have the source code used to create the last figure in the frame.pdf documentation distributed with the grid package. file.show(

Re: [R] Saving predict

2009-12-04 Thread Paul Hiemstra
?arima ?write.table groet, Paul Jose Narillos de Santos wrote: Hi all,,I´m using function arima() I.e series is my data model-arima(series,c(1,0,0)) forecast-predict(model,80) I want to create a variable: b1-forecast$pred - 1.96*forecast$se and save in a txt file but using this: save(b1,

Re: [R] question about invers gamma trancted

2009-12-04 Thread David Winsemius
On Dec 4, 2009, at 9:02 AM, khaz...@ceremade.dauphine.fr wrote: Hi I want to generate from invers gamma distribution truncated but when I use the rinvegamma() function, the system can not find this function. Is ther someone to help me please? Check your spledding. thanks soleiman

Re: [R] Dividing a pixel image into factors - (cut.im(), cut.default())

2009-12-04 Thread Glen Sargeant
Lauren, I think (?) you mean to say that you wish to create a factor and control the range of values assigned to each level. The breaks argument can specify either the number of intervals you desire OR the values you wish to use to define levels of your factor. See '?cut' and the following

[R] Apparent different in symbol scaling between xyplot and grid.points

2009-12-04 Thread Sebastien Bihorel
Dear R-users, For the past few days, I have been trying to find the reason why some of my plots were showing symbols of different sizes, while I thought I was using the same .cex arguments everywhere. The problem is exemplified by the following example code where the xyplot and grid.points

Re: [R] Logistic geographical weighted regression

2009-12-04 Thread David Winsemius
On Dec 4, 2009, at 6:55 AM, Pazur, Robert wrote: Dear all, is it possible to perform logstic type of geographical weighted regression in R software? We even have a fortune for such questions: library(fortunes) fortune(Yoda) Evelyn Hall: I would like to know how (if) I can extract some of

Re: [R] R and eclipse

2009-12-04 Thread karina lopez
Sorry, but i was out for two days! I just want to call R scripts from java code. So i think i need to review the jri and the REngine API. I will tell you whatever i find. Thank you so much, because i was really lost! 2009/12/4 Romain Francois romain.franc...@dbmail.com On 12/03/2009 08:43 PM,

[R] Machine Learning and Sample Size

2009-12-04 Thread Richard Liu
In developing a machine learner to classify sentences in plain text sources of scientific documents I have been using the caret package and following the procedures described in the vignettes. What I miss in the package -- but quite possibly I am overlooking it! -- is functions

[R] Renaming columns of a data.frame

2009-12-04 Thread Kevin Wright
A question that has come up a few times on r-help is how to rename columns of a data.frame. There are several ways to do this by hand (see the list archives). There is also a 'rename' function in the reshape package. I often use the 'transform' function shortly after reading in a data file and

Re: [R] Three-dimensional (3D) movement using 'R'

2009-12-04 Thread David Winsemius
On Dec 4, 2009, at 7:07 AM, StRose, Suzanne wrote: Hi again, Apologies for the last email I forwarded. Apparently, my data was not legible. So, I have a question regarding the construction of 3D graphs in ‘R’, BUT these graphs also need to illustrate movement (with time) of the prostate

Re: [R] Question about R Functions

2009-12-04 Thread Uwe Ligges
Stephanie Cooke wrote: Is there a place to find the code for R functions like lsoda? Thanks Yes, all code is in the source version of the package that contains that function. Best, Uwe Ligges __ R-help@r-project.org mailing list

Re: [R] Apparent different in symbol scaling between xyplot and grid.points

2009-12-04 Thread baptiste auguie
Hi, I think the size mismatch occurs because of a different default for the fontsize (and grid.points has a size of 1 character by default). Compare the following two examples, # default grid.newpage() pushViewport(viewport(x=unit(0.5, npc), y=unit(0.5, npc)))

[R] Class attributes

2009-12-04 Thread Allen L
Dear R forum, I want to replace all the elements in a data frame (dd) which match the character x with 0. What's the most elegant way of doing this (there must be an easy way which I've missed)? I settled on the following loop: for(i in 5:12){# These are the column of dd I am

Re: [R] How to compute contrast where there are interaction terms in the linear model?

2009-12-04 Thread Peng Yu
On Tue, Dec 1, 2009 at 4:04 PM, Charles C. Berry cbe...@tajo.ucsd.edu wrote: On Tue, 1 Dec 2009, Peng Yu wrote: Could somebody recommend some textbook how to compute contrast when there are interactions terms? Applied Linear Regression Models (book) mentioned contrast, but I cannot extend it

Re: [R] Class attributes

2009-12-04 Thread jim holtman
Here a way of doing it: for (i in 5:12){ # convert to character so you can substitute 'x' a - as.character(dd[,i]) a[a == 'x'] - '0' replace with zero dd[,i] - as.numeric(a) } On Fri, Dec 4, 2009 at 11:55 AM, Allen L allen.laroc...@gmail.com wrote: Dear R forum, I want to

Re: [R] Class attributes

2009-12-04 Thread David Winsemius
On Dec 4, 2009, at 11:55 AM, Allen L wrote: Dear R forum, I want to replace all the elements in a data frame (dd) which match the character x with 0. What's the most elegant way of doing this (there must be an easy way which I've missed)? I settled on the following loop: for(i in

[R] grep() exclude certain patterns?

2009-12-04 Thread Peng Yu
The external grep program has an option -v to select non-matching lines. I'm wondering if how to exclude certain patterns in grep() in R? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] grep() exclude certain patterns?

2009-12-04 Thread Duncan Murdoch
On 04/12/2009 12:52 PM, Peng Yu wrote: The external grep program has an option -v to select non-matching lines. I'm wondering if how to exclude certain patterns in grep() in R? ?grep Duncan Murdoch __ R-help@r-project.org mailing list

[R] Standard deviation for each element in a set of matrices

2009-12-04 Thread Muhammad Rahiz
Hello R-users, I would like to know how to find the standard deviation for each element in a set of matrices. Given the following files, File1File2File3 1 1 1 4 4 4 7 7 7 2 2 2 5 5 5 8 8 8 3 3 3 6 6 6 9 9 9 I want to calculate the standard deviation for every

[R] User's function

2009-12-04 Thread Lisa
Hello, All, I want to write a function to do some works based on the arguments. For example, bind some variables (arguments) as this: myfunction - function(arg1, arg2, arg3, …) { x - cbind(arg1, arg2, arg3, …) } myfunction(arg1, arg2, arg3, …) The function can automatically determine

Re: [R] Can we get rid of bar charts with error bars?

2009-12-04 Thread Greg Snow
This reminds me of a quote I saw once (I think it may have been in one of those Murphy's Laws calendars), my parahpase: If you make someone think that they are thinking, They will love you for it. If you make them actually think, They will hate you for it. This explains why

Re: [R] User's function

2009-12-04 Thread baptiste auguie
Hi, try ?do.call do.call(cbind, replicate(3, 1:10, simplify=FALSE)) HTH, baptiste 2009/12/4 Lisa lisa...@gmail.com: Hello, All, I want to write a function to do some works based on the arguments. For example, bind some variables (arguments) as this: myfunction - function(arg1, arg2,

Re: [R] shorten str() output for long list

2009-12-04 Thread Greg Snow
An alternative to str is the TkListView function in the TeachingDemos package. You still get the long listing, but it is in a separate window that you can control the scrolling on by hand. For more complicated lists/objects it provides a tree structure so that you can look at only the

Re: [R] How to compute contrast where there are interaction terms in the linear model?

2009-12-04 Thread Charles C. Berry
On Fri, 4 Dec 2009, Peng Yu wrote: On Tue, Dec 1, 2009 at 4:04 PM, Charles C. Berry cbe...@tajo.ucsd.edu wrote: On Tue, 1 Dec 2009, Peng Yu wrote: Could somebody recommend some textbook how to compute contrast when there are interactions terms? Applied Linear Regression Models (book)

Re: [R] Standard deviation for each element in a set of matrices

2009-12-04 Thread Phil Spector
Muhammad - Here's one way: files = c('File1','File2','File3') themats = lapply(files,read.table) ans = matrix(0,3,3) for(i in 1:3)for(j in 1:3)ans[i,j] = sd(sapply(themats,function(x)x[i,j])) Here's another files = c('File1','File2','File3') themats = lapply(files,read.table) ans =

[R] Network Graph Add Labels

2009-12-04 Thread Brock Tibert
Hi Everyone, I am new to R and just trying my hand at plotting a network from my dataset. I am trying to teach myself network analysis, so this is probably an easy question. Using the package network, I have successfully plotted my network. I simply want to add labels to my vertices, with

Re: [R] curve fitting to data

2009-12-04 Thread Peter Ehlers
Pascale, If you do want an nls fit with the associated error structure assumptions, check ?SSlogis. fm - nls(y ~ SSlogis(x, Asy, xmid, scal)) summary(fm) xx - seq(123, 248, length = 101) yy - predict(fm, list(x = xx)) plot(x, y) lines(xx, yy) -Peter Ehlers Gabor Grothendieck wrote: A

Re: [R] Standard deviation for each element in a set of matrices

2009-12-04 Thread Gray Calhoun
Hi Muhammad, Load the data from all of the files into an array (probably using a for loop), then call apply on the resulting array: ie ## replace the first line with code to load your data rr - array(c(rep(1:3,3), rep(4:6,3), rep(7:9,3)), c(3,3,3)) apply(rr, c(1,2), sd) [,1] [,2] [,3]

Re: [R] Standard deviation for each element in a set of matrices

2009-12-04 Thread David Winsemius
On Dec 4, 2009, at 1:27 PM, Gray Calhoun wrote: Hi Muhammad, Load the data from all of the files into an array (probably using a for loop), then call apply on the resulting array: ie I like that idea a lot and it does not need an explicit loop: apply( array(c(File1, File2, File3),

Re: [R] User's function

2009-12-04 Thread Lisa
Thank you for your reply. But this is not what I want. For example, I have several variables, like arg1 - c(1, 2, 3, 5, 6, 6) arg2 - c(3, 1, 5, 5, 7, 8) arg3 - c(8, 10, 4, 0, 9, 1) arg4 - c(11, 22, 30, 5, 61, 22) … I just want to bind some of these variables based on the arguments assigned in

[R] options(width=100) ignored on start-up

2009-12-04 Thread Liviu Andronic
Dear all Is it normal that R ignores options(width=100) at start-up? Although li...@debian-liv:~$ cat /usr/lib/R/etc/Rprofile.site | grep width options(width = 100) , R will start with [Previously saved workspace restored] options()$width [1] 80 Am I doing something wrong? Liviu

  1   2   >