Displaying 20 results from an estimated 3000 matches similar to: "recode problem - unexplained values"
2007 Apr 19
2
inconsistent output using 'round'
I am hoping for some advice regarding limiting decimal points to 3.
'Round' produces the desired results except for the 97.5% confidence interval.
Any advice as to how I modify the code to obtain output to 3 decimal
points for all ouput is appreciated,
regards
Bob Green
mod.multgran <-multinom(offence ~ grandiose * violent.convictions,
data = kc, na.action = na.omit)
2016 Oct 20
8
photos on iPhone 6
A bit of a perennial I'm afraid. My wife has filled up her iPhone 6
with photos, and wants them moved onto my computer. I'm running CentOS
7 patched about 30 minutes ago. Needless to say the computer can't see
the data on the iPhone, though it does recognise the phone as an iPhone.
Any suggestions (well any that don't involve a steam roller, sledge
hammer or GBH to the whole of
2006 Jun 19
2
saving rounded numbers as a new variable in a dataframe
A basic question, but one that eludes me. I have created a new variable
$numurder, which I have rounded off. I want to save the rounded off version
of this variable to an existing datafile called 'ngri.csv' .
numurder <-c((murder*no.of.cases)/100)
[[1]]
[1] 48.952 112.073 182.160 974.610 122.140 663.432 150.856 18.988
137.925 198.045 68.930 203.148 30.056 100.955
2007 Dec 16
4
improving a bar graph
Hello,
Below is the code for a basic bar graph. I was seeking advice
regarding the following:
(a) For each time period there are values from 16 people. How I can
change the colour value so that each person has a different colour,
which recurs across each of the three graphs/tie epriods?
(b) I have seen much more sophisticated examples using lattice (e.g
each person has a separate
2010 Apr 07
2
recoding variables-recode not working
Hi,
I have numerical variable that I want to recode into categories '0' and '1
and more' and do analysis with that data.
I have tried various of possibilities to do so, but I am sucked and nothing
is working.
recode(Q12, "0='A';1:30='B'")
cut(Q12, breaks=c(0,1,30), lables=c('0', '1 and more'))
cat(Q12, "0=0;1-33=1")
What should
2013 Jan 25
1
Recoding variables (without recode() )
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt.
Name: nicht verf?gbar
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130125/859c4520/attachment.pl>
2008 Mar 27
1
Recode factors
I know this comes up, but I didn't see my exact issue in the archives. I
have variables in a dataframe that need to be recoded. Here is what I'm
dealing with
I have a factor called aa
> class(aa)
[1] "factor"
> table(aa)
aa
* 0 1 2 3 A B C D L N T
0 0 1908 725 2089 0 0 67 0 0 2 1 6
I need to recode
2006 Jul 02
2
how to recode in my dataset?
Dear Rusers,
My question is about "recode variables". First, i'd like to say
something about the idea of recoding:
My dataset have three variables:type,soiltem and airtem,which means
grass type, soil temperature and air temperature. As we all known, the
change of air temperature is greater than soil temperature,so the
values in those two different temperaturemay represent different
2010 Mar 30
2
How to recode variables using base R
Hi,
Is there an efficient way recoding variables in a data.frame using
base R? My purpose is to create
new variables and attach them into old data.frame. The basic idea is
shown below, but how to create recoding for A, B and C and assing them
into new variables?
df <- data.frame(A = c(1:5),
B = c(3,6,2,8,10),
C = c(0,15,5,9,12))
df$A[df$A <= 3] <- "x"
df$A[df$A > 3 &
2001 Mar 27
4
recode vector values to NA
Greetings,
I'm in the painful process of migrating from SAS to R. In the process I've
discovered that there are some basic things that I am getting hung up on. The
most basic is the simple recoding of variables. Suppose I create a vector
x <- rnorm(10000)
and I want to recode all values of x > 1.5 to NA. How would I do that in R?
TIA
Cheers,
Patrick
2009 Jun 12
2
Sweave recode(car) and Lyx, compiling but not executing on Mac
I am just beginning to use Sweave with Lyx on a Mac (R2.8.1). I have
12 chunks of Sweave code that work fine, but this piece:
<<>>=
library(car)
2013 May 07
2
recode categorial vars into binary data
Dear R-List,
I would like to recode categorial variables into binary data, so that all values above median are coded 1 and all values below 0, separating each var into two equally large groups (e.g. good performers = 0 vs. bad performers =1).
I have not succeeded so far in finding a nice solution to do that in R. I thought there might be a better way than ordering each column and recoding the
2013 May 07
2
recode categorial vars into binary data
Dear R-List,
I would like to recode categorial variables into binary data, so that all values above median are coded 1 and all values below 0, separating each var into two equally large groups (e.g. good performers = 0 vs. bad performers =1).
I have not succeeded so far in finding a nice solution to do that in R. I thought there might be a better way than ordering each column and recoding the
2023 Jul 26
1
Downloading a directory of text files into R
?s 23:06 de 25/07/2023, Bob Green escreveu:
> Hello,
>
> I am seeking advice as to how I can download the 833 files from this
> site:"http://home.brisnet.org.au/~bgreen/Data/"
>
> I want to be able to download them to perform a textual analysis.
>
> If the 833 files, which are in a Directory with two subfolders were on
> my computer I could read them
2011 Aug 12
2
recode Variable in dependence of values of two other variables
Hi,
as an R-beginner, I have a recoding problem and hope you can help me:
I am working on a SPSS dataset, which I loaded into R (load("C:/...)
I have 2 existing Variables: "ID" and "X" ,
and one variable to be computed: meanX.dependID (=mean of X for all rows
in which ID has the same value)
ID = subject ID. Since it is a longitudinal dataset, there are repeated
2009 Apr 01
4
Recode of text variables
Hi all
I am trying to do a simple recode which I am stumbling on. I figure
there must be any easy way but haven't come across it.
Given data of A","B","C","D","E","A" it would be nice to recode this
into say three categories ie A and B becomes "Treat1", C becomes "Treat
2" and E becomes "Treat 3".
I tried
2005 Jul 28
1
Unexpected behavior in recode{car}
Thanks to the R creators for such a great statistical system. Thanks to
the R help list, I have (finally) gotten far enough in R to have a
question I hope to be worth posting.
I'm using the recode function from John Fox's car package and have
encountered some unexpected behavior.
Consider the following example:
## Begin cut-and-paste example
require( car )
set.seed(12345)
nn <-
2005 Dec 20
1
Wilcoxon Mann-Whitney Rank Sum Test in R
An earlier post had posed the question: "Does anybody know what is relation
between 'T' value calculated by 'wilcox_test' function (coin package) and
more common 'W' value?"
I found the question interesting and ran the commands in R and SPSS. The W
reported by R did not seem to correspond to either Mann-Whitney U,
Wilcoxon W or the Z which I have more
2006 Aug 06
1
ordering by a datframe date
I am hoping for some advice regarding ordering a dataframe, by date.
The dataframe is in the format below.
$story $datepub
story10 1 April 1999
story 90 1 March 2002
story 37 10 July 1985
I want to reorder the entire dataframe so the earliest story is first, and
save the reordered dataframe. The command, 'class' (datepub) reveals
$datepub is a factor variable.
I tried
2006 Aug 31
1
grep question
I am hoping for some advice as to how to modify the following syntax, so
that instead of saving all records which refer to Farrah, I select all
instances that do not include Farrah, or the word Coolum.
test <- read.csv("c:\\newdat.csv", as.is=TRUE, header=T)
sure <- test[grep('Farrah', paste(test$V3.HD, test$V3.LP, test$V3.TD)),]