Displaying 20 results from an estimated 900 matches similar to: "read.spss, locale and encodings"
2008 Feb 19
3
simple usage of "for"
Hi list
I have a data frame I would like to loop over. To begin with I would
like crosstabulations using the first variabel in the data frame,
which is called "meriter".
> table(meriter[[1]], meriter[[3]])
ja nej
Annan 0
2010 Sep 30
7
how to make list() return a list of *named* elements
If I combine elements into a list
b <- c(22.4, 12.2, 10.9, 8.5, 9.2)
my.c <- sample.int(round(2*mean(b)), 5)
my.list <- list(b, my.c)
the names of the elements seems to get lost in the process:
> str(my.list)
List of 2
$ : num [1:5] 22.4 12.2 10.9 8.5 9.2
$ : int [1:5] 11 8 6 9 20
If I explicitly name the elements at list-creation, I get what I want:
my.list <- list(b=b,
2008 Mar 03
3
Plot using colors
Dear R users,
I have a problem since I try to plot my datas with different colors.
plot(tvar, var, xlab="zeit [s]",ylab="Variation [%]", col = ifelse(var <=
varstability, 'green','red'))
this works well!
But since I add a type="l" to my plot, it will color all the plot with
green!!!
Is there any solution? I avoid to use teachingDemos.
Thanks.
--
2009 Apr 07
0
Converting a whole dataframe (including attributes) from latin1 to UTF-8
Hi list!
Short version: How do I convert a whole data.frame from latin1
encoding to utf8?
I get SPSS files with latin1 encoding. My OS is GNU/Linux and the
locale sv_SE.utf8, and I normally interface R with Emacs/ESS. I have
used the following hack to convert a data.frame in latin1 to utf8:
> Sys.setlocale(category = "LC_ALL", locale = "sv_SE.iso88591")
> foo <-
2009 Apr 29
3
how to word-wrap text in labels in plots?
c <- structure(c(2L, 2L, 1L, 3L, 4L, 2L, 3L, 2L, 3L, 2L, 5L), .Label = c("foo",
+ "bar", "a really really long variable label mostly here to show the need of word-wrapping text in labels",
+ "a not so important value", "baz"), class = "factor")
plot(c)
Is there a way to get the long variable labels to automatically wrap so that all
2009 Feb 17
1
frequency table for multiple variables
Hi r-help!
Consider the following data-frame:
var1 var2 var3
1 3 1 4
2 2 2 3
3 2 2 3
4 4 4 NA
5 4 3 5
6 2 2 3
7 3 4 3
How can I get R to convert this into the following?
Value 1 2 3 4 5
var1 0 3 2 2 0
var2 1 3 1 2 0
var3 0 0 4 1 1
TIA,
--
Hans Ekbrand (http://sociologi.cjb.net) <hans at
2007 Nov 01
2
ploting a comparison of two scores, including the labels in the plot
Hello r-help!
I have data with two kind of ratings on status of 100 occupations. The
first kind of rating is on the percieved "objective" status that these
occupations have in society at large, and the second kind or rating is
on the status that the respondents think that these occuption *should*
have.
The ratings were originally integer values in the rage 1-9, but in the
current data,
2010 Apr 29
2
getting random integers
I want 100 integers. Each integer, x, can be in the range 1 =< x => 10.
Does the following code give 1 and 10 the same chances to be selected as
2:8?
round(runif(100, min = 1, max = 10))
--
Hans Ekbrand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL:
2012 Feb 25
5
which is the fastest way to make data.frame out of a three-dimensional array?
foo <- rnorm(30*34*12)
dim(foo) <- c(30, 34, 12)
I want to make a data.frame out of this three-dimensional array. Each dimension will be a variabel (column) in the data.frame.
I know how this can be done in a very slow way using for loops, like this:
x <- rep(seq(from = 1, to = 30), 34)
y <- as.vector(sapply(1:34, function(x) {rep(x, 30)}))
month <- as.vector(sapply(1:12,
2006 Aug 05
2
Frustrating locale setting error
Hi all,
This has been very frustrating for me trying to get this acts_as_ferret
working well on a Fedora box. On my mac it works great, no problems with
locale, but when I put the code live on my Fedora server, it complains
about the locale setting (Error occured at <analysis.c>:498 Error:
exception 2 not handled: Error decoding input string. Check that you
have the locale set
2019 Jan 14
0
Setting 'unix charset' kills the samba share
On Mon, 14 Jan 2019 16:27:04 -0500
Gilbert Soucy <gsoucy at 36pix.com> wrote:
> Yes, I have tried testparam. All is OK . Note that I can write
> anything for unix charset and testparm does not complain.
>
> Load smb config files from /etc/samba/smb.conf
> rlimit_max: increasing rlimit_max (1024) to minimum Windows limit
> (16384) Processing section
2011 Mar 31
1
Cluster analysis, factor variables, large data set
Dear R helpers,
I have a large data set with 36 variables and about 50.000 cases. The
variabels represent labour market status during 36 months, there are 8
different variable values (e.g. Full-time Employment, Student,...)
Only cases with at least one change in labour market status is
included in the data set.
To analyse sub sets of the data, I have used daisy in the
cluster-package to create
2007 May 23
0
make check fails tools-Ex in 2.5.0
Hi folks,
I'm attempting to compile and install 2.5.0, and "make check" is failing
one of the earlier sanity tests. I'll append the relevant portion of the
Rout.fail file below, but I've narrowed it down manually to a single
command:
> sessionInfo()
R version 2.5.0 (2007-04-23)
x86_64-unknown-linux-gnu
locale:
2008 Feb 26
4
rsync-3.0.0pre10 and iconv
Hello,
I am trying to get rsync-3.0.0pre10 --iconv option working between two linux hosts in local network.
The client host is running Fedora Core 4 (kernel 2.6.17) and is using iso8859-1 character set. LANG=en_US
The daemon host is running Centos 5 (kernel 2.6.18) and is using utf-8 character set. LANG=en_US.UTF-8
Rsync is transferring files properly without --iconv switch:
fc4: (connected
2019 Feb 18
3
Encoding issues
Hi,
We found a (to our eyes) strange behaviour that might be a bug. First
a little bit of context. The 'units' package allows us to set the unit
using both SE or NSE. E.g., these both work in the same way:
units::set_units(1:10, "?m")
#> Units: [?m]
#> [1] 1 2 3 4 5 6 7 8 9 10
units::set_units(1:10, ?m)
#> Units: [?m]
#> [1] 1 2 3 4 5 6 7 8 9 10
2011 Aug 09
1
lavaan: how to analyse residuals of a latent variable
Hi r-help,
I use lavaan:sem() for structural equation modelling with latent
variables. Below is a reproducible example (the code requires a
working installation of lavaan) where the latent variable criminality
is in focus. Besides criminality in general, I am specifically
interested one of the manifest variables that make up the latent
variable criminality, namely fire.setting.
My question is:
2010 May 20
1
rsync and the iconv-switch
Hello all,
I have problems with sending data names via rsync including german
characters like ??, ?, ??.
The daemon running on a SLES10. The Rsync version is: 3.0.3, Protocol
version:30.
My Client is a Windows XP machine with Rsync: 3.0.4 (or alternative 3.0.6),
Protocol version:30.
For the conversion between both machines I use the ??iconv=850,UTF-8? ?
switch.
chcp told me that 850 is my
2018 Apr 25
0
Samba 4 - ISO-8859-15 filenames not listed while browsing
Am Mittwoch, 25. April 2018, 15:31:50 CEST schrieb Ali SIMON via samba:
> Thanks Jeremy,
>
> i'm analyzing this with the application team, we'll see what we can
> find.
> > I was hoping to find a way for the samba4 server to behave like
> > samba3 (as in ignoring bad characters and replacing them with an
> > underscore character), which in the end resulted in
2019 Feb 18
0
Encoding issues
>From "Writing R Extensions":
"Only ASCII characters (and the control characters tab, formfeed, LF
and CR) should be used in code files."
So I am afraid you cannot use ?m.
Gabor
On Mon, Feb 18, 2019 at 3:36 PM I?aki Ucar <iucar at fedoraproject.org> wrote:
>
> Hi,
>
> We found a (to our eyes) strange behaviour that might be a bug. First
> a little
2007 Feb 01
2
read.spss and encodings
Hi!
I'm having trouble with importing spss files containing non-ascii characters
(R 2.4.1, debian linux, i386). To reproduce:
Download the following file:
http://statmath.wu-wien.ac.at/data/spss/de/comphomeneu.sav
require (foreign)
Sys.setlocale (locale="C")
read.spss("comphomeneu.sav")$ARBEIT[1]
# prints:
# [1] im B\374ro
# Levels: im B\374ro zuhause
\374 of course