[R] suggestions for debugging problem with a package

2012-03-13 Thread Daniel Nordlund
I am trying to resolve a problem I am having with running the rattle package on two different Windows 7 x64 systems. It appears to be a problem with my two specific systems, because others on Windows 7 x64 systems aren't complaining about this problem. What I am looking for is a method for

[R] gplots packages does not work

2012-03-13 Thread Fernando Pistón
I had installed de gplots package and then I loaded the library but the package did not work. I recieved a message like this: install.packages(gplots, dependencies = TRUE) Installing package(s) into ‘/home/fpiston/R/x86_64-pc-linux-gnu-library/2.14’ (as ‘lib’ is unspecified) --- Please select a

Re: [R] gplots packages does not work

2012-03-13 Thread Steve Lianoglou
Hi, It does work -- it seems like that at some point you've upgraded your R packages in an incorrect manner. Specifically, it looks as if you've installed a new version of R and just copied over libraries from a previous (pre R-2.10.x) version. Look at this error message during the install: On

Re: [R] gplots packages does not work

2012-03-13 Thread Steve Lianoglou
Hi Fernando, 2012/3/13 Fernando Pistón Pistón fpis...@ias.csic.es: Hi Steve, The suggestion of Pacal worked ok, Do you think it is neccesary to update.packages? Can I update.packages although the gplots work ok? I don't see Pascal's suggestion, so I guess I don't know what you did (maybe

[R] how to write crossed and nested random effects in a model

2012-03-13 Thread Niroshan
Dear R Users, I have a question based on my research. I am analyzing reader-based diagnostic data set. My study involves diabetic patients who were evaluated for treatable diabetic retinopathy based on the presence or absence of two pathologies in their eyes. Pathologies were identified using

[R] Re : gplots packages does not work

2012-03-13 Thread Pascal Oettli
Hi Fernando, You have to reinstall package 'bitops' too. Regards, Pascal - Mail original - De : Fernando Pistón fpis...@gmail.com À : r-help@r-project.org Cc : Envoyé le : Mardi 13 mars 2012 16h10 Objet : [R] gplots packages does not work I had installed de gplots package and then I

Re: [R] Re : gplots packages does not work

2012-03-13 Thread Fernando Pistón Pistón
Hi Pascal, Your suggestion work perfectly. I just install de bitops package and the gplots library work ok. Thanks On Tue, Mar 13, 2012 at 8:24 AM, Pascal Oettli kri...@ymail.com wrote: Hi Fernando, You have to reinstall package 'bitops' too. Regards, Pascal - Mail original

Re: [R] gplots packages does not work

2012-03-13 Thread Fernando Pistón Pistón
Hi Steve, The suggestion of Pacal worked ok, Do you think it is neccesary to update.packages? Can I update.packages although the gplots work ok? On Tue, Mar 13, 2012 at 8:38 AM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: Hi, It does work -- it seems like that at some point

[R] Re : gplots packages does not work

2012-03-13 Thread Pascal Oettli
Hi Fernando, To me, it is a good idea to regularly check the availability of update for installed packages, using 'update.packages()'. Regards, Pascal - Mail original - De : Fernando Pistón Pistón fpis...@ias.csic.es À : Steve Lianoglou mailinglist.honey...@gmail.com Cc :

[R] simulate an gradually increase of the number of subjects based on two variables

