[R] use hjust or vjust with dendextend

2016-04-17 Thread Sergio Fonda
Following "Introduction to dendextend" from Tal Galili, I applied this code on iris data: ## library(dendextend) library(dendextendRcpp) library(ggplot2) dend2 <- iris[1:30,-5] %>% dist %>% hclust %>% as.dendrogram %>% set("branches_k_color", k=3) %>% set("branches_lwd", rep(1,4)) %>% set("branches

Re: [R] Order output list od TukeyHSD function by "p adj"

2016-02-24 Thread Sergio Fonda
Texas A&M University > College Station, TX 77840-4352 > > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Sergio > Fonda > Sent: Wednesday, February 24, 2016 6:47 AM > To: Jim Lemon > Cc: r-help@r-project.org > Subject: Re

Re: [R] Normalization in R

2016-02-24 Thread Sergio Fonda
If you intend "standardization, use scale(x, center = TRUE, scale = TRUE), center for zero mean scale for SD=1 Best regards, Sergio 2016-02-24 8:22 GMT+01:00 Alnazer Elbedairy : > Dear all > anyone know the function or syntax to get the Normalization for Data ? > thanks > > [[altern

Re: [R] Order output list od TukeyHSD function by "p adj"

2016-02-24 Thread Sergio Fonda
000 0.6465793 19.35342 0.033626219 > M-H 4.72 -4.6311985 14.07564 0.447421021 > > Obviously you would have to examine the output of TukeyHSD with str() to > sort out which column to use for ordering. > > Jim > > > On Wed, Feb 24, 2016 at 11:21 AM, Sergio Fonda >

[R] Order output list od TukeyHSD function by "p adj"

2016-02-23 Thread Sergio Fonda
Hello, It's already for several hours that I try to order the list obtained by the function TukeyHSD according to the variable "p adj" (in ascending order). Unfortunately, without success. In addition to following two lines of code, that offer the result but separately so do not correspond to the

[R] boxplots facets in ggplot, generated with two factors interaction mediane-ordered

2015-09-06 Thread Sergio Fonda
Sorry for repeating the message owing to previous uncorrect html version delivered (Thank you bert Gunter for the alert). Marc Schwartz enabled me to order a "two factors" interaction boxplot with median associated to one factor alone: thanks. I tried further to generate facets plot (3x2 boxplots

Re: [R] Is there a time series resampling function ?

2015-09-06 Thread Sergio Fonda
I insist: as a trial, apply function "resample" (package signal) I think it's worth doing a test ( it performs resampling through bandlimited interpolation) SF Il 06/set/2015 18:52, "Jeff Newmiller" ha scritto: > There are lots of them. You might be having trouble searching because you > don't kn

Re: [R] Is there a time series resampling function ?

2015-09-06 Thread Sergio Fonda
Have you tried signal package? SF Il 06/set/2015 17:14, "AltShift" ha scritto: > I need a function for regularising the time base of electronically acquired > signals (i.e. vectors of samples with a nominally constant time base). > > For example, the accelerometer in my smartphone can deliver dat

[R] boxplots facets in ggplot, generated with two factors interaction mediane-ordered

2015-09-06 Thread Sergio Fonda
Thanks to Marc Schwartz I was able to order a "two factors" interaction boxplot with median associated to one factor alone. I tried further to generate facets plot (3x2 boxplots in ggplot2) for the dataframe reported at bottom and I'm not able to reach a correct plot. The dataframe is a simulation

Re: [R] factor interaction boxplot ordering by median

2015-09-06 Thread Sergio Fonda
WRN -4.148942985 241S WRN -1.855994142 242R WT1 -0.824982393 243S WT1 1.236129501 244S WT1 1.088540877 2015-09-05 15:08 GMT+02:00 Marc Schwartz : > > > On Sep 5, 2015, at 7:29 AM, Sergio Fonda > wrote: > > > >

[R] factor interaction boxplot ordering by median

2015-09-05 Thread Sergio Fonda
I would to visualize in boxplot a data frame with two factors ordering one factor with the median. As example,suppose to have the InsectSprays dataframe, where an "operator" factor with two levels, op1 and op2, has been added as shown at bottom here. How may be generated a boxplot showing boxes fo

Re: [R] factor interaction boxplot ordering by median

2015-09-05 Thread Sergio Fonda
Great! Thank you All the best SF Il 05/set/2015 15:08, "Marc Schwartz" ha scritto: > > > On Sep 5, 2015, at 7:29 AM, Sergio Fonda > wrote: > > > > I would to visualize in boxplot a data frame with two factors ordering > one > > factor with the

Re: [R] write.csv file= question

2015-08-04 Thread Sergio Fonda
Call getwd() in both terminal and your RStudio environments and compare results Il 04/ago/2015 16:53, "Brittany Demmitt" ha scritto: > Hello, > > I have a quick question about the “file=“ specification for the command > write.csv.When I run this command in Rstudio I do not need the “file=“ >

Re: [R] Removing rows in a data frame

2015-07-03 Thread Sergio Fonda
In my experience package "dplyr" has all functions to deal with this kind of problems in a simple and compact way Sergio Il 03/lug/2015 07:26, "Charles Thuo" ha scritto: > I have a data frame whose rows are 678013 . I would like to remove rows > from 30696 to 678013 and then attach a new column

Re: [R] Stream package

2015-06-29 Thread Sergio Fonda
edded Controllers) .OO#. .OO#. rocks...1k > --- > Sent from my phone. Please excuse my brevity. > > On June 29, 2015 2:19:42 PM PDT, Sergio Fonda > wrote: > >"stream" package is devote

