[R] problems in limma

2007-07-30 Thread De-Jian,ZHAO
Dear list members, I am analysing my microarray data using limma package. Now I encounter several problems. Looking forward to your suggestions! Question 1: During the process of background correction using method=normexp, four warning messages appeared as NaNs produced in: log(x) (as you can

[R] correlation and matrix

2007-07-30 Thread Nathalie.Cornileau
Dear everyone, I am new in R and I've got difficulties in realizing the following tasks: -I have variables (factors) with different numbers of levels, either 1, 2 or 3. -I have a matrix containing these 204 factors and I have to correlate them by groups of 4 variables. -I have to delete the

[R] how to combine data of several csv-files

2007-07-30 Thread Antje
Hello, I'm looking for a solution for the following problem: 1) I have a folder with several csv files; each contains a set of measurement values 2) The measurements of each file belong to a position in a two dimensional matrix (lets say B02.csv belongs to position 2,2 3) The size of the

Re: [R] Create Strings of Column Id's

2007-07-30 Thread Tom.O
Great, That did the trick,thanks. regards Tom jholtman wrote: Is this what you want: paste(-, paste(colnames(MyMatrix)[COL], collapse='-'), sep='') [1] -E-T On 7/26/07, Tom.O [EMAIL PROTECTED] wrote: Does anyone know how this is don? I have a large matrix where I extract

[R] apply, lapply and data.frame in R 2.5

2007-07-30 Thread jiho
Hello everyone, A recent (in 2.5 I suspect) change in R is giving me trouble. I want to apply a function (tolower) to all the columns of a data.frame and get a data.frame in return. Currently, on a data.frame, both apply (for arrays) and lapply (for lists) work, but each returns its native

[R] Slightly OT - use of R

2007-07-30 Thread John Logsdon
I am trying to get a measure of how R compares in usage as a statistical platform compared to other software. I would guess it is the most widely used among statisticians at least by virtue of it being open source. But is there any study to which I can refer? By asking this list I am not

Re: [R] Call R program from C++ code

2007-07-30 Thread Vladimir Eremeev
Writing R Extensions manual contains chapters dedicated to parsing and evaluating of the R extensions from C. Also, I vaguely remember I've seen something like Embedding R somewhere in manuals. R can be compiled as a shared library object, that you can dynamically load from your application and

Re: [R] Slightly OT - use of R

2007-07-30 Thread Ted Harding
On 30-Jul-07 08:28:15, John Logsdon wrote: I am trying to get a measure of how R compares in usage as a statistical platform compared to other software. I would guess it is the most widely used among statisticians at least by virtue of it being open source. But is there any study to which I

[R] Matrix nesting (was Re: Obtaining summary of frequencies of value occurrences for a variable in a multivariate dataset.)

2007-07-30 Thread Allan Kamau
Hi !-- @page { size: 21cm 29.7cm; margin: 2cm } P { margin-bottom: 0.21cm } -- I would like to nest matrices, is there a way of doing so, I am getting “number of items to replace is not

Re: [R] g++ verfsion

2007-07-30 Thread xinan yang
Hi, Li, Thanks for reply. It is strange that I used RBGL_1.6.0 successfully on the same linux system with R 2.3.1 before! After trying to install R 2.5.1, the RBGL_1.12.0 failed to be installed. Then, I uninstalled R. Delete the directory R/lib/. Installed R.2.3.1 again. And run

[R] help with ROC curve

2007-07-30 Thread Rithesh M. Mohan
Hi I'm new to stats and R, so can you please help me or guide me building ROC curve in an elaborate way with codes I loaded ROCR package, but I'm not sure how to use it. Requirement To build ROC curve using only PSA(variable) alone of the original cohort against the ROC of the Model of

[R] random number generator in batch jobs

2007-07-30 Thread Jiqiu Cheng
Dear sir, I want to submit R batch jobs (e.g. 5) under the linux cluster by the script file do_mul. The script file do_mul #!/bin/bash export var for var in $(seq 1 5) do qsub -v var do_test done exit 0 Through do_mul, 5 do_test script files are submitted to the cluster. The script file

Re: [R] correlation and matrix

2007-07-30 Thread Jacques VESLOT
it should be smth like that: apply(sapply(seq(1, 204, by=12), seq, length=4), 2, function(x) { M - dta[,x] z - sapply(M, nlevels) # if dta is a dataframe if (sum(z==1)3) cor(as.matrix(M[,z!=0]), use=comp, method=spear) else NA }) Jacques VESLOT INRA - Biostatistique Processus Spatiaux

[R] Bind together two vectors of different length...

2007-07-30 Thread Andris Jankevics
Dear everyone, I've got difficulties in realizing the following task: I have two vectors: A - c(1:10) B- seq(1,10,2) Now I want to make a table form vectors A and B as rows, and if a value of A isn't present B, then I want to put a N/A symbol in it: Output should look like this: 1 2 3 4 5 6

Re: [R] Slightly OT - use of R

2007-07-30 Thread Prof Brian Ripley
On Mon, 30 Jul 2007, [EMAIL PROTECTED] wrote: On 30-Jul-07 08:28:15, John Logsdon wrote: I am trying to get a measure of how R compares in usage as a statistical platform compared to other software. I would guess it is the most widely used among statisticians at least by virtue of it being

Re: [R] apply, lapply and data.frame in R 2.5

2007-07-30 Thread Prof Brian Ripley
On Mon, 30 Jul 2007, jiho wrote: Hello everyone, A recent (in 2.5 I suspect) change in R is giving me trouble. I want to apply a function (tolower) to all the columns of a data.frame and get a data.frame in return. Currently, on a data.frame, both apply (for arrays) and lapply (for lists)

[R] Odp: Bind together two vectors of different length...

2007-07-30 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 30.07.2007 12:09:59: Dear everyone, I've got difficulties in realizing the following task: I have two vectors: A - c(1:10) B- seq(1,10,2) Now I want to make a table form vectors A and B as rows, and if a value of A isn't present B, then I want to

Re: [R] random number generator in batch jobs

2007-07-30 Thread Prof Brian Ripley
Have you read the help page? Initially, there is no seed; a new one is created from the current time when one is required. Hence, different sessions will give different simulation results, by default. Thus if you choose to launch processes on different machines at the same

Re: [R] Slightly OT - use of R

2007-07-30 Thread Neil Shephard
John Logsdon j.logsdon at quantex-research.com writes: I am trying to get a measure of how R compares in usage as a statistical platform compared to other software. I would guess it is the most widely used among statisticians at least by virtue of it being open source. But is there any

Re: [R] ROC curve in R

2007-07-30 Thread gyadav
Hi Ritesh ***please note Ritesh always mark a copy to the R-help mailing list :) *** Please visit this link to get help in R http://rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt#384,8,Examples (2/8): Precision/recall curves futher :) what do you mean by PSA and cohort :) after some

Re: [R] Bind together two vectors of different length...

2007-07-30 Thread François Pinard
[Andris Jankevics] I have two vectors: A - c(1:10) B- seq(1,10,2) Now I want to make a table form vectors A and B as rows, and if a value of A isn't present B, then I want to put a N/A symbol in it: Output should look like this: 1 2 3 4 5 6 7 8 9 10 1 0 3 0 5 0 7 0 9 0 How can I do this in

Re: [R] how to combine data of several csv-files

2007-07-30 Thread Antje
Hello, sorry for this confusion but I don't know a better way to explain... I have no problems to read in the files and to process them. I end up with a list of results like this: ret $A02.csv [1] NA $B02.csv [1] 89.130435 8.695652 2.173913 0.00 0.00 0.00 9.892473 $C02.csv

[R] [R-pkgs] New versions for the distr-family of packages and of package startupmsg

2007-07-30 Thread Peter Ruckdeschel
We would like to announce the availability on CRAN (with possibly a minor delay until on every mirror) of new versions of our packages in the distrXXX-family (version 1.9), i.e.; distr, distrEx, distrSim, distrTEst, and distrDoc as well as of package for managing startup messages,

Re: [R] ROC curve in R

2007-07-30 Thread Rithesh M. Mohan
Sorry Gaurav, I'll make sure I mark a copy to r-help also. As I have told, I'm new to R and even to statistics, so it will take some time for me to learn it. Just help me get a simple ROC curve, please give an example of your own and explain the steps, no mater if its biology or any

Re: [R] apply, lapply and data.frame in R 2.5

2007-07-30 Thread jiho
On 2007-July-30 , at 12:20 , Prof Brian Ripley wrote: On Mon, 30 Jul 2007, jiho wrote: A recent (in 2.5 I suspect) change in R is giving me trouble. I want to apply a function (tolower) to all the columns of a data.frame and get a data.frame in return. Currently, on a data.frame, both apply

[R] regular expressions : extracting numbers

2007-07-30 Thread GOUACHE David
Hello all, I have a vector of character strings, in which I have letters, numbers, and symbols. What I wish to do is obtain a vector of the same length with just the numbers. A quick example - extract of the original vector : lema, rb 2% rb 2% rb 3% rb 4% rb 3% rb 2%,mineuse rb rb rb 12 rb rj

[R] getting the name of variables passed to a function

2007-07-30 Thread Horace Tso
Folks, I've entered into an R programming territory I'm not very familiar with, thus this probably very elementary question concerning the mechanic of a function call. I want to know from within a function the name of the variables I pass down. The function makes use of the ... to allow for

[R] How to edit L-moment Ratio Diagram

2007-07-30 Thread amna khan
Hi Sir L-moment ratio diagram is obtained from RFA package using function plotlmrdia(lmrdia()). How can I edit thie diagram to represent the labels of curves representing the various distribtuions. I mean to say how can I use legend() function for this diagram, Thank You -- AMINA SHAHZADI

Re: [R] reading stata files: preserving values of variables converted to factors

2007-07-30 Thread Thomas Lumley
On Thu, 26 Jul 2007, Ben Saylor wrote: Hi, I am a Stata user new to R. I am using read.dta to read a Stata file that has variables with value labels. read.dta converts them to factors, but seems to recode them with values from 1 to number of factor levels (looking at the output of

Re: [R] plot

2007-07-30 Thread Dong GUO 郭东
Many thanks, Greg and Justin. The matrix is just a 26*31 matrix - 26 years, 31 regions. I am know to R, just dont know how to attach the data here yet.. As I have such matrices for nine indicators for all regions, so i could show some differences by 3D plot, which I did similar things in Excel.

[R] Looping through all possible combinations of cases

2007-07-30 Thread Dimitri Liakhovitski
Hello! I have a regular data frame (DATA) with 10 people and 1 column ('variable'). Its cases are people with names ('a', 'b', 'c', 'd', 'e', 'f', etc.). I would like to write a function that would sum up the values on 'variable' of all possible combinations of people, i.e. 1. I would like to

[R] 2nd R Console

2007-07-30 Thread Michael Janis
Hi, I was reading a thread: [R] 2nd R console and had a similar question regarding having more than one R console open at a time. However, my question differs from that of the thread: Is it possible, or is there a wrapper that will allow one, to open an arbitrary number of R consoles which

[R] error in using R2WinBUGS on Ubuntu 6.10 Linux

2007-07-30 Thread Thomas Harte
what version of Wine are you running? and is this the patched (1.4.1) version of WinBUGS that you're trying to run? cheers, thomas. Date: Thu, 26 Jul 2007 12:03:38 -0400 (EDT) From: [EMAIL PROTECTED] Subject: [R] error in using R2WinBUGS on Ubuntu 6.10 Linux To:

Re: [R] reading stata files: preserving values of variables converted to factors

2007-07-30 Thread Ben Saylor
Thanks for the clarification. I found the labels values in attributes(dataframe)$label.table$varname which looks the same whether convert.factors is TRUE or FALSE. Ben Thomas Lumley wrote: On Thu, 26 Jul 2007, Ben Saylor wrote: Hi, I am a Stata user new to R. I am using read.dta to

[R] Package manual examples - 'unexpected$undefined' errors

2007-07-30 Thread David Pain
Trying out an unfamiliar package, the natural thing is to use the examples given in the package's manual - hopefully, the writers of the package wouldn't include examples which didn't work! Recently, though, I've been getting 'unexpected$undefined' error messages when doing this, despite having

Re: [R] manipulating arrays

2007-07-30 Thread Rolf Turner
?append cheers, Rolf Turner On 28/07/2007, at 2:12 AM, Henrique Dallazuanna wrote: Hi, I don't know if is the more elegant way, but: X-c(1,2,3,4,5) X - c(X[1], 0, X[2:5]) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 27/07/07,

[R] Creating an instance of R from MS Access?

2007-07-30 Thread Felipe Carrillo
Hi all: Does anyone know if it's at all possible to create a connection to R from MS access? For example, if I have a table and want to export it to R,generate a graph in R and import it back to MS access. I can do this with sigmaPlot and other graphic programs but just wondering if it can be done

Re: [R] manipulating arrays

2007-07-30 Thread Gabor Grothendieck
Try this: x - 11:15 append(x, values = 99, after = 1) [1] 11 99 12 13 14 15 On 7/27/07, Nair, Murlidharan T [EMAIL PROTECTED] wrote: Can I insert an element in an array at a particular position without destroying the already existing element? X-c(1,2,3,4,5) I want to insert an

[R] data order by different level of variables

2007-07-30 Thread Am Stat
Dear useR, I have a data matrix, it has n columns, each column is a two-level variable with entires -1 and +1. They are randomly generated, now I want to order them like (for example, 5 columns case) --- - - -- - -- . (first several rows are the samples

[R] Calling R functions from a Microsoft SQL Server stored procedure

2007-07-30 Thread Luis Gerardo Gonzalez Morales
Does anyone have any advice on how to call R functions from a Microsoft SQL Server stored procedure? So far, I have no problem querying and saving to the database from R using RODBC. However, I wonder whether it is possible to work in the opposite direction: calling R from SQL Server, sending

[R] generating symmetric matrices

2007-07-30 Thread Gregory Gentlemen
Greetings, I have a seemingly simple task which I have not been able to solve today. I want to construct a symmetric matrix of arbtriray size w/o using loops. The following I thought would do it: p - 6 Rmat - diag(p) dat.cor - rnorm(p*(p-1)/2) Rmat[outer(1:p, 1:p, )] - Rmat[outer(1:p, 1:p, )]

[R] 2nd R Console

2007-07-30 Thread Michael Janis
Hi, I was reading a thread: [R] 2nd R console and had a similar question regarding having more than one R console open at a time. However, my question differs from that of the thread: Is it possible, or is there a wrapper that will allow one, to open an arbitrary number of R consoles which

Re: [R] Fitting exponential curve to data points

2007-07-30 Thread Stephen Tucker
Sorry, just got back into town. I wonder if AIC, BIC, or cross-validation scoring couldn't also be used as criteria for model selection - I've seen it mostly in the context of variable selection rather than 'form' selection but in principle might apply here? --- Dieter Menne [EMAIL PROTECTED]

Re: [R] manipulating arrays

2007-07-30 Thread Stephen Tucker
I think you are looking for append(), though it won't modify the object in-place like Python [I believe that is a product of R's 'functional programming' philosophy]. might want to check this entertaining thread: http://tolstoy.newcastle.edu.au/R/help/04/11/7727.html in this example it would be

Re: [R] Q: extracting data from lm

2007-07-30 Thread Chuck Cleland
D. R. Evans wrote: Warning: I am a complete newbie to R. I have read ISwR, but I am still finding myself completely stuck on some simple concepts. I have tried everything I can think of to solve this one, and finally decided that enough was enough and I need a pointer to a solution. I

[R] Package manual examples - 'unexpected$undefined' errors

2007-07-30 Thread David Pain
Trying out an unfamiliar package, the natural thing is to use the examples given in the package's manual - hopefully, the writers of the package wouldn't include examples which didn't work! Recently, though, I've been getting 'unexpected$undefined' error messages when doing this, despite having

[R] Matrix Multiplication, Floating-Point, etc.

2007-07-30 Thread Talbot Katz
Hi. I recently tried the following in R 2.5.1 on Windows XP: ev2-c(0.8,-0.6) ev1-c(0.6,0.8) ev1%*%ev2 [,1] [1,] -2.664427e-17 sum(ev1*ev2) [1] 0 (I got the same result with R 2.4.1 on a different Windows XP machine.) I expect this issue is very familiar and probably has been

Re: [R] Q: extracting data from lm

2007-07-30 Thread D. R. Evans
On 27/07/07, Chuck Cleland [EMAIL PROTECTED] wrote: coef(summary(lm(nu1 ~ nu2)))[,2] Also, try the following which is often useful: str(summary(lm(nu1 ~ nu2))) Oh, wow! Thank you. Incidentally, just in case anyone got the wrong end of the stick, I'm not at all complaining about R. It's

Re: [R] manipulating arrays

2007-07-30 Thread Peter Dalgaard
Henrique Dallazuanna wrote: Hi, I don't know if is the more elegant way, but: X-c(1,2,3,4,5) X - c(X[1], 0, X[2:5]) append(X, 0, 1) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Average plan

2007-07-30 Thread Jim Lemon
Nok Noy wrote: Hello, I'm looking for a method to compute an average plan from 4 or 5 point in an cartesian space. I'm sure It can be done using a less-square method but maybe it a function already exist in R system to get this plan. Can somebody help me to solve this problem (I'm looking

Re: [R] About infinite value

2007-07-30 Thread arigado
I think that the best thing is to work in logarithmic way, to avoid the limitations of the CPU. If y = 10^400, to do y=400*log(10), to change all you formulate to the logarithmic way and the final result to apply the antilogarithm. Felipe de Mendiburu. Professor of statistic Agrarian

[R] beta regressions in R

2007-07-30 Thread Walter R. Paczkowski
Good morning, Does anyone know of a package or function to do a beta regression? Thanks, Walt Paczkowski _ Walter R. Paczkowski, Ph.D. Data Analytics Corp. 44 Hamilton Lane Plainsboro, NJ 08536 (V) 609-936-8999 (F) 609-936-3733

[R] xtable with vector

2007-07-30 Thread Stefan Nachtnebel
Hello, Is there a possibility to use xtable with a vector to generate a latex table? I always get an error, that no applicable method is available. For example: b-1:12 dim(b)-c(2,6) dimnames(b)[[2]]-paste(col,1:6) xtable(b) works fine and does not raise an error, but a-1:6

[R] text() and vector arguments like adj

2007-07-30 Thread strinz
Hello, I remarked that the function ## Default S3 method: text (x, y = NULL, labels = seq(along = x), adj = NULL,pos = NULL, offset = 0.5, vfont = NULL,cex = 1, col = NULL, font = NULL, ...) accepts vectors of arguments (of the same length) except for the parameter adj. When passing a vector of

[R] the large dataset problem

2007-07-30 Thread Eric Doviak
Dear useRs, I recently began a job at a very large and heavily bureaucratic organization. We're setting up a research office and statistical analysis will form the backbone of our work. We'll be working with large datasets such the SIPP as well as our own administrative data. Due to the

[R] Bug in TAB handling for Win32 rTerm and rGUI in 2.5.1?

2007-07-30 Thread Rick Sayre
Greetings. This seemed like a bug to me, but I wanted to see if this was in fact intended before reporting. Before I start, i want to first extend thanks for the big improvements in integration of command completion for the windows version. Really nice to have now. But i believe there are

[R] the large dataset problem

2007-07-30 Thread Eric Doviak
Dear useRs, I recently began a job at a very large and heavily bureaucratic organization. We're setting up a research office and statistical analysis will form the backbone of our work. We'll be working with large datasets such the SIPP as well as our own administrative data. Due to the

[R] lattice grayscale theme

2007-07-30 Thread Patrick Drechsler
Hi, is there a grayscale setting for lattice plots? I like the default color settings. I also like the settings that are available for setting black and white with something like this: --8---cut here---start-8--- ltheme - canonical.theme(color = FALSE)

Re: [R] regular expressions : extracting numbers

2007-07-30 Thread Romain Francois
Bonjour David, What about one of these : R gsub( [^[:digit:]], , x ) or using perl regular expressions: R gsub( \\D, , x, perl = T ) Cheers, Romain GOUACHE David wrote: Hello all, I have a vector of character strings, in which I have letters, numbers, and symbols. What I wish to do is

[R] PCA with missing data?

2007-07-30 Thread Adam D. I. Kramer
Hello, I'm interested in running a PCA on a data set with lots of missing data. There're a few techniques online which suggest how I could go about doing this, but before I committed to coding them into R, I wanted to see whether anyone could recommend a currently existing package with

Re: [R] regular expressions : extracting numbers

2007-07-30 Thread jim holtman
Is this what you want: x [1] lema, rb 2% rb 2% rb 3% rb 4% rb 3% rb 2%,mineuse [7] rbrbrb 12 rb rj 30%rb [13] rbrb 25%rbrb rbrj, rb gsub([^0-9]*([0-9]*)[^0-9]*, \\1, x) [1] 2 2 3

Re: [R] how to combine data of several csv-files

2007-07-30 Thread Antje
okay, I played a bit around and now I have some kind of testcase for you: v1 - NA v2 - rnorm(6) v3 - rnorm(6) v4 - rnorm(6) v5 - rnorm(6) v6 - rnorm(6) v7 - rnorm(6) v8 - rnorm(6) v8 - NA list - list(v1,v2,v3,v4,v5,v6,v7,v8) categ - c(NA,cat1,cat1,cat1,cat2,cat2,cat2,NA) list [[1]] [1] NA

Re: [R] regular expressions : extracting numbers

2007-07-30 Thread Vladimir Eremeev
GOUACHE David wrote: Hello all, I have a vector of character strings, in which I have letters, numbers, and symbols. What I wish to do is obtain a vector of the same length with just the numbers. A quick example - extract of the original vector : lema, rb 2% rb 2% rb 3% rb 4% rb 3%

[R] array writing and their filenames

2007-07-30 Thread Dong GUO 郭东
Hi, I want to save a array (say, array[6,7,8]) write a cvs file. How can I do that??? can I write in one file? if I could not write in one file, i want to use a loop to save in different files (in the matrix[6,7,8], should be 8 csv files), such as the filename structure should be: file =filename

[R] Mapping data with unknown dimensions?

2007-07-30 Thread mister_bluesman
Hi. Does anyone know of a function in R which will allow me to map data points, where the number of dimensions in the data is unknown? Thanks -- View this message in context: http://www.nabble.com/Mapping-data-with-unknown-dimensions--tf4165241.html#a11850581 Sent from the R help mailing list

[R] R2WinBUGS more updates after model did not converge

2007-07-30 Thread toby909
After running a model for a while and seeing that it did not converge yet, how can I continue to run, ie not starting anew, the model? I know if I manually/interactively use winbugs, this is possible anytime, but how can I do this in r2winbugs, so that my existing sim$sims.array and other

Re: [R] regular expressions : extracting numbers

2007-07-30 Thread Christian Ritz
Dear David, does the following work for you? sVec - c(lema, rb 2%, rb 2%, rb 3%, rb 4%, rb 3%, rb 2%,mineuse, rb, rb, rb 12, rb, rj 30%, rb, rb, rb 25%, rb, rb, rb, rj, rb) reVec - regexpr([[:digit:]]+, sVec) # see ?regex for details on '[:digit:]' and '+' substr(sVec ,start = reVec,

[R] matrix output in R, and file name creating

2007-07-30 Thread Dong GUO 郭东
Hi, I want to save a matrix (say, matrix[6,7,8]) write a cvs file. How can I do that??? can I write in one file? if I could not write in one file, i want to use a loop to save in different files (in the matrix[6,7,8], should be 8 csv files), such as the filename structure should be: file

[R] line widths of plotting symbols in the lattice

2007-07-30 Thread Stephen Tucker
Dear List, Sorry, this is very simple but I can't seem to find any information regarding line widths of plotting symbols in the lattice package. For instance, in traditional graphics: plot(1:10,lwd=3) points(10:1,lwd=2,col=3) 'lwd' allows control of plotting symbol line widths. I've tried

Re: [R] plot

2007-07-30 Thread Dong GUO 郭东
Thanks again, Greg, It really helps. Would you please let me know more reference of plot in R? how to use the image function to create the grid??? Thanks much. Dong On 7/27/07, Greg Snow [EMAIL PROTECTED] wrote: Can you really see much of the data in a 26*31 3d barplot? It seems like most

[R] Prompt comes too late

2007-07-30 Thread Ralf Finne
Hi R fans I am trying to make a program to ask the user to choose data file: print(Choose data file please !) matr=read.table(file.choose(),dec=.,header=TRUE) The problem is that the prompt Choose data file please ! comes after I have chosen the file. What am doing wrong? Thanks in

[R] deriv; loop

2007-07-30 Thread francogrex
Hi, 2 questions: Question 1: example of what I currently do: for(i in 1:6){sink(temp.txt,append=TRUE) dput(i+0) sink()} x=scan(file=temp.txt) print(prod(x)) file.remove(C:/R-2.5.0/temp.txt) But how to convert the output of the loop to a vector that I can manipulate (by prod or sum etc),

[R] Order by the columns

2007-07-30 Thread Am Stat
Dear useR, I have a data matrix, it has n columns, each column is a two-level variable with entires -1 and +1. They are randomly generated, now I want to order them like (for example, 5 columns case) --- - - -- - -- . (first several rows are the samples

[R] write.csv

2007-07-30 Thread Dong GUO 郭东
Hi, I want to save an array(say, array[6,7,8]) write a cvs file. How can I do that??? can I write in one file? if I could not write in one file, i want to use a loop to save in different files (in the array[6,7,8], should be 8 csv files), such as the filename structure should be: file =filename

Re: [R] regular expressions : extracting numbers

2007-07-30 Thread Marc Schwartz
On Mon, 2007-07-30 at 13:58 +0200, GOUACHE David wrote: Hello all, I have a vector of character strings, in which I have letters, numbers, and symbols. What I wish to do is obtain a vector of the same length with just the numbers. A quick example - extract of the original vector : lema,

[R] Fwd: Package manual examples - 'unexpected$undefined' errors

2007-07-30 Thread David Pain
Bounced first time! -- Forwarded message -- From: David Pain [EMAIL PROTECTED] Date: 28-Jul-2007 11:03 Subject: Package manual examples - 'unexpected$undefined' errors To: r-help@stat.math.ethz.ch Trying out an unfamiliar package, the natural thing is to use the examples given

[R] Call R program from C++ code

2007-07-30 Thread Kisas
Hi All: I'm developing an application program using C++. From my C++ code, I would call some R program I have written. I' wondering if R provide some compiler that can compile R program into executable program. I searched R-help, there are a lot of posts talking about writing C++

[R] Problem with code

2007-07-30 Thread Shawndelle Noble
Hi I am having the following Warning message with this code: Error in file(file, r) : unable to open connection In addition: Warning message: cannot open file- reason 'No such file or directory' in: file(file, r) The files are present on a CD and USB key- I tried opening all the files-then

Re: [R] Call R program from C++ code

2007-07-30 Thread Dirk Eddelbuettel
On Sun, Jul 29, 2007 at 04:35:51PM -0400, Feng Qiu wrote: I'm developing an application program using C++. From my C++ code, I would call some R program I have written. I' wondering if R provide some compiler that can compile R program into executable program. I searched That

Re: [R] Call R program from C++ code

2007-07-30 Thread Dirk Eddelbuettel
On Sun, Jul 29, 2007 at 07:15:21PM -0400, Feng Qiu wrote: using the system() call -- but it is also the most tedious way as you When using System() to call R program, do I need to call some R script program or my R function directly? It's system() with lower-case s, and yes, you would call

[R] Constructing correlation matrices

2007-07-30 Thread Gregory Gentlemen
Greetings, I have a seemingly simple task which I have not been able to solve today and I checked all of the help archives on this and have been unable to find anything useful. I want to construct a symmetric matrix of arbtriray size w/o using loops. The following I thought would do it: p - 6

[R] install error for RBGL_1.12.0 on linux

2007-07-30 Thread xinan yang
Dear all, I meet error when installing the newest Bioconductor packages 2.0 for R 2.5.1. the enviroments are as bellow: sessionInfo() R version 2.5.1 (2007-06-27) i686-pc-linux-gnu locale:

[R] install error for RBGL_1.12.0 on linux ---2

2007-07-30 Thread xinan yang
Hi, Li and all lists, More, I have searched the web, and found one solution as described in: https://stat.ethz.ch/pipermail/bioc-devel/2007-June/001168.html But, My condition is some how different: 1) my g++ version is: g++ (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) 2) the SHLIB file is the

[R] Extract random part of summary nlme

2007-07-30 Thread Rense Nieuwenhuis
Dear helpers, I'm estimating multilevel regression models, using the lme-function from the nlme-package. Let's say that I estimated a model and stored it inside the object named 'model'. The summary of that model is shown below: Using summary(model)$tTable , I receive the following output:

[R] Tabs in PDF documents

2007-07-30 Thread Dennis Fisher
Colleagues, I am using R 2.5.1 on an Intel Mac (OS 10) to create PDF outputs using pdf(); same problem exists in Linux (RedHat 9) While adding text to the document with text() and mtext(), I encounter the following problem: In order to align the text, I have embedded tabs (\t) in some of

[R] A simple question about summary.glm

2007-07-30 Thread michal33
Hello, I am new to R and have tried to search similar questions but could not find exactly what I am looking for, but I apologize if the question was already asked. I have 10 different treatments and want to know whether they affect the sex ratios of insect emergence. After running the glms I

Re: [R] ROC curve in R

2007-07-30 Thread Rithesh M. Mohan
Thanks Gaurav, I'll try this and get back to you. Rithesh M Mohan From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, July 30, 2007 6:01 PM To: Rithesh M. Mohan Cc: r-help@stat.math.ethz.ch Subject: RE: [R] ROC curve in R Hi Ritesh,

Re: [R] ROC curve in R

2007-07-30 Thread gyadav
Hi Ritesh, what i understad of ROC analysis will be coming in other mail :) excellent introduction can be found at http://www.csee.usf.edu/~candamo/site/papers/ROCintro.pdf http://rocr.bioinf.mpi-sb.mpg.de/ take this zip file :) http://rocr.bioinf.mpi-sb.mpg.de/ROCR_1.0-2.zip also ROCR and

Re: [R] how to combine data of several csv-files

2007-07-30 Thread niederlein-rstat
okay, I played a bit around and now I have some kind of testcase for you: v1 - NA v2 - rnorm(6) v3 - rnorm(6) v4 - rnorm(6) v5 - rnorm(6) v6 - rnorm(6) v7 - rnorm(6) v8 - rnorm(6) v8 - NA list - list(v1,v2,v3,v4,v5,v6,v7,v8) categ - c(NA,cat1,cat1,cat1,cat2,cat2,cat2,NA) list [[1]] [1] NA

[R] Extracting random parameters from summary lme

2007-07-30 Thread Rense Nieuwenhuis
LS, I'm estimating multilevel regression models, using the lme-function from the nlme-package. Let's say that I estimated a model and stored it inside the object named 'model'. The summary of that model is shown below: Using summary(model)$tTable , I receive the following output:

Re: [R] getting the name of variables passed to a function

2007-07-30 Thread Marc Schwartz
On Fri, 2007-07-27 at 09:52 -0700, Horace Tso wrote: Folks, I've entered into an R programming territory I'm not very familiar with, thus this probably very elementary question concerning the mechanic of a function call. I want to know from within a function the name of the variables I

Re: [R] getting the name of variables passed to a function

2007-07-30 Thread Prof Brian Ripley
I would start from match.call(expand.dots=TRUE) which has done the hard work for you. On Fri, 27 Jul 2007, Horace Tso wrote: Folks, I've entered into an R programming territory I'm not very familiar with, thus this probably very elementary question concerning the mechanic of a function

Re: [R] regular expressions : extracting numbers

2007-07-30 Thread Gabor Grothendieck
I assume if you want the components to be NA then you really intend the result to be a numeric vector. The following replaces all non-digits with (thereby removing them) and then uses as.numeric to convert the result to numeric. Just omit the conversion if you want a character vector result:

Re: [R] regular expressions : extracting numbers

2007-07-30 Thread Jacques VESLOT
gsub( , , gsub(%, , gsub([a-z], , c(tr3,jh40%qs dqd [1] 3 40 Jacques VESLOT INRA - Biostatistique Processus Spatiaux Site Agroparc 84914 Avignon Cedex 9, France Tel: +33 (0) 4 32 72 21 58 Fax: +33 (0) 4 32 72 21 84 GOUACHE David a écrit : Hello all, I have a vector of character

Re: [R] regular expressions : extracting numbers

2007-07-30 Thread Kuhn, Max
This might work: numOnly - function(x) gsub([^0-9], , x) numOnly(lema, rb 2%) [1] 2 numOnly(rb) [1] Max -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of GOUACHE David Sent: Monday, July 30, 2007 7:59 AM To: r-help@stat.math.ethz.ch Subject: [R]

[R] problems saving and loading (PLMset) objects

2007-07-30 Thread Quin Wills
Hi I'm running the latest R on a presumably up to date Linux server. 'Doing something silly I'm sure, but can't see why my saved PLMset objects come out all wrong. To use an example: Setting up an example PLMset (I have the same problem no matter what example I use) library(affyPLM)

Re: [R] Slightly OT - use of R

2007-07-30 Thread Martin Maechler
BDR == Prof Brian Ripley [EMAIL PROTECTED] on Mon, 30 Jul 2007 11:13:47 +0100 (BST) writes: BDR On Mon, 30 Jul 2007, [EMAIL PROTECTED] wrote: On 30-Jul-07 08:28:15, John Logsdon wrote: I am trying to get a measure of how R compares in usage as a statistical platform

Re: [R] Package manual examples - 'unexpected$undefined' errors

2007-07-30 Thread Duncan Murdoch
David Pain wrote: Trying out an unfamiliar package, the natural thing is to use the examples given in the package's manual - hopefully, the writers of the package wouldn't include examples which didn't work! Recently, though, I've been getting 'unexpected$undefined' error messages when doing

[R] Odp: data order by different level of variables

2007-07-30 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 28.07.2007 02:18:33: Dear useR, I have a data matrix, it has n columns, each column is a two-level variable with entires -1 and +1. They are randomly generated, now I want to order them like (for example, 5 columns case) --- - - -- - -

Re: [R] Matrix Multiplication, Floating-Point, etc.

2007-07-30 Thread Doran, Harold
This is giving you exactly what you are asking for. The operator * does element by element multiplication. So, .48 + -.48 =0, right? Is there another mathematical possibility you were expecting? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

  1   2   >