User talk:Feng Ren

From InterSciWiki
Jump to: navigation, search

Contents

Three need help

see: Xi'an students

Some want to use

I let Jingkun Niu know this Doug 15:09, 12 December 2011 (PST)

> sccs$Rain

 [1] 3 2 2 2 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 2 3 2 1 2 1 2 2 2 2 2 2 1 2 1 3 3 3 3 2 3 3 2 3 2 1 1 1
[51] 2 2 2 2 1 2 2 2 2 2 1 1 1 3 3 3 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1

[101] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 2 2 3 2 2 1 3 1 1 1 2 2 1 1 1 2 2 2 3 2 2 2 2 2 2 2 2 1 1 2 2 2 2 [151] 3 1 2 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 2 1 1 1 1 1 1 1 1 3 2

> sccs$Missions

 [1] 2 1 2 2 2 1 2 2 1 2 2 1 2 2 2 2 2 1 1 1 2 2 1 2 2 2 2 2 2 1 2 2 2 1 1 1 2 1 2 2 2 2 2 1 1 1 2 2 2 2
[51] 2 2 2 2 2 2 2 1 2 2 1 2 2 2 2 1 1 2 2 2 2 1 2 1 1 2 1 1 1 2 2 2 2 2 2 2 2 2 1 1 2 1 2 1 1 1 2 2 2 2

[101] 2 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 1 2 2 1 2 1 2 1 1 2 2 2 1 1 1 1 1 1 2 2 1 1 2 1 1 1 2 1 1 1 1 1 2 1 [151] 2 1 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 1 1 1 1 2 1 1 2 1 1 2 1 1

Database

To convert the SPSS database to R data file, I found a R programme on the website:

         read.spss(file, use.value.labels = TRUE, to.data.frame = FALSE,
         max.value.labels = Inf, trim.factor.names = FALSE,
         trim_values = TRUE, reencode = NA, use.missings = to.data.frame)
  • file Character string: the name of the file or URL to read.
  • use.value.labels Convert variables with value labels into R factors with those levels?
  • to.data.frame return a data frame?
  • max.value.labels Only variables with value labels and at most this many unique values will be *converted to factors if use.value.labels = TRUE.
  • trim.factor.names Logical: trim trailing spaces from factor levels?
  • trim_values logical: should values and value labels have trailing spaces ignored when matching for use.value.labels = TRUE?
  • reencode logical: should character strings be re-encoded to the current locale. The default, NA, means to do so in a UTF-8 locale, only. Alternatively character, specifying an encoding to assume.
  • use.missings logical: should information on user-defined missing values be used to set the corresponding values to NA?

Research Issues

Personal tools