[R] Stream package

2015-06-29 Thread Sergio Fonda
"stream" package is devoted to cluster prediction and processing in data streaming condition. Is it convenient also for realtime signal processing ( filtering, EMD, etc.) Thank you for any remark! Sergio [[alternative HTML version deleted]] __ R

Re: [R] Matrix of indexes to extract sparse data in dataframe

2015-06-05 Thread Sergio Fonda
gt; David L Carlson > Department of Anthropology > Texas A&M University > College Station, TX 77840-4352 > > > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Sergio > Fonda > Sent: Friday, June 5, 2015 8:47 AM > To: John Kane > Cc:

Re: [R] Matrix of indexes to extract sparse data in dataframe

2015-06-05 Thread Sergio Fonda
Thank you, of course but I can't use that form as I told. My question is about the possibility to enter in a dataframe with a matrix of indices and get the corresponding values Thanks again Il 05/giu/2015 15:39, "John Kane" ha scritto: > d1 <- apply(c0, 1, min) I think does it. > > John Kane

[R] Matrix of indexes to extract sparse data in dataframe

2015-06-05 Thread Sergio Fonda
I would like to avoid a "for loop" to get a vector of data taken from rows of a data frame for specific columns. An example is the following (I can't apply min to every row of df, this is just an example): c0=data.frame(a=c(3,-2,12,7,-23,17) , b=c(-1,-3,14,2,6,19)) c1=apply(c0,1,which.min) > c1 [1

Re: [R] assign variables to function output

2015-04-16 Thread Sergio Fonda
> c<-matrix(1:9,nrow=3) > return(list(a,b,c)) > } > > x<-return_a_list() > x > > Jim > > On Thu, Apr 16, 2015 at 7:21 PM, Sergio Fonda > wrote: > > Collect in a vector or dataframe or list the variables of interest and > > output it. > > Il 16/apr/2

Re: [R] assign variables to function output

2015-04-16 Thread Sergio Fonda
Collect in a vector or dataframe or list the variables of interest and output it. Il 16/apr/2015 10:57, "merm" ha scritto: > Hi! > > So I'm trying as the header suggests to assign the value(s) output by a > function to a variable, say 'y' > > Problem is from what I gather any variables introduced

Re: [R] A simple For-Loop doesn't work

2015-03-15 Thread Sergio Fonda
Pay attention to the i counter in the loop: it runs from 1 to 6 but data has only 3 elements Il 15/mar/2015 04:56 "Nicolae Doban" ha scritto: > Hello, > > my name is Nick and I'm working on a project. I'm having trouble with > building a simple for-loop. In this loop I want to read csv files, pe

Re: [R] Split a dataframe by rownames and/or colnames

