Displaying 20 results from an estimated 800 matches similar to: "Table with different digit number"
2010 Mar 25
1
Read SAS data
Hi!
I need to import in R some SAS dataset (sas7bdat). I found two functions to
do it:
"read.ssd" from the package "foreign" and "sas.get" from "Hmisc".
df = read.ssd(libname = path2data, sectionnames = "sasSmallDataset",
tmpXport = path2data, tmpProgLoc = path2data, sascmd = path2sas)
sas.get(libraryName = path2data, member =
2010 Nov 02
5
density() function: differences with S-PLUS
Hello!
Someone know what are the difference between R and S-PLUS in the density()
function?
For example, I would like to reply this simple S-PLUS code in R, but I don't
understand which parameter I should modify to get the same results.
S-PLUS CODE:
density(1:1000, width = 4)
R-CODE:
density(1:1000, bw = 4, window = "g", n = 50, cut = 0.75)
I obtain the same x values, but
2011 Dec 15
4
Undocumented functions
Hi!
I am building a package. This package will not submitted to CRAN.
I write the help files for the most important functions of my package, I
cannot write it for all functions. This may sounds strange, but so there!
I know that all user-level functions should be documented, so I have to
move my undocumented functions to a non-user-level. It's right?
To move my functions to a
2010 Nov 03
1
smooth: differences between R and S-PLUS
Hi!
I am studying differences between R and S-PLUS smooth() functions. I know
from the help that they worked differently, so I ask:
- exist a package that permit to have the same results?
- alternatively, someone know how can I obtain the same results in R, using
a self made script?
I know that S-PLUS use the 4(3RSR)2H running median smoothing and I try to
implement it with the code below. I
2010 Jul 27
2
Sum list elements
Hi!
I have a list of 24 elements, all of the same type (dataframe, for example).
I am looking for an alternative to mylist[[1]] + mylist[[2]] + ... +
mylist[[24]] to obtain the sum.
Anyone can help me?
Thanks in advance.
Nicola S.
[[alternative HTML version deleted]]
2011 Oct 18
1
avoid s3 methods
Hello everybody.
My issue arise when I build a package with my functions. This package is for
personal purposes only and it will not submitted to CRAN.
Anyway, this may be an opportunity for myself to clear the S3 methods
concept. I read the R manual and some books about R programming but they are
usually S4 oriented.
I call a function plot.days(). When I check the package I obtain some
2010 Jul 29
1
Different decimal places in a matrix
Hi!
I have a ftable object in which some row contains integers and some other
contains a percentage that I would like to show with two digits after the
dot.
I tried something like ftblP[index,] = as.character(round(ftblP[index, ],
2)) where the index vector contains the number of the rows containing a
percentage. My workaround works but it shows all numbers aligned to left,
while I prefer that
2011 Nov 22
1
Compile R package under Windows
Hi.
I need to compile an R package under Windows, to get a zip file.
I can't used the web services, because it is avalaible only for the current
version of R while I need of a package compiled with R 2.13.1.
The package contain C code that requires the GSL C library.
In your experience, what is the best way to compile an R library? I read
the R manuals, now I need some tricks with
2010 Feb 17
2
Split Plot and Tukey
Hi,
I did the analysis of variance of a split-plot and the
effect of treatment was significant.
I would like compare treatment means using Tukey.
I can't extract the mean square to apply HSD.test to use in
agricolae package.
anava = aov(ganhos ~ Blocos + Trat*Supl +
Error(Blocos/Trat))
names(anava)
summary(anava)
require(agricolae)
HSD.test(ganhos, Trat, df, MSerror, alpha = 0.05)
2010 Oct 04
1
Help with apply
Suppose I have the following data:
tmp <- data.frame(var1 = sample(c(0:10), 3, replace = TRUE), var2 = sample(c(0:10), 3, replace = TRUE), var3 = sample(c(0:10), 3, replace = TRUE))
I can run the following double loop and yield what I want in the end (rr1) as:
library(statmod)
Q <- 2
b <- runif(3)
qq <- gauss.quad.prob(Q, dist = 'normal', mu = 0, sigma=1)
rr1 <- matrix(0,
2009 Jan 23
3
Table Modification
I am trying to construct a two-way table where, instead of printing the
two-way frequencies in the table, I would like to print the values of a
third variable that correspond to the frequencies.
For example, the following is easily constructed in R
> fact1 <- factor(sample(LETTERS[1:3],10,replace=TRUE))
> fact2 <- factor(sample(LETTERS[25:26],10,replace=TRUE))
> fact3
2009 Oct 20
2
Interpretation of VarCorr results
Dear all,
I'm working with a model to estimate components of variance by using the
lme() function.
The model is as the following:
model=lme(fixed=X~1+as.factor(station),data=myData,na.action=na.exclude,rand
om=~N+1|spliceOrHoming)
Where X is the response measured variable, station is treated as fixed
effects factor, N is a continuous variable, and spliceOrHoming is a
(ordered)
2009 Jan 16
5
Value Lookup from File without Slurping
Dear all,
I have a repository file (let's call it repo.txt)
that contain two columns like this:
# tag value
AAA 0.2
AAT 0.3
AAC 0.02
AAG 0.02
ATA 0.3
ATT 0.7
Given another query vector
> qr <- c("AAC", "ATT")
I would like to find the corresponding value for each query above,
yielding:
0.02
0.7
However, I want to avoid slurping whole repo.txt
2009 Oct 20
2
LDA Precdict - Seems to be predicting on the Training Data
When I import a simple dataset, run LDA, and then try to use the model to
forecast out of sample data, I get a forecast for the training set not the
out of sample set. Others have posted this question, but I do not see the
answers to their posts.
Here is some sample data:
Date Names v1 v2 v3 c1
1/31/2009 Name1 0.714472361 0.902552278 0.783353694 a
1/31/2009 Name2 0.512158919 0.770451596
2009 May 05
8
limits
Hey,
what is the R function for the mathematical limit ?
e.g. to calculate and return the amount that the expression
X^2 +X +2
approach
as X approach 2
(X-> 2)
thanks
hassan
[[alternative HTML version deleted]]
2003 Oct 23
3
List of lm objects
Hi R-Helpers:
I?m trying to fit the same linear model to a bunch of variables in a data
frame, so I was trying to adapt the codes John Fox, Spencer Graves and Peter
Dalgaard proposed and discused yesterday on this e-mail list:
for (y in df[, 3:5]) {
mod = lm(y ~ Trt*Dose, data = x, contrasts = list(Trt =
contr.sum, Dose = contr.sum))
Anova(mod, type = "III")
} ## by John Fox
or
for
2009 May 04
0
Java-R
Dear R user
We would be interested to talk with someone, living in Milan (Italy)
area, with good experience in Java-R based applications development.
We can provide good R skills but we are poor java programmers
Can anyone help?
Thanks in advance for any help
--
Andrea Spano'
Quantide s.r.l.
andrea.spano at quantide.com
Il messaggio trasmesso pu? contenere informazioni di carattere
2004 Feb 17
3
parse error in GLMM function
Hi R-Helpers:
I?m trying to use the function GLMM from lme4 package, (R-1.8.1, Windows
98),and I get the following error:
> pd5 = GLMM(nplant~sitio+
+ fert+
+ remo+
+ sitio:fert+
+ remo:sitio+
+ remo:fert+
+ remo:fert:sitio
+ data=datos,
+ family=binomial,
+
2010 Feb 04
1
Rcommander en español
Hola todos:
acabo de actualizar R a R 2.10.1, y cuando actualice
Rcmdr (Versión 1.5-4) me cargo la versión en inglés, no me acuerdo que hice
antes para tener Rcmdr en español (trabajo con windows XP).
alguien podría recordarme lo que hay que hacer?
Gracias Gabriela.
______________________________
Lic. María Gabriela Cendoya
Magíster en
2009 Aug 10
3
Pregunta sencilla
Estimados me ha surgido una duda con un simple stem and leaf
el mismo es el siguiente:
> stem.leaf(Datos$ej1.21)
1 | 2: represents 0.12
leaf unit: 0.01
n: 40
LO: 0.72 0.85
3 10 | 9
11 |
4 12 | 4
5 13 | 7
7 14 | 710 (*)
9 15 | 18
16 16 | 3447899
(6) 17 | 045599 (***)
18 18 | 2568
14 19 | 23710 (**)
10 20 | 389
7 21