Re: [R] Adding Year-Month-Day to X axis

2018-05-10 Thread Jim Lemon
Hi Jayaganesh, I'm not sure this will help, but here is a simple example using box.heresy: y_duration <- c (16.438, 15.321, 12.700, 12.397, 10.795, 9.928, 10.386) library(plotrix) box.heresy(1,mean(y_duration),uinner=std.error(y_duration) ,ulim=sd(y_duration),intervals=TRUE) #add the median as a

Re: [R] the first name of the first column

2018-05-10 Thread Bert Gunter
1. My name is Bert, not Brent; 2. I am not your private consultant -- always cc the list unless you have good reason not to. I have done that here. It looks like this is what you want; if so, you really need to go through an R tutorial or two to learn the basics: d <- structure(list(region = str

Re: [R] the first name of the first column

2018-05-10 Thread MacQueen, Don
And more helpful, probably, would have been the str() function: > str(mtcars) 'data.frame': 32 obs. of 11 variables: $ mpg : num 21 21 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 ... $ cyl : num 6 6 4 6 8 6 8 4 4 6 ... $ disp: num 160 160 108 258 360 ... $ hp : num 110 110 93 110 175 105 2

Re: [R] the first name of the first column

2018-05-10 Thread MacQueen, Don
I think you are confusing row names with the first column. The first column in mtcars is not alphanumeric: > class(mtcars) [1] "data.frame" > class(mtcars[,1]) [1] "numeric" > rownames(mtcars) [1] "Mazda RX4" "Mazda RX4 Wag" "Datsun 710" "Hornet 4 Drive" "Hornet S

Re: [R] the first name of the first column

2018-05-10 Thread Bert Gunter
Clarification needed. Are your data in a data frame or an alphanumeric matrix? What does it look like? A small reproducible example would be very useful here I think! [1] http://stackoverflow.com/questions/5963269/how-to-make-a- great-r-reproducible-example [2] http://adv-r.had.co.nz/Reproducib

[R] the first name of the first column

2018-05-10 Thread greg holly
Dear all; I need to run heatmap. Because my first column in my data is alphanumeric, I can not run as.matrix(scale(my_data)). So I need to make my data readable as in data(mtcars). In *mtcars *data the first column is alphanumeric and has no name. Thanks, Greg [[alternative HTML versio

Re: [R] Fill down a new column in data frame with a number

2018-05-10 Thread Rui Barradas
Hello, You don't need rep(), R will fill the entire column with the number. See the example below. dat <- data.frame(x = 1:10) dat$newnumber <- 20 dat #x newnumber #1 120 #2 220 #3 320 #4 420 #5 520 #6 620 #7 720 #8 8

Re: [R] Tackling of convergence issues in gamlss vs glm2

2018-05-10 Thread Bert Gunter
If you do not receive a satisfactory reply to this rather technical question -- this list is *mainly* about R programming -- you might try directly emailing the maintainer: ?maintainer. This assumes of course that you have thoroughly read package documentation + checked any of its listed references

[R] Tackling of convergence issues in gamlss vs glm2

2018-05-10 Thread Nik Tuzov
Hello: I'd like to know how and if the GLM convergence problems are addressed in gamlss. For simplicity, let's focus on Normal and Negative Binomial with log link. The convergence issues of the glm() function were alleviated in 2011 when glm2 package was released. Package gamlss was released in

Re: [R] using for loop with data frames.

2018-05-10 Thread MacQueen, Don
Evidently, you want your loop to create new data frames, named (in this example) df_selected1 df_selected2 df_selected3 Yes, it can be done. But to do it you will have to use the get() and assign() functions, and construct the data frame names as character strings. Syntax like df_bs_id[

Re: [R] Modèle à Equations structurelles

2018-05-10 Thread Vera Gonçalves
Dear Yaya; I hope that you can understand english. I think that R package pls( about partial least squares) and/ or lavaan( about structural equation modeling between other things) can help you. Enviado do Correio para Windows 10 De: yaya bamba via R-help Enviado: 10 de maio de 2018 16:07 Para

Re: [R] Modèle à Equations structurelles

2018-05-10 Thread JLucke
The more general model for estimating structural models is lavaan, contained in the package lavaan. yaya bamba via R-help Sent by: "R-help" 05/10/2018 12:01 PM Please respond to yaya bamba To "r-help@r-project.org" , Michael Dewey , cc Subject Re: [R] Mod�le � Equations structurelles

Re: [R] Modèle à Equations structurelles

2018-05-10 Thread yaya bamba via R-help
In my previous mail, I was asking help to fit structural equations models by using Partial Least Square (PLS) approch.I have used package plspm. I want to know how to manage moderating and mediating variables. I also want to show simultanously the graph of internal model and measurement model.

Re: [R] Modèle à Equations structurelles

2018-05-10 Thread Michael Dewey
Dear Yaya You will get more responses if you can post in English which is the language of the list. If you want advice about package choice you need to tell us what packages you have considered and rejected. You would also benefit from searching the CRAN Task Views - possibly the Psychometri

Re: [R] using for loop with data frames.

2018-05-10 Thread John Kane via R-help
Why not just use an rbind() and create one data.frame? On Thursday, May 10, 2018, 10:34:19 a.m. EDT, Marcelo Mariano Silva wrote: Hi, Is it possible use a loop to process many data frames in the same way? For example, if I have three data frames, all with same variables df_bs_id1 <

Re: [R] (no subject)

2018-05-10 Thread John Kane via R-help
We need some idea of the problem. http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example http://adv-r.had.co.nz/Reproducibility.html On Thursday, May 10, 2018, 11:07:30 a.m. EDT, malika yassa via R-help wrote: Hello Do You help me, i have the prob

[R] Modèle à Equations structurelles

2018-05-10 Thread yaya bamba via R-help
Bonjour, Quelqu'un pourrait m'aider avec le code R pour estimer les modèles à équations structurelles via l'approche PLS,intégrer des variables modératrices et médiatrices et afficher les graphique simultané des modèles interne et de mesure? Cdt. [[alternative HTML version deleted]] ___

[R] (no subject)

2018-05-10 Thread malika yassa via R-help
Hello Do You help me, i have the problem in the package DTDA for  find the probability of truncation  (alpha) thank you [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.et

[R] using for loop with data frames.

2018-05-10 Thread Marcelo Mariano Silva
Hi, Is it possible use a loop to process many data frames in the same way? For example, if I have three data frames, all with same variables df_bs_id1 <- read.csv("test1.csv",header =TRUE) df_bs_id2 <- read.csv("test2.csv",header =TRUE) df_bs_id3 <- read.csv("test3.csv",header =TRUE) How coul

Re: [R] BoxPlot Adding Mean and Median Values

2018-05-10 Thread S Ellison
> Here is the code I have tried. The code has to work to be useful. including the data read - which, because it is on your D: drive, clearly can't be read.. But here are some comments and some base graphics code that should get you started; > As I mentioned below, would like to add the data lab

Re: [R] Fill down a new column in data frame with a number

2018-05-10 Thread S Ellison
> I am traying to create a a column in my data frame filled down with a > number. > > > df$newcolumn <- number > > How can I do it? I am considering use rep() but in this case it is > necessary know the number of rows in each data base that I have and I would > like to do it in a faster ( and m

Re: [R] Fill down a new column in data frame with a number

2018-05-10 Thread Sarah Goslee
Why doesn't the code you posted work for you? "number" appears to be a constant, so R will fill automatically the correct length. (Note that calling your data frame df leads to confusion.) > mydf <- data.frame(a=letters[1:5], b=runif(5)) > mydf a b 1 a 0.52880425 2 b 0.02422788 3 c 0.56

[R] Fill down a new column in data frame with a number

2018-05-10 Thread Marcelo Mariano Silva
Hi, I am a begginer in R programming. I am traying to create a a column in my data frame filled down with a number. > df$newcolumn <- number How can I do it? I am considering use rep() but in this case it is necessary know the number of rows in each data base that I have and I would like to d

[R] Using Tobit and SUR in Systemfit in R

2018-05-10 Thread Tom Kopp
Dear Community, does anybody have an idea on how to estimate a system of three seemingly unrelated regressions, two of which being TOBIT and one OLS? Background: I am currently estimating a translog cost function and two corresponding cost share equations using systemfit and the seemingly unrela

Re: [R] Systemfit

2018-05-10 Thread Bert Gunter
I think for us to "bear with you" you will first need to "bear with us" by posting an intelligible question and following the posting guide linked below. In particular, we generally require that you show us your efforts -- which so far appear to be "none" -- typically including a small reproducibl