2015-02-23 Thread Sergio Fonda
Did you try "dplyr" package? Sergio Il 23/feb/2015 13:05 "Tim Richter-Heitmann" ha scritto: > Thank you very much for the line. It was doing the split as suggested. > However, i want to release all the dataframes to the environment (later > on, for each dataframe, some dozen lines of code will be

Re: [R] save program results and graphs to one file

2015-02-02 Thread Sergio Fonda
With a little effort you could implement Rstudio and try RMD (R Markdown) it is very proficient, look at https://support.rstudio.com/hc/en-us/articles/200552086-Using-R-Markdown Il 01/feb/2015 21:07 "Ragia Ibrahim" ha scritto: > > Dear group, > > I have many plots and numeric results in my R prog

Re: [R] how to judge a virable is a integer?

2014-10-18 Thread Sergio Fonda
Further and last trial: > a=5.102> a-floor(a)==0[1] FALSE> a=5.9> a-floor(a)==0[1] FALSE> a=19> > a-floor(a)==0[1] TRUE All the best, Sergio 2014-10-18 16:25 GMT+02:00 PO SU : > > It's due to that, 1 is a numeric, 1.2 is a numeric, though it's true. but > deeply, when i want to know 1 is an

Re: [R] how to judge a virable is a integer?

2014-10-18 Thread Sergio Fonda
Sorry for my previous hurry misunderstanding. Try this link: http://stackoverflow.com/questions/3476782/how-to-check-if-the-number-is-integer 2014-10-18 16:25 GMT+02:00 PO SU : > > It's due to that, 1 is a numeric, 1.2 is a numeric, though it's true. but > deeply, when i want to know 1 is an int

Re: [R] how to judge a virable is a integer?

2014-10-18 Thread Sergio Fonda
Don't know if this trivial reply will be useful >a=5 >is.numeric(a) >[1] TRUE >b="try" >is.numeric(b) >[1] FALSE Il 18/ott/2014 16:29 "PO SU" ha scritto: > > It's due to that, 1 is a numeric, 1.2 is a numeric, though it's true. but > deeply, when i want to know 1 is an integer, there seems no

Re: [R] Unbalanced manova

2014-05-01 Thread Sergio Fonda
in the > model. > > I hope this helps, > John > > > John Fox, Professor > McMaster University > Hamilton, Ontario, Canada > http://socserv.mcmaster.ca/jfox/ > > > On Fri, 25 Apr 2014 11:17:44 +0200 > Sergio Fonda wrote: > > Hello list, > > I would

[R] Unbalanced manova

2014-04-25 Thread Sergio Fonda
Hello list, I would be very grateful if somebody could suggest me which kind of call may be used to perform a manova with unbalanced data avoiding NA values. Thanks a lot [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Solving Classification problems in R

2014-02-28 Thread Sergio Fonda
ill select relevant predictors by itself > >>> given the training data. > >>> > >>> Not sure about the customized cost functions > >>> > >>> Jean-Olivier Irisson > >>> -- > >>> Université Pierre et Marie Cu

Re: [R] Solving Classification problems in R

2014-02-28 Thread Sergio Fonda
Focus on MASS, CCA and e1071 packages Brgds, Sergio Il 28/feb/2014 17:47 "Luca Cerone" ha scritto: > Dear all, > I would like some advices on R packages to solve classification problems. > I have tried to search among the Task views, but couldn't find anything. > > Can somebody recommend me some

Re: [R] variable standardization in manova() call

2013-11-16 Thread Sergio Fonda
data before calling MANOVA. The only difference you get is in the residuals values, of course. Could you kindly confirm my conclusion? All the best, Sergio Fonda __ set.seed(1234) # non- standardized series x1 = rnorm(n=10, mean=50, sd=11) x2 = rnorm(n=10, mean=93, sd=23) x1

Re: [R] variable standardization in manova() call

2013-11-07 Thread Sergio Fonda
2013/11/6 Michael Friendly : > On 11/4/2013 10:45 AM, Sergio Fonda wrote: >> >> Hi, >> I'm not able to get information about the following question: >> >> is the variables standardization a default option in manova() (stats >> package)? >> Or if

[R] variable standardization in manova() call

2013-11-04 Thread Sergio Fonda
ables ? Thanks a lot for any help, Sergio Fonda www.unimore.it __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,