Displaying 20 results from an estimated 10000 matches similar to: "Data in packages: save or write.table?"
2006 Feb 20
3
Boxplot Help for Neophyte
R helpers
I am getting to grips with R but came across a small problem today that I
could not fix by myself.
I have 3 text files, each with a single column of data. I read them in
using:
myData1<-scan("C:/Program Files/R/myData1.txt")
myData2<-scan("C:/Program Files/R/myData2.txt")
myData3<-scan("C:/Program Files/R/myData3.txt")
I wanted to produce a
2011 Feb 28
0
Fwd: Re: speed up process
Dear Jim,
Here is again exactly what I did and with the output of Rprof (with this
reduced dataset and with a simpler function, it is here much faster than
in real life).
Thanks you again for your help!
## CODE ##
mydata1<- structure(list(species = structure(1:8, .Label =
c("alsen","gogor", "loalb", "mafas", "pacyn", "patro",
2011 Feb 25
1
speed up process
Dear users,
I have a double for loop that does exactly what I want, but is quite
slow. It is not so much with this simplified example, but IRL it is slow.
Can anyone help me improve it?
The data and code for foo_reg() are available at the end of the email; I
preferred going directly into the problematic part.
Here is the code (I tried to simplify it but I cannot do it too much or
else it
2012 Jul 03
1
insert missing dates
Hello
I have dataframes.
mydata1 <-data.frame(value=c(15,20,25,30,45,50),dates=c("2005-05-25 07:00:00
","2005-05-25 19:00:00","2005-06-25 07:00:00","2005-06-25 19:00:00
","2005-07-25 07:00:00","2005-8-25 19:00:00"))
or
mydata2 <-data.frame(value=c(15,20,25,30,45,50),dates=c("2005-05-25 00:00:00
","2005-05-25
2010 Jan 22
1
confidence intervals for mean (GLM)
Dear useRs,
How could I obtain the confidence intervals for the means of my treatments, when my data was fitted to a GLM?
I need the CI's for the Poisson and Negative Binomial distributions.
Here's what I have:
mydata1 <- data.frame('treatments'=gl(4,20), 'value'=rpois(80, 1))
model1 <- glm(value ~ treatments, data=mydata1, family=poisson)
means1 <-
2009 Jan 06
5
Using apply for two datasets
I can run one-sample t-test on an array, for example a matrix myData1,
with the following
apply(myData1, 2, t.test)
Is there a similar fashion using apply() or something else to run
2-sample t-test with datasets from two groups, myData1 and myData2,
without looping?
TIA,
Gang
2008 Apr 15
2
How can I import user-defined missings from Spss?
Hi,
It works for me to import spss datasets via library(foreign) with read.spss or via library Hmisc by (spss.get).
But no matter which way I do import the data, user-defined missings from Spss are always lost.
(it makes no difference if there are a single value, a range, or any combination of them. They are always ignored).
Is there any way in R to find out if any value was user-defined missing
2008 Mar 30
4
tests Rin and Rout
>
> Generally I find it's good to look at examples that work. For
> examples of packages using tests, look at source packages on CRAN.
> Run the tests on them (using R CMD check), and see what gets produced.
>
Do you have the name of a package that use it ? I try the 10 first
package, and 10 other at random, but none of them use tests...
>>> Create tests/myPack.R
2010 Nov 11
2
Kolmogorov Smirnov Test
I'm using ks.test (mydata, dnorm) on my data. I know some of my
different variable samples (mydata1, mydata2, etc) must be normally
distributed but the p value is always < 2.0^-16 (the 2.0 can change
but not the exponent).
I want to test mydata against a normal distribution. What could I be
doing wrong?
I tried instead using rnorm to create a normal distribution: y = rnorm
2006 Nov 30
0
problem with chiMerge
Hi, I am trying to discretize a numeric attribute of a data.frame using
chiMerge
mydata2<-chiMerge(mydata1, c(7), alpha = 0.05)
but this command never returns, and I have to forcefully STOP the
operation. Is this a bug or am I missing somthing?
Can anybody help me. please?
Thanks in advance.
2011 May 11
0
Init nnetTs (or nnet?) with a former Neural Net
I am new to R and use nnetTs - calls.
If a time series of let's say 80000 Datapoints and did call nnetTs I want
make a new net
for the old ponts plus the next 1000 points (81000 datapoints total) what
would again
cost much calculation time.
So I want to pre-init the new net with the former wonnen net to reduce the
necessary
iteration numbers.
Is thee a possibility to do that and how?
i.e.:
2008 Mar 30
2
tests Rin Rout
Hi the list,
Some rumour (!) say that is it possible to prepare some tests for
checking our code using .Rin and .Rout. It seems to be a very good
practice, but I did not manage to find information on it.
So does someone know how it works ? What are we suppose to write in Rin ?
More precisely :
- I have a package myPack.r in directories ~/myR/myPack/R/
- I create the directory
2011 Sep 15
1
how to install a locally built package
Hello useRs,
I am trying to put my funcs in a package to avoid clutter in my workspace as the funcs are now in .Rprofile.
All plain R code no compilations. Using win XP with a full cygwin install and R2.12
I first did
package.skeleton("mypack",list="getdfv", namespace=T) # just a single func
which created a folder with the required stuff in it.
Calling R CMD build creates a
2008 Jul 09
2
Read.table - Less rows than original data
Dear all,
I have problem when reading a table into R. The total row of read in table
has is much less than the original saved table.
I built a 1,273,230 by 6 data set named "mydata2", it was saved in the
following command,
write.table(mydata2, "mydata2.txt", row.name=F,col.name=T,quote=F,sep="\t")
The next day I read in above saved text file into R,
2008 Jul 09
1
read.table problem
Dear all,
I have problem when reading a table into R. The total row of read in table
has is much less than the original saved table.
I built a 1,273,230 by 6 data set named "mydata2", it was saved in the
following command,
write.table(mydata2, "mydata2.txt", row.name=F,col.name=T,quote=F,sep="\t")
The next day I read in above saved text file into R,
2003 Sep 16
1
package documentation
Dear all,
I writing my first package and everything seems to work (at least up to now)
However when I try to build documentation (.dvi or .pdf), using
Rcmd Rd2dvi.sh --pdf mypack.Rd
I get a mypack.pdf whose title is
"R documentation of mypack.Rd" instead of
"The mypack package"
as it should be, is it right?
Also Version, Title, ....License, namely info from the DESCRIPTION
2012 Dec 21
1
Rterm does not load personal library
Greetings,
I am trying to run a short script from a shell:
c:\projects\hell>Rscript --default-packages=mypack X:/4Stephen/commit/curve.R > X:/4Stephen/commit/run1.out
Loading required package: utils
Warning message:
package 'RODBC' was built under R version 2.12.2
Error: could not find function "normalize"
Execution halted
Warning message:
closing unused RODBC handle 1
2010 Aug 05
2
try-error within for loop
Dear all,
I run a loop wrapped in try(), and for each of the rows where
"try-error" is true I want to fill that row with NA (at the moment it is
omitted). So I would expect to get a dataframe with 1000 rows some of
which would be empty, but instead I get a dataframe with 995 rows. In
this case missing 5 rows were omitted.
Any suggestions?
Thanks,
Olga
----------------
2012 Dec 18
0
R function for computing Simultaneous confidence intervals for multinomial proportions
Dear all,
Does someone know an R function implementing the method of Sison and
Glaz (1995) (see full ref below) for computing Simultaneous confidence
intervals for multinomial proportions?
As alternative method, I think to boostrap the mean of each proportion
and get in that way confidence interval of the mean.
I observed 21 times a response that could be one out of 8 categories
2007 Mar 08
1
R: Searching and deleting elements of list
you could try mapply
mydata2<-mapply("[", mydata, lapply(mydata, function(x) !x %in% A))
mydata2[[1]]<-A #to replace the obviously deleted elements of "A"
mydata2
mydata2[[1]]
mydata2[[2]]
mydata2[[3]]
mydata2[[4]]
Stefano
-----Messaggio originale-----
Da: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch]Per conto di jastar