[R] couple of how-to-do it in R questions regarding corelations and mean and SD of likert items

Jim Lemon drjimlemon at gmail.com
Tue Mar 6 21:55:47 CET 2018


Hi Faiz,
Just to add to the confusion:

library(prettyR)
describe(iris)

You can specify which summary measures you want in the "num.desc" argument.

Jim

On Tue, Mar 6, 2018 at 11:03 PM, faiz rasool <faiz7r at gmail.com> wrote:
> Dear list, I have the following how-to-do it in R, questions.
>
> Suppose I have ten independent variables, and one dependent variable.
> I want to find the Pearson correlation of all the IVs with the DV, but
> not the correlation between the IVs.
>
> What I know so far, about R, that I have to type the cor () function
> ten times, each time requesting for a correlation between one IV and
> the DV.
>
> I was wondering that is there a way that I can accomplish what I want
> with a single function or a fewer line of codes.
>
> My final goal is to create a table in Microsoft word comprising of ten
> rows, each row for each independent variable and its correlation with
> the DV.
>
> Based on what I know, I’ll be typing cor (IV,,DV), ten times, and then
> typing the values in the table in MS  Word.
>
>
> Secondly, I  would like to create a table that provides the details of
> means and standard deviations, of multiple variables.
>
> The variables are  ratings scores of  likert  type items. What I’d
> like to do is to construct a table, where each row has the question,
> its mean and standard deviation. I know that using the psych package,
> I can have the mean of each item in the scale, but, how to develop a
> table that has the item, mean, and SD on a same row? I do not know.
>
> Thank you for reading my questions.
>
> Regards,
> Faiz.
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, self-contained, reproducible code.



More information about the R-help mailing list