Displaying 20 results from an estimated 700 matches similar to: "Convert decimal to binary data"
2004 Feb 05
2
(no subject)
Hello,
Splus contains the function intbin(x,l).
This function allows to make a conversion from an integer x to a binary of
length l.
for example
intbin(3,2) returns 11
intbin(3,3) returns 011
Do you know how to do it in R ?
Thank you meriema
2003 Oct 08
3
2 questions regarding base-n and identifing digits
Dear listers,
I have two questions:
(1)
Is there a way in R to change the base-n of the calculations. I wnat to run
some calculations either in binary (base-2) or base-4. Is there a way to
specify that in R - to chnage from the decimal?
(2)
I also want to extract the digits from a larger number and store them as a
vector.
I could do it through converting top string, parsing the string and
2005 Oct 20
5
spliting an integer
Hi there,
From the vector X of integers,
X = c(11999, 122000, 81997)
I would like to make these two vectors:
Z= c(1999, 2000, 1997)
Y =c(1 , 12 , 8)
That is, each entry of vector Z receives the four last digits of each entry of X, and Y receives "the rest".
Any suggestions?
Thanks in advance,
Dimitri
[[alternative HTML version deleted]]
2008 Jun 21
2
Generating groupings of ordered observations
Dear List,
I have a problem I'm finding it difficult to make headway with.
Say I have 6 ordered observations, and I want to find all combinations
of splitting these 6 ordered observations in g groups, where g = 1, ...,
6. Groups can only be formed by adjacent observations, so observations 1
and 4 can't be in a group on their own, only if 1,2,3&4 are all in the
group.
For example,
2004 Dec 01
3
Hexidecimal conversion
Help
I can produce the hexidecimal equivalent of a decimal number but I am having
a hard time reversing the operation. I'm good for hex representations to 159
and am close to extending to 2559. The archives are not clear on the
existence of a function for this task. Is there one?
Here is what I have got so far:
#Good for hex values to "9F"
as.decmode<-function(as.character(x)){
2000 Jul 28
2
Loop removal?
Dear all,
I've got a quite large dataframe (stor) with rows subject and rt (reaction
time). I would like to split the reaction times per subject into 6 bins of
equal size. Right now, I'm using the following code:
bindata <- function(rt) {
bindata <- rep(-1,length(rt))
binwidth <- length(rt)/6
bindata[order(rt)[(0*binwidth)+1:(1*binwidth)]] <- 1
2011 Dec 01
2
How to speed up int2bin conversion?
Dear R-help members,
I'm processing a large amount of MODIS data where quality assessment
information is stored as an integer value for each pixel. I have to
converted this number to an 8 digit binary flag to get access to the
stored quality code (e.g. in2bin(165,8) = 1 0 1 0 0 1 0 1).
Unfortunately, I did not manage to find a package providing a fast
function to do so. I need to run
2002 Sep 03
1
Bindata package problems
Dear list
I am having a couple of problems with the package 'bindata'.
Having installed it using install.packages("bindata"), I am finding that
when I load it up as a library I get the following errors:
> library(bindata)
Loading required package: e1071
Loading required package: mvtnorm
Warning messages:
1: There is no package called `e1071' in: library(package, char
2003 Oct 23
1
Re: ichar() function in R : 1st implementation, RFC
(RFC := Request For Comments)
>>>>> "Tim" == Tim Keighley <Tim.Keighley@csiro.au>
>>>>> on Thu, 23 Oct 2003 11:45:22 +1000 writes:
Tim> Hi Martin,
Tim> In October 2000 you wrote to r-help:
>>> which reminds me that I've had a desire for something like
>>> the old S function [from the blue book, and
2007 Feb 07
3
generate Binomial (not Binary) data
Dear All,
I am looking for an R function or any other reference to generate a series of correlated Binomial (not a Bernoulli) data. The "bindata" library can do this for the binary not the binomial case.
Thank you,
Bernard
---------------------------------
[[alternative HTML version deleted]]
2012 Jul 04
2
How to generate a correlated binary data set?
Hi.
I am trying to generate a correlated binary data set.
I've tried to use mvtBinaryEP, binarySimCLF, and bindata packages but none
of them works in R version 2.15.1.
Do you know any package to generate correlated binary covariates and work
in R version 2.15.1, or how to generate it?
Thanks,
[[alternative HTML version deleted]]
2003 Sep 12
2
Getting greek letters in plot labels and title
Hi,
Does any one knows how to include greek letters in plot labels and plot
titles ?
Thanks a lot
paul
---
[[alternative HTML version deleted]]
2003 Feb 01
1
Samba on OSX
Hi all, new to the list but have read the archives.
I am trying to get my OSX box to be a PDC with win2k
clients, but am having trouble. I can't seem to find
any documentation on this, nor have I seen anyone with
experience doing this.
Can someone point me to some resources I could RTFM
before I start asking questions to the list?
Thanks!
2018 Feb 08
2
[PATCH] syslinux/com32: Fix the printing of left zero padded hexadecimals with a leading '0x'.
From: Brett Walker <brett.walker at geometry.com.au>
When printing hexadecimal numbers to a fixed width, padded with leading zeros,
and also having a leading '0x'; the resultant string can be shortened by up to
two characters if any leading zero padding character required is.
int hexnum = 0x00001234;
printf("%08X", hexnum); // results in 00001234
2003 Oct 21
2
report generator a la epiinfo
Hi
I'd like to use R in epidemiology and disease surveillance.
In EpiInfo you can have a script (.pgm) which calls a predefined report
(.rpt), where a table is calculated and values picked from that table
and placed where the author of the report wants them, with text around
those values. (Please see example below.)
I've looked at manuals, faq, mail-search and google. The closest is an
2011 Dec 20
1
Help Transforming sums into observations
I need to measure kurtosis, skew, and maybe dip test on some
distributions I have. Currently my data is in the form of 2 vectors x
and y. Where x is 10 bins and y is the number of observations found in
that bin. It seems that the measures I want to run require the actual
observations laid out rather than already summed like I have them. Any
suggestions on how to transform the data automatically? I
2007 Jul 03
3
generating correlated Bernoulli random variables
Hi all,
I was wondering how to generate samples for two RVs X1 and X2.
X1 ~ Bernoulli (p1)
X2 ~ Bernoulli (p2)
Also, X1 and X2 are correlated with correlation \rho.
Regards,
Vineet
[[alternative HTML version deleted]]
2001 Oct 11
2
Where's MVA?
Hi All:
Package TSERIES is stated to depend on MVA. However, there is no MVA package to be found under the list of package sources.
Best wishes,
ANDREW
tseries: Package for time series analysis
Package for time series analysis with emphasis on non-linear and non-stationary modelling Version: 0.7-6
Depends: ts, mva, quadprog
Date: 2001-08-27
Author: Compiled by Adrian
2009 Oct 29
1
correlated binary data and overall probability
Dear All,
I try to simulate correlated binary data for a clinical research project.
Unfortunately, I do not come to grips with bindata().
Consider
corr<-data.frame(ID=as.factor(rep(c(1:10), each=5)),
task=as.factor(rep(c(1:5),10)))
[this format might be more appropriate:]
corr2<-data.frame(ID=as.factor(rep(c(1:10),5)),
tablet=as.factor(rep(c(1:5),each=10)))
Now, I want to
2015 Nov 14
2
Inexplicable ASAN report. Code generation bug?
On Thu, Nov 12, 2015 at 8:42 PM, Kostya Serebryany <kcc at google.com> wrote:
> 2 questions:
> - Do you see this with the fresh llvm trunk?
> - Can you prepare a minimized example?
Pretty recent, I updated a couple days ago. I tried to minimize the
attached but at the same time I didn't want to lose too many unions
and casts in case it didn't trigger any more.
$ clang