2012-03-13 Thread guillaume chaumet
Dear R list, I have a population with two groups. I want to simulate an gradually increase of the number of subjects for group 1 based on mean and sd of two variables (correlated). Bootstrap ? Sample ? Simulation ? ( I just search some clues. Thank you Guillaume [[alternative HTML

Re: [R] Re : gplots packages does not work

2012-03-13 Thread Prof Brian Ripley
On 13/03/2012 08:33, Pascal Oettli wrote: Hi Fernando, To me, it is a good idea to regularly check the availability of update for installed packages, using 'update.packages()'. Specifically, update.packages(checkBuilt=TRUE) to overcome the wrong-R-version issue (although the package

[R] Manipulate strings reordering some elements

2012-03-13 Thread Igor Sosa Mayor
Hi R-Users, I want to manipulate some strings in the following way. I have the following vector with spanish municipalities: municipios-c(Allande, Aller, Amieva, Avilés, Belmonte de Miranda, Degaña, Franco (El), Gijón, Gozón, Grado, Grandas de Salime, Quirós, Regueras (Las), Ribadedeva,

[R] customizing help, how to replace r.css of all packages

2012-03-13 Thread SNV Krishna
Hi All, I would like to replace default r.css that is found in C:\Program Files\R\R-2.14.2\doc\html and C:\Program Files\R\R-2.14.2\library\package name\html with a custom r.css file. I have some 71 packages installed and want to replace r.css across all packages. Windows explorer can

Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Igor Sosa Mayor
I have to add some clarification: there are ONLY 4 articles (el,la,los,las) and the structure is always the same: NAMEOFMUNICIPALITY (El) NAMEOFMUNICIPALITY (La) etc. On Tue, Mar 13, 2012 at 10:42:54AM +0100, Igor Sosa Mayor wrote: Hi R-Users, I want to manipulate some strings in the

Re: [R] How to add/draw a persp3d graph to a plot with an existing surface/graph

2012-03-13 Thread Duncan Murdoch
On 12-03-12 5:45 PM, Michael wrote: Dear R users, I have been trying to draw the following 3d graphs: The solid region bounded above by the paraboloid z = 9 - x2 - y2 and below by the unit circle in the xy-plane. I wanted to visualize the solid region bounded by those two graphs. I could draw

Re: [R] 2 images on one plot

2012-03-13 Thread Jim Lemon
On 03/13/2012 03:07 AM, Petr PIKAL wrote: Dear all with image I can plot only one set of values in one plot. Do somebody have any insight how to put those 2 matrices into one picture so that in one cell in image picture are both values from mat[1,1] and mat2[1,1]. mat-matrix(1:4, 2,2)

Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Berend Hasselman
On 13-03-2012, at 10:42, Igor Sosa Mayor wrote: Hi R-Users, I want to manipulate some strings in the following way. I have the following vector with spanish municipalities: municipios-c(Allande, Aller, Amieva, Avilés, Belmonte de Miranda, Degaña, Franco (El), Gijón, Gozón, Grado,

Re: [R] 2 images on one plot

2012-03-13 Thread Petr PIKAL
Thanks Jim For the first glance it seems to do what I want. I must go through it more thoroughly. Petr On 03/13/2012 03:07 AM, Petr PIKAL wrote: Dear all with image I can plot only one set of values in one plot. Do somebody have any insight how to put those 2 matrices into one

Re: [R] customizing help, how to replace r.css of all packages

2012-03-13 Thread Joshua Wiley
Hi, Probably yes, but I think this would be more easily handled through the command prompt or some shell. On the command prompt, I would look at xcopy. xcopy /? will show the arguments available. You will need to do a bit of work to get a list of all the directories to copy your r.css file

Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Igor Sosa Mayor
many thanks, Berend. It works well... but with a problem because i was not completely clear in my first email. It works with cases such as: Franco (El) Regueras (Las) but not with other cases such as: Fauces de San Andrés (Las) any hints? or meaybe if it is very complicated, any short

Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Berend Hasselman
On 13-03-2012, at 11:28, Igor Sosa Mayor wrote: many thanks, Berend. It works well... but with a problem because i was not completely clear in my first email. It works with cases such as: Franco (El) Regueras (Las) but not with other cases such as: Fauces de San Andrés (Las) any

Re: [R] Manipulate strings reordering some elements

2012-03-13 Thread Igor Sosa Mayor
Berend: 1. 1000 thanks for your help. It works perfectly 2. many thanks for the analysis of the expression; i will try to understand it. Perl is really not easy to read thanks again! On Tue, Mar 13, 2012 at 11:51:49AM +0100, Berend Hasselman wrote: On 13-03-2012, at 11:28, Igor Sosa Mayor

[R] File data to data.frame

2012-03-13 Thread b4d
Hi, I am playing around with some data and I would like to get data that is stored in a file like this: test.php GET username=user password=pass test.php GET username=user1 password=pass1 ... to the data.frame structure, how can I do that directly in R, currently I am doing parse with bash,

[R] Matrix Results

2012-03-13 Thread RMSOPS
Hello I am developing a small program that to calculate the maximum, minimum and average. The data.frame v is POS DIF 4 - 4 56 4 - 3 61 3 - 3 300 3 - 327 3 - 3 33 3 - 3 87 3 - 4 49 4 - 4 71 4 - 3 121 3 - 4 138 4 - 3 15

Re: [R] Help with plot Grouped Bar Plot by using R

2012-03-13 Thread R_beginner_starter
Hi, Jim Below is the code that I try and the result I obtained: *br-read.table(R_beginner_starter.dat,header=TRUE,sep=\t) library(plotrix) barp(t(br[,c(2,4)])) * The result generated: http://r.789695.n4.nabble.com/file/n4468592/ScreenHunter_01_Mar._13_17.10.jpg Which is different with my

[R] size of graphs when using multiple figures by row

2012-03-13 Thread Nerak
Hi all, I have a basic question concerning graphs in R. I’m using the par() function and I’m working with multiple figures by row (mfrow) but my the hight of my figures become compressed. I have 4 rows and 2 columns (because I want to plot 8 histograms (freq = FALSE ) on it. I know I can adapt my

[R] replacing values in Array

2012-03-13 Thread uday
I want to replace some values in my Array e.g data- c(1,2,3,4,5,6,7,8,9,10,11,12) I would like to replace 1,2,3 by 1 , 4,5,6 by 2, 7,8,9 by 3 and 10,11,12 by 4 I am expecting out put data- 1 1 1 2 2 2 3 3 3 4 4 4 I have tried replace function replace(data, (data==1 |data==2| data==3),1)

[R] sort list

2012-03-13 Thread sybil kennelly
Hello can anyone help please? i read two words cell1, cell2 into a list. I want to turn this list into a factor. cell_data -list(c('cell1','cell2')) cell_data [[1]] [1] cell1 cell2 factor_list - factor(cell_data) Error in sort.list(y) : 'x' must be atomic for 'sort.list' Have you called

[R] Definition of generic function for subclasses

2012-03-13 Thread Alexander
Hi, I am working on a project, which contains S4 classes and subclasses. Lets assume the following organisation: A: S4 Class B,C: inherit from A D,E,F,G: inherit from B H,I: inherit from C I want to define now a generic function, which returns me the name of the class. I can now write the

Re: [R] Matrix Results

2012-03-13 Thread Petr PIKAL
Hi Hello I am developing a small program that to calculate the maximum, minimum and average. The data.frame v is POS DIF 4 - 4 56 4 - 3 61 3 - 3 300 3 - 327 3 - 3 33 3 - 3 87 3 - 4 49 4 - 4 71 4 - 3 121 3 -

Re: [R] sort list

2012-03-13 Thread Joshua Wiley
Hi Sybil, You cannot turn a list into a factor. You could do: cell_data -c('cell1','cell2') factor_list - factor(cell_data) or if you already have a list, unlist() or as.vector() may convert it into a vector that you can then convert to a factor. Cheers, Josh On Tue, Mar 13, 2012 at 4:29

Re: [R] replacing values in Array

2012-03-13 Thread Gerrit Eichner
Hello, uday, e.g., (data - 1) %/% 3 + 1 would do the job in your very specific situation, but take a look at ?findInterval for possibly more interesting (because more general) solutions. Hth -- Gerrit On Tue, 13 Mar 2012, uday wrote: I want to replace some values in my Array e.g data-

Re: [R] sort list

2012-03-13 Thread Joshua Wiley
On Tue, Mar 13, 2012 at 5:15 AM, sybil kennelly sybilkenne...@gmail.com wrote: Thanks Josh. I'm quite new, just wondering re:factor levels? In this example (shamelessly stolen from the internet): schtyp [1] 0 0 1 0 0 0 1 0 1 0 1 1 1 1 0 0 1 1 1 0 schtyp.f - factor(schtyp, labels =

Re: [R] File data to data.frame

2012-03-13 Thread jim holtman
try this: x - readLines(textConnection(test.php + GET + username=user + password=pass + + test.php + GET + username=user1 + password=pass1 + )) closeAllConnections() # process parse the data for (i in x){ + if (grepl(^username, i)) username - sub(.*=(.*), '\\1', i) + if

[R] Coding C++ in R. What is faster : Using bosst external libraries or R.h header file?

2012-03-13 Thread Ian Schiller
Hi everyone, I have built an R package and for the sake of speed I have decided to rewrite some part of the code in C++. In my original R code I use the pnorm, qnorm, rnorm, pgamma, dgamma, rgamma, rbeta and runif function. First I was thinking in going with the boost libraries, but I

Re: [R] Definition of generic function for subclasses

2012-03-13 Thread Martin Morgan
On 03/13/2012 04:34 AM, Alexander wrote: Hi, I am working on a project, which contains S4 classes and subclasses. Lets assume the following organisation: A: S4 Class B,C: inherit from A D,E,F,G: inherit from B H,I: inherit from C I want to define now a generic function, which returns me the

Re: [R] Matrix Results

2012-03-13 Thread jim holtman
Try this: require(sqldf) x - read.fwf(textConnection(4 - 4 56 + 4 - 3 61 + 3 - 3 300 + 3 - 327 + 3 - 3 33 + 3 - 3 87 + 3 - 4 49 + 4 - 4 71 + 4 - 3 121 + 3 - 4 138 + 4 - 3 15), width = c(7,8) , header = FALSE, as.is = TRUE)

Re: [R] Coding C++ in R. What is faster : Using bosst external libraries or R.h header file?

2012-03-13 Thread R. Michael Weylandt
There will be ever-so-slight performance differences due to implementation differences (I believe R's functions are just a hair slower because they are more exact -- though that may be a comparison with GSL I'm thinking of), but my advice would be to use the RNGs that come with R. They are the

Re: [R] Coding C++ in R. What is faster : Using bosst external libraries or R.h header file?

2012-03-13 Thread Ian Schiller
Thank you Michael, Your advices are truly appreciated! Ian -Original Message- From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com] Sent: 13 mars 2012 09:44 To: Ian Schiller Cc: r-help@r-project.org Subject: Re: [R] Coding C++ in R. What is faster : Using bosst external

[R] Visualising multiple response contingency tables

2012-03-13 Thread Marcos Pelenur
Dear R Help Community, I have a question and an answer (based on reading this forum and online research), but I though I should share both since probably there's a much better way to go about my solution. My question is specifically about how to best visualise multiple response contingency

[R] Matrix Counts

2012-03-13 Thread RMSOPS
I have next table source destine 33 77 6 6 3 4 4 4 4 3 3 3 3 3 3 3 3 3 3 4 4 4 4 3 3 4 4 3 I'm trying to create an array with the number of occurrences between the source and destination.

Re: [R] Matrix Results

2012-03-13 Thread RMSOPS
Hello is the dataset that was sent to help, has over two columns the source and destination, is the separation of position pos POS DIF SourceDest 4 - 4 56 4 4 4 - 3 61 4 3 3 - 3 300 3 3 3 -

[R] Matrix Another table

2012-03-13 Thread RMSOPS
I have next table source destine 3 3 7 7 6 6 3 4 4 4 4 3 3 3 3 3 3 3 3 3 3 4 4 4 4 3 3 4 4 3 I'm trying to create an array with the number of occurrences between the source and destination. id_ap-levels(factor(df$v_source)) num_AP-length(levels(factor(df$v_source)))

[R] Using caegorical variables in package randomForest.

2012-03-13 Thread abhishek
Hello, I am sorry if there are already post that answers to this question but i tried to find them before making this post. I did not really find relevant posts. I am using randomForest package for building a two class classifier. There are categorical variables and numerical variables in my

[R] To generate a pmml for an hclust object, showing the error Error in .Internal(inherits(x, what, which)) : 'x' is missing

2012-03-13 Thread Yashwanth M.R
# # ## Iris data ## data(iris)

[R] Sum results in a matrix

2012-03-13 Thread RMSOPS
Hello, With the following code get the results array res3-table(df$v_source,df$v_destine) 1 2 3 4 5 6 7 1 0 10 0 0 0 0 0 2 11 0 0 0 0 0 0 3 0 0 18 15 0 0 0 4 0 0 15 11 0 0 0 5 0 0 0 0 1 0 0 6 0 0 0 0 0 1 0 7 0 0 0 0 0 0 18 my

Re: [R] sort list

2012-03-13 Thread sybil kennelly
Thanks Josh. I'm quite new, just wondering re:factor levels? In this example (shamelessly stolen from the internet): *schtyp* [1] 0 0 1 0 0 0 1 0 1 0 1 1 1 1 0 0 1 1 1 0 *schtyp.f - factor(schtyp, labels = c(private, public)) schtyp.f* [1] private private public private private private

[R] Standard errors GLM

2012-03-13 Thread D_Tomas
Dear userRs, when applied the summary function to a glm fit (e.g Poisson) the parameter table provides the categorical variables assuming that the first level estimate (in alphabetical order) is 0. What is the standard error for that variable then? Are the standard errors calculated assuming

Re: [R] Definition of generic function for subclasses

2012-03-13 Thread Alexander
The definition of simple in Keep your class hierarchy simple and relevant to your actual problem is quite difficult. For someone who has programmed the classes etc, it is quite simple to understand the heritance. But for example for someone else, who has to maintain the code and the classes, it

[R] p-value of the pooled Z score

2012-03-13 Thread cheba meier
Hello, I have to compute the pooled z-value and I would like to know which way is more appropriate b - c( -0.205,1.040,0.087) s - c(0.449,0.167,0.241) n - c(310, 342, 348) z - b/s Z - sum(z)/sqrt(length(n)) P - 2*(1-pnorm(abs(Z))) P w - sqrt(n) Zw - sum(w * z)/sqrt(sum(w^2)) Pw - 1 -

[R] R-help-es have reached 500 members!

2012-03-13 Thread Kjetil Halvorsen
This posting is only to celebrate that R-help-es (R-help for Spanish Speakers) have reached 500 members! (and to thank Patricia for doing the bulk of admin work). Kjetil __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Standard errors GLM

2012-03-13 Thread Joshua Wiley
Hi, See inline. On Tue, Mar 13, 2012 at 6:38 AM, D_Tomas tomasm...@hotmail.com wrote: Dear userRs, when applied the summary function to a glm fit (e.g Poisson) the parameter table provides the categorical variables assuming that the first level estimate (in alphabetical order) is 0. What

Re: [R] Matrix Another table

2012-03-13 Thread Sarah Goslee
Hi, On Tue, Mar 13, 2012 at 7:51 AM, RMSOPS ricardosousa2...@clix.pt wrote: I have next table source destine 3 3 7 7 6 6 3 4  4 4  4 3 3 3 3 3  3 3  3 3 3 4  4 4  4 3  3 4  4 3 It is so much easier if you use dput to provide reproducible data, as the posting guide asks. There's

Re: [R] Standard errors GLM

2012-03-13 Thread David Winsemius
On Mar 13, 2012, at 9:38 AM, D_Tomas wrote: Dear userRs, when applied the summary function to a glm fit (e.g Poisson) the parameter table provides the categorical variables assuming that the first level estimate (in alphabetical order) is 0. Not really. It returns an estimate for the

[R] ROC Analysis

2012-03-13 Thread Camille Leclerc
Hi everybody, I have a data set with a value and a status (positive or negative case) and I want make a ROC Analysis. So, with ROCR Package, I have got the ROC curve (True Positive Fraction [tpf] according 1-True Negative Fraction [1-tnf]). http://r.789695.n4.nabble.com/file/n4469203/01.png

Re: [R] Matrix Results

2012-03-13 Thread RMSOPS
Hello Error: could not find function sqldf: Hello, I'm using R Studio, and installed the option of installing the packages sqldbf function. But When I run the code give the next error. install.packages(sqldf) library(RSQLite) require(sqldf) x - read.fwf(textConnection(4 - 4 56 + 4

[R] how to find best model of time series?

2012-03-13 Thread sagarnikam123
i have data in one file below like (i have such type of file =200,each file have below type of data) t -0.15264004 0.056076439 -0.07276116 -0.00917326 -0.02069089 -0.00416232 -0.07225855 -0.02654577 -0.06131410 -0.09380202 0.057414014 -0.05239976 0.014397612 0.016145161 -0.00670587 0.018696335

Re: [R] Matrix Another table

2012-03-13 Thread RMSOPS
Hello, this solve my problem. table(testdata$source, testdata$destine) Thanks -- View this message in context: http://r.789695.n4.nabble.com/Re-Matrix-Another-table-tp4469376p4469384.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Standard errors GLM

2012-03-13 Thread Rubén Roa
You have a conceptual problem, as pointed out by previous helpers. You don't have a standard error for the first level of your categorical variable because that level's effect is not estimated. It is being used as a reference level against which the other levels of that categorical variable are

Re: [R] R-help-es have reached 500 members!

2012-03-13 Thread Igor Sosa Mayor
:) congratulations! On Tue, Mar 13, 2012 at 08:59:56AM -0600, Kjetil Halvorsen wrote: This posting is only to celebrate that R-help-es (R-help for Spanish Speakers) have reached 500 members! (and to thank Patricia for doing the bulk of admin work). Kjetil

[R] Error subscript out of bounds

2012-03-13 Thread Houhou Li
Hello, R-users,   I have a datafile with 37313 records and each record has 5 different measurements on the same variables. The format looks like this: treeID, VIG0, VIG1, VIG2, VIG3, VIG4 I was trying to convert the one row record to 5 rows record with format like this (treeID, MEASUREMENT,

[R] Converting factor data into Date-time format

2012-03-13 Thread Haojie Yan
Dear R-user, I have read a dataset from .csv file into R. This dataset includes one column containing some data in 'date and time' format, e.g. 'dd/mm/ hh:mm'. These data were automatically read and saved as 'factor' in R. When I was trying to produce some plots (such as time series) with

Re: [R] Converting factor data into Date-time format

2012-03-13 Thread R. Michael Weylandt
as.POSIXct(as.character(FACTORHERE), format = %d/%m/%Y %H:%M) Michael On Tue, Mar 13, 2012 at 12:20 PM, Haojie Yan yhj...@googlemail.com wrote: Dear R-user, I have read a dataset from .csv file into R. This dataset includes one column containing some data in 'date and time' format, e.g.

Re: [R] Sum results in a matrix

2012-03-13 Thread R. Michael Weylandt
res3 + t(res3) Michael On Tue, Mar 13, 2012 at 8:15 AM, RMSOPS ricardosousa2...@clix.pt wrote: Hello,     With the following code get the results array res3-table(df$v_source,df$v_destine)  1  2  3  4  5  6  7  1  0 10  0  0  0  0  0  2 11  0  0  0  0  0  0  3  0  0 18 15  0  0  0  4  0

Re: [R] how to find best model of time series?

2012-03-13 Thread R. Michael Weylandt
Take a look at example(HoltWinters) Michael On Tue, Mar 13, 2012 at 11:06 AM, sagarnikam123 sagarnikam...@gmail.com wrote: i have data in one file below like   (i have such type of file =200,each file have below type of data) t -0.15264004 0.056076439 -0.07276116 -0.00917326 -0.02069089

Re: [R] Faceted bar plot shows wrong counts (ggplot2)

2012-03-13 Thread Helios de Rosario
Michael, Thanks for the pointer to the discussion in the ggplot list. It seems that the reason of this behaviour of facet_grid() is already known and being discussed by the developers of ggplot2. facet_grid() reduces the original data frame with unique() before applying the stats. If the data

Re: [R] Error subscript out of bounds

2012-03-13 Thread David Winsemius
On Mar 13, 2012, at 12:18 PM, Houhou Li wrote: Hello, R-users, I have a datafile with 37313 records and each record has 5 different measurements on the same variables. The format looks like this: treeID, VIG0, VIG1, VIG2, VIG3, VIG4 I was trying to convert the one row record to 5 rows

Re: [R] Converting factor data into Date-time format

2012-03-13 Thread Joshua Wiley
This is just a little comment to supplement Michael's excellent solution. If there are even a few (e.g., 5 each) repeated values, this: as.POSIXct(as.character(levels(x)), format = %d/%m/%Y %H:%M)[x] will be substantially faster, with the speed gains strongly associated with the number of

Re: [R] Converting factor data into Date-time format

2012-03-13 Thread Gabor Grothendieck
On Tue, Mar 13, 2012 at 12:20 PM, Haojie Yan yhj...@googlemail.com wrote: Dear R-user, I have read a dataset from .csv file into R. This dataset includes one column containing some data in 'date and time' format, e.g. 'dd/mm/ hh:mm'. These data were automatically read and saved as

[R] beginner's loop issue

2012-03-13 Thread aledanda
Dear All, I hope you don't mind helping me with this small issue. I haven't been using R in years and I'm trying to fill in a matrix with the output of a function (I'm probably using the Matlab logic here and it's not working). Here is my code: for (i in 1:length(input)){ out[i,1:3] -

[R] reproducible sample() in mclapply

2012-03-13 Thread Lik Wee Lee
Hi, Using the multicore package and calling sample() in mclapply, how do I get the results to be reproducible? I know the random number is seeded by process id and so is different for each run. Thanks, Lik [[alternative HTML version deleted]]

Re: [R] beginner's loop issue

2012-03-13 Thread R. Michael Weylandt
Yes, the short answer is that you need to define out before running the loop. The most effective way to do so will be to set up a matrix with the exact right dimensions (if you know them up front); something like out - matrix(NA, nrow = length(input), ncol = 9) Michael On Tue, Mar 13, 2012 at

Re: [R] Converting factor data into Date-time format

2012-03-13 Thread R. Michael Weylandt
Just a little typo: see below. On Tue, Mar 13, 2012 at 1:00 PM, Haojie Yan yhj...@googlemail.com wrote: Dear Michael, Thanks a lot for your hints. I have just had a try as below but still got back some error messages as shown: The object containing the 'date_time' data is named

Re: [R] Error subscript out of bounds

2012-03-13 Thread Houhou Li
Thank you very much David. I should realize myslef that operator precedence cause the problem. Sorry about this:-) I solved the problem. --- On Tue, 3/13/12, David Winsemius dwinsem...@comcast.net wrote: From: David Winsemius dwinsem...@comcast.net Subject: Re: [R] Error subscript out of

Re: [R] what does rlm do if it fails to converge within iteration limits?

2012-03-13 Thread Martin Maechler
Michael comtech@gmail.com on Mon, 12 Mar 2012 13:19:19 -0500 writes: The problem is: by default shouldn't it use Huber's? And it should be convex problem no? so when I do rlm(y~x) which is a single-beta fitting problem, shouldn't it always converge? “In theory,

Re: [R] reproducible sample() in mclapply

2012-03-13 Thread Berend Hasselman
On 13-03-2012, at 17:51, Lik Wee Lee wrote: Hi, Using the multicore package and calling sample() in mclapply, how do I get the results to be reproducible? I know the random number is seeded by process id and so is different for each run. Don't know about those two packages. Have a look

Re: [R] reproducible sample() in mclapply

2012-03-13 Thread David Winsemius
On Mar 13, 2012, at 12:51 PM, Lik Wee Lee wrote: Hi, Using the multicore package and calling sample() in mclapply, how do I get the results to be reproducible? I know the random number is seeded by process id and so is different for each run. You might want to look up the thread in last

[R] Error : package is not installed for 'arch=x64'

2012-03-13 Thread Li, Yan
HI All, I got the error : package is not installed for 'arch=x64' when building my own package for 64bit R. How can I configure the arch ? The 'R CMD config' does not work. Thank you very much! The detailed error is : ** testing if installed package can be loaded Error : package 'xxx' is not

Re: [R] Converting factor data into Date-time format

2012-03-13 Thread R. Michael Weylandt
No problem. A pro-tip for future posts: the dput() function creates a plain text representation of the data in question which is great for email and is nicely copy-and-pasteable. It wasn't so much a thing here, but for large or complicated data sets, the regular console printout doesn't always

[R] ess-tracebug to open a file

2012-03-13 Thread Feng Li
Dear all, First I would like to thank the ESS people's all the hard work. I am watching the project closely and witnessing the improvements day by day. Besides I found a strange situation using `ess-tracebug'. Please tell me if I am wrong or this is a bug. Start Emacs with emacs -Q and

Re: [R] simulate an gradually increase of the number of subjects based on two variables

2012-03-13 Thread guillaume chaumet
I omit to precise that I already try to generate data based on the mean and sd of two variables. x=rnorm(20,1,5)+1:20 y=rnorm(20,1,7)+41:60 simu-function(x,y,n) { simu=vector(list,length=n) for(i in 1:n) { x=c(x,rnorm(1,mean(x),sd(x))) y=c(y,rnorm(1,mean(y),sd(y)))

Re: [R] Idea/package to linearize a curve along the diagonal?

2012-03-13 Thread Emmanuel Levy
Dear David and Jeff, Only if you were going apply some sort of transformation that did not extend globally Exactly, this is why the LPCM package is great, as it assigns points to parts of a curve. I think I pretty much got what I need - it is not perfect yet but it should be enough to give

Re: [R] p-value of the pooled Z score

2012-03-13 Thread Thomas Lumley
On Wed, Mar 14, 2012 at 3:41 AM, cheba meier cheba.me...@googlemail.com wrote: Hello, I have to compute the pooled z-value and I would like to know which way is more appropriate b - c( -0.205,1.040,0.087) s - c(0.449,0.167,0.241) n - c(310, 342, 348) z - b/s Z - sum(z)/sqrt(length(n))

[R] filter out some gene sets

2012-03-13 Thread elodie
I am working on the following database of gene sets. database-GSA.read.gmt( C:/c5.all.v2.5.symbols.gmt) I need to filter out the gene sets that contain less than 5 genes or more than 200 genes. I would appreciate help with that matter. Thanks in advance [[alternative HTML version

[R] reshaping a dataset for a network

2012-03-13 Thread Marco Guerzoni
dear all, apologizes for bothering with a probably stupid question but I really don' t know how to proceed. I have a dataset which look like df a - c(1,2,3,4,4,4,5,5) b - c(11,7,4,9,8,3,12,4) df -cbind(a,b) I would like to have one which looks like this: a 1 11 2 7 3 4 4 9 8 3 5 12 4 a are

Re: [R] reshaping a dataset for a network

2012-03-13 Thread William Dunlap
Is the following what you want? a - c(1,2,3,4,4,4,5,5) b - c(11,7,4,9,8,3,12,4) split(b, a) $1 [1] 11 $2 [1] 7 $3 [1] 4 $4 [1] 9 8 3 $5 [1] 12 4 Note that your df-cbind(a,b) produces a matrix, not the data.frame that your df suggests you want. Use

Re: [R] Using caegorical variables in package randomForest.

2012-03-13 Thread Liaw, Andy
The way to represent categorical variables is with factors. See ?factor. randomForest() will handle factors appropriately, as most modeling functions in R. Andy -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of abhishek

Re: [R] simulate an gradually increase of the number of subjects based on two variables

2012-03-13 Thread Paul Johnson
Suggestion below: On Tue, Mar 13, 2012 at 1:24 PM, guillaume chaumet guillaumechau...@gmail.com wrote: I omit to precise that I already try to generate data based on the mean and sd of two variables. x=rnorm(20,1,5)+1:20 y=rnorm(20,1,7)+41:60 simu-function(x,y,n) {    

Re: [R] size of graphs when using multiple figures by row

2012-03-13 Thread Jean V Adams
Personally, I find it easier to fix the overall size of the page and modify the margins in line size (mar and oma rather than mai and omi), until I get the plots the way I want them. You don't specify what OS you're using, but in windows, I would use something like windows(h=16, w=9)

Re: [R] beginner's loop issue

2012-03-13 Thread Paul Johnson
On Tue, Mar 13, 2012 at 11:27 AM, aledanda danda.ga...@gmail.com wrote: Dear All, I hope you don't mind helping me with this small issue. I haven't been using R in years and I'm trying to fill in a matrix with the output of a function (I'm probably using the Matlab logic here and it's not

[R] 3D Black-Scholes Graph Help!

2012-03-13 Thread Anna Dunietz
Hello all! I would like to create a 3d plot, with the option price explained by the underlying price and time. Unfortunately, I can't quite get it to work. I would very much appreciate your help! Thanks, Anna # Black-Scholes Option Graph library(lattice) blackscholes - function(s, k,

Re: [R] 3D Black-Scholes Graph Help!

2012-03-13 Thread David Winsemius
On Mar 13, 2012, at 4:24 PM, Anna Dunietz wrote: Hello all! I would like to create a 3d plot, with the option price explained by the underlying price and time. Unfortunately, I can't quite get it to work. I would very much appreciate your help! The usual problem with lattice calls

Re: [R] 3D Black-Scholes Graph Help!

2012-03-13 Thread Berend Hasselman
On 13-03-2012, at 21:40, David Winsemius wrote: On Mar 13, 2012, at 4:24 PM, Anna Dunietz wrote: Hello all! I would like to create a 3d plot, with the option price explained by the underlying price and time. Unfortunately, I can't quite get it to work. I would very much appreciate

[R] MANOVA and Extra Sums-of-Squares Tests

2012-03-13 Thread chris33
I would like to conduct an extra sum-of -squares test that compares a full MANOVA model (with all 1st order interactions) to a reduced model (no interactions) to determine if I can drop all interactions at the same time. This is analagous to an extra sum-of-squares F-test in ANOVA, but instead

[R] Writing a .pdf file within a function - what do I need to return()?

2012-03-13 Thread Dgnn
I am trying to write a function that generates one PDf containing plots from several .csv files within a directory. When I manually execute the code it seems to work, but not when it is a function. I think I need to return() something, but haven't had much luck figuring out what/how.

[R] Rolling regressions with sample extended one period at a time

2012-03-13 Thread pie'
Hi, I would like suggestions as to how to perform rolling regressions with the window extended one period at a time. That is, an initial sample period is passed to estimation and that very sample is then extended one period at a time through the remaining sample. Is there a specific package?

Re: [R] MANOVA and Extra Sums-of-Squares Tests

2012-03-13 Thread John Fox
Dear chris33, You can use the anova() function to compare the two multivariate linear models. Alternatively, the Anova() function in the car package will compute type II or type III MANOVA tests, which aren't quite what you're asking about. I hope this helps, John

Re: [R] Interface or Select menu

2012-03-13 Thread Marcio Pupin Mello
For Windows you can use winMenuAdd function. Type ?winAddMenu to see how... Good luck, Marcio www.dsr.inpe.br/~mello On 3/6/08 10:35 AM, Alberto Monteiro wrote: er MIMI piki PIKINHA wrote: Hello, I´m spanish student, and I´m making the finish project of computer science. I´m working in R

[R] multi-histogram plotting

2012-03-13 Thread Sam Steingold
I have a vector x: table(x) 2 3 4 5 6 7 8 91011121314 45547 11835 4692 2241 1386 820 593 425 298 239 176 158 115 15161718192021222324252627 9488766747

Re: [R] 3D Black-Scholes Graph Help!

2012-03-13 Thread David Winsemius
On Mar 13, 2012, at 4:49 PM, Berend Hasselman wrote: On 13-03-2012, at 21:40, David Winsemius wrote: On Mar 13, 2012, at 4:24 PM, Anna Dunietz wrote: Hello all! I would like to create a 3d plot, with the option price explained by the underlying price and time. Unfortunately, I can't

  1   2   >