Questions tagged [psych]

An R package for analysing personality, psychometrics and experimental psychology. Do not use this tag for Ruby standard library Psych.

psych is an package containing functions for analysing personality, psychometrics and experimental psychology. Functions are primarily for scale construction using factor analysis, and analysis, although others provide basic descriptive statistics. Item Response Theory is done using factor analysis of tetrachoric and polychoric s. Functions for simulating particular item and test structures are included. Several functions serve as a useful front end for structural equation modeling. Graphical displays of path diagrams, and structural equation models are created using basic graphics.

Repositories

Vignettes

Other resources

Related tags

294 questions
28
votes
2 answers

Documentation for Psych to_yaml options?

Ruby 1.9.3 defaults to using Psych for YAML. While the ruby-doc documentation for it is completely lacking, I was able to find one external piece of documentation that hinted that the indentation option is supported. This was borne out in…
Phrogz
  • 296,393
  • 112
  • 651
  • 745
20
votes
3 answers

YAML safe loading is not available

When I want to install compass with gem install compass, I occurred with this error: YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0). what The cause of this error and how can I solve the…
Morteza QorbanAlizade
  • 1,520
  • 2
  • 19
  • 35
17
votes
5 answers

Fixing the "ruby installation is missing psych" error?

I'm running Ruby ruby 1.9.3p125 and I keep getting this error which is making it impossible for me to do any kind of development in Rails. It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please…
Zack Shapiro
  • 6,648
  • 17
  • 83
  • 151
17
votes
6 answers

Clean install OSX 10.9.1 returns "undefined method `path2class'" when trying to install gems

I just installed a clean Mavericks installation with Homebrew and RVM. Both brew doctor and rvm requirements return "all good", however, when I run bundle install in my project dir most of my gems install fine, but a handful fail to install with the…
Niels Kristian
  • 8,661
  • 11
  • 59
  • 117
16
votes
3 answers

why does psych yaml interpreter add line breaks around 80 characters?

Psych is the default yaml engine since ruby 1.9.3 Why, oh why does psych add a line break in its output? Check the example below. ruby -v # => ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-linux] require 'yaml' "this absolutely normal sentence…
mla
  • 215
  • 2
  • 5
14
votes
5 answers

Fix for: Prior to 0.1.6, libyaml is vulnerable to a heap overflow exploit from malicious YAML payloads

I get the following error when running rspec after I added the vcr gem. Simply running gem install psych -- --enable-bundled-libyaml as suggested doesn't solve the problem. I am using rbenv and ruby-build and I am on ruby 2.1.1. What do i have to do…
Dominik Goltermann
  • 4,276
  • 2
  • 26
  • 32
14
votes
3 answers

Psych YAML parsing including comments

According to http://yaml.org/spec/current.html#id2509980 comments in YAML files are a presentational detail and must not be in the serialization/representation graph ( http://yaml.org/spec/current.html#representation/). It looks like Psych is…
hjuskewycz
  • 1,437
  • 1
  • 14
  • 20
12
votes
1 answer

Rails: syck has been removed, psych is used instead

I receive this message during capistrano deploy of my rails project: syck has been removed, psych is used instead Versions: gem 'rails', '=3.2.13' ruby 2.0.0p247 As i know ruby use native yamler "Psych". There is no any yamler in Gemfile. In my…
12
votes
4 answers

psych - Getting factor loadings as data.frame for LaTeX export

I am using the psych package's fa command for factor analysis, and so have an object of class fa. I can query the loadings with fac$loadings, but I want to only extract the table containing the loadings, so I can use xtable (or similar) to convert…
bountiful
  • 814
  • 1
  • 8
  • 22
12
votes
3 answers

YAML::load raises undefined class/module error

I’m implementing paper trail like feature in my rails app. In order to do this, I’m serializing object in YAML. I’ve got item_at_version method, which basically does YAML::load(cached_object) – this works pretty well, however, I have no idea why,…
user1105595
  • 591
  • 2
  • 8
  • 20
8
votes
2 answers

Export describe.by (package psych) as csv file in R

Does anyone know how to export describe.by statistics to csv in R? I get this message: estatistica <- describe.by(pag,list(pag$Jogo) write.table(estatistica,file="H:/Myfile.csv",sep=",") "Erro em as.data.frame.default(x[[i]], optional = TRUE,…
karips
  • 151
  • 1
  • 1
  • 11
7
votes
1 answer

How to dump strings in YAML using literal scalar style?

I have a big string of formatted data (e.g. JSON) that I want to dump to YAML using Psych in ruby while preserving formatting. Basically, I want for JSON to appear in YAML using literal style: --- json: | { "page": 1, "results": [ …
mislav
  • 14,919
  • 8
  • 47
  • 63
7
votes
1 answer

How can I adjust my fa.diagram function to correct the overlapping?

I want to adjust the function's parameters so that the items don't overlap. I've tried changing the rsize, e.size and gap.size but nothing works. Any ideas?
Amanda
  • 71
  • 2
7
votes
5 answers

Rails 3 - 'Couldn't parse Yaml'

I don't know what I did wrong. I try to run 'rails c,' but it just gives me an error. It was working 10 minutes ago. :\ C:/Ruby192/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't parse YAML at line 2 column 12 (Psych::SyntaxError) from…
Serodis
  • 2,092
  • 4
  • 25
  • 34
7
votes
1 answer

psych: principal - loadings components

My question is concerned with the principal() function in psych package. set.seed(0) x <- replicate(8, rnorm(10)) pca.x <- principal(x, nf=4, rotate="varimax") I know if I want to see the loadings table, I can use loading.x <-loadings(pca.x), than…
Novus
  • 135
  • 2
  • 8
1
2 3
19 20