[R] libary(Rweka) J48 design tree

2011-11-13 Thread RMSOPS
Hello everybody I'm having some difficulties to design the decision tree algorithm J48. I am using the following code and when I run it gives me the following message plot(m1) Error in plot.Weka_tree(m1) : Plotting of trees with multi-way splits is currently not implemented. #The code library

[R] Export Tree for latex

2011-11-18 Thread RMSOPS
Hello everybody. I'm trying to send the result of a decision tree for latex, but I do not get with the package(xtable), there is a package that make this export Export this for latex marital.status = Divorced | educational.num <= 12: <=50K (1795.0/90.0) | educational.num > 12 | | ho

Re: [R] Export Tree for latex

2011-11-18 Thread RMSOPS
Hello, This is the code to generate the tree library(RWeka) library(randomForest) library(party) library(partykit) if(require(mlbench, quietly = TRUE) && require(party, quietly = TRUE)) m1 <- J48(income2 ~ capital.gain+capital.loss+relationship+marital.status, data = treino) #m1 <- J48(in

[R] nnet plot

2011-11-26 Thread RMSOPS
good night Again I ask for help to the community, as I am new at this, I have some basic questions. I am looking for packages on neural networks and so you can search found these two that I think are the most used, neuralnet, nnet. So you can test, and correct me if I'm wrong the neuralnet

[R] Plot nnet

2011-11-28 Thread RMSOPS
good night Again I ask for help to the community, as I am new at this, I have some basic questions. I am looking for packages on neural networks and so you can search found these two that I think are the most used, neuralnet, nnet. So you can test, and correct me if I'm wrong the neuraln

[R] Plot Legend

2011-10-24 Thread RMSOPS
Good Afternoon, I am inexperienced in data visualization R. so I wonder if someone can help me. I am using the generic database mtcars. I would like to change the chart plot, instead of appearing the name of the medicine, I wanted a symbol in the chart drugX arise for example in a yellow circle,

Re: [R] Plot Legend

2011-10-24 Thread RMSOPS
Hello Michael, You were absolutely right, it was not the database mtcars I wanted to use. but the example you sent me helped me a lot. I took the code that I adapted to this and what I wanted and resulted in perfection. Thank you for your help. dataset *with (dataset, plot (dataset

[R] Plot complete dataset

2011-10-26 Thread RMSOPS
Hello, I am a new user of R, so I still have some basic difficulties. I'm trying to create a bar graph completely from reading a file. The idea was on the x axis have the columns of the table Married ,Single,Divorced, widower the legend Ages 18-34 35-45 46-64 65-69 70-74 the dataset

[R] Subset problem

2012-03-07 Thread RMSOPS
Good Morning     I have a small question regarding the function subset. I am copying data from one table but I just want to collect data from a user. When do I take the view, presents the results I want. The problem arises when can I make the tab. for RES_ID, introduces me to zero results do not

Re: [R] Subset problem

2012-03-07 Thread RMSOPS
Thank you. I put table(factor(x.sub$RES_ID)) and works. -- View this message in context: http://r.789695.n4.nabble.com/Subset-problem-tp4452837p4452954.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

[R] Column with codes

2012-03-07 Thread RMSOPS
Good Day, I have a small question, I think it is simple to solve, I have a column with the following records name saucer cup tea saucer saucer what is the quickest way to create a new column codes 1 1 3 1 1 -- View this message in context: http://r.789695.n4.nabble.com/Column-with-codes

Re: [R] Odp: Column with codes

2012-03-07 Thread RMSOPS
It was. Thanks -- View this message in context: http://r.789695.n4.nabble.com/Column-with-codes-tp4452906p4453124.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listin

[R] problem with data

2012-03-07 Thread RMSOPS
Good Afternoon,    I have a small problem with the following code. # The x.sub$Time[[1]] 2006-10-31 19:03:01 EST # when put in variable star give-me star<-x.sub$Time[[1]] print(star) print(x.sub$Time[[1]]) [1] 1 36 32 - do not understand why -- View this message in context: ht

Re: [R] problem with data

2012-03-08 Thread RMSOPS
Hello In the variable x.sub$Time i have the many dates in format 2006-10-31 20:10:35 EST, for example when print (x.sub$Time) give this [1] "2006-10-31 20:10:35 EST" "2006-10-31 20:11:08 EST" "2006-10-31 20:11:21 EST" "2006-10-31 20:12:16 EST" [5] "2006-10-31 20:13:20 EST" "2006-10-31 20:13

Re: [R] problem with data

2012-03-08 Thread RMSOPS
Hello I try save the results in the the vector, v_star[1]<-x.sub$Time[1] and give me the following error In v_end[1] <- x.sub$Time[1] : number of items to replace is not a multiple of replacement length, how put this [1] *"2006-10-31 19:03:01 EST"* inside the vetor Thanks -- Vi

[R] Copy dataframe for another

2012-03-08 Thread RMSOPS
I'm trying to copy the results of a dataframe to another within a cycle for but I am not able to implement the rbind, because give th d<-Null df<-NULL for(r in 2: nrow(x)) { val_user<-x.name[[r]] pos<-x.pos[[r]] -4 age <-x.age[[r]] d<-data.frame(val_user,pos,)

[R] Copy dataframe for another

2012-03-08 Thread RMSOPS
I'm trying to copy the results of a dataframe to another within a cycle for but I am not able to implement the rbind, because give th d<-Null df<-NULL for(r in 2: nrow(x)) { val_user<-x.name[[r]] pos<-x.pos[[r]] -4 age <-x.age[[r]] d<-data.frame(val_user,pos,) pr

Re: [R] Copy dataframe for another

2012-03-09 Thread RMSOPS
Hello,     the idea is to copy the d for df, with new results. x<-data.frame(name="x1",pos=4,age=20) x<-rbind(x,data.frame(name="x2",pos=5,age=20)) x<-rbind(x,data.frame(name="x3",pos=6,age=21)) x<-rbind(x,data.frame(name="x4",pos=7,age=24)) x<-rbind(x,data.frame(name="x5",pos=8,age=27)) x<-rbind

Re: [R] Copy dataframe for another

2012-03-09 Thread RMSOPS
Hello Thanks for the reply. As yet I have not much experience in r, although I make some mistakes. Any tips to solve the problem of a more effective way. Regards -- View this message in context: http://r.789695.n4.nabble.com/Copy-dataframe-for-another-tp4456893p4459526.html Sent from

[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

[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. id_ap<-level

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))) mat<-matrix(

[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] 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 5

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] Sum results in a matrix

2012-03-14 Thread RMSOPS
thank you It is working, a question in the wake of the array. with the following code I am creating a data frame to store the data without repeating the code is working. The question is the best way to do this process in R tab<-NULL for(i in 1: nrow(res4)) { for(j in i:nrow(res4)) {

[R] extract values ​​for the dates and a new column

2012-03-14 Thread RMSOPS
#add column Start Hello Good Afternoon I am trying to create a new column in the data frame, the target is based on a column of dates to extract a value of life and add a new column to data frame f<-x.res$T-x.res$duration Dataset$StarEvent<-(as.character.POSIXt(f)) x.sub$T is: [1] "2006-10-31