Displaying 20 results from an estimated 1000 matches similar to: "how to label the branches of a tree"
2008 Dec 29
1
How to get unique solution from nnet function
Hi R,
I am using nnet function of nnet package to fit neural networks. Now I want to get a unique solution every time I run the function for the same data. If I give rang=0, it solves my problem but I am not sure whether I am doing the right thing. Any comments are welcome.
Thank you,
Regards
Utkarsh Singhal | Amba Research
Ph +91 80 3980 8017 | Mob +91 99 0295 8815
Bangalore * Colombo
2008 Mar 25
5
reading Excel file
Hi R,
I have an excel file in which the third column is "date" and others are
"character" and "numeric".
Number of columns are 12
If I use this to read the file in R: x = read.xls("D:\\file.xls")
The problem is that my date column is read in julian dates.
So I am using: x = read.xls("D:\\file.xls",
2009 Dec 24
3
help in merging
Hi All,
I want to "merge" two datasets by column "ID" and I don't want the result to
be sorted by "ID". I am doing the following:
> z = merge(x, y, by = "ID", sort=F)
The result is not sorted by "ID". But (as oppose to what I expected) it is
not even in the original order of either "x" or "y".
Can
2017 Aug 10
2
Import selected columns from sas7bdat file
Hello everyone,
I want to import data from huge sas files with 100s of columns. The good
thing is that I am only interested in a few selected columns. Is there any
way to do that without loading the full dataset.
I have tried two functions: (1) read.sas7bdat *[from library 'sas7bdat']*,
and (2) read_sas *[from library 'haven']. *But couldn't find what I am
looking for.
Best
2010 Dec 17
1
[Fwd: adding more columns in big.matrix object of bigmemory package]
Hi,
With reference to the mail below, I have large datasets, coming from various
different sources, which I can read into filebacked big.matrix using library
bigmemory. I want to merge them all into one 'big.matrix' object. (Later, I
want to run regression using library 'biglm').
I am unsuccessfully trying to do this from quite some time now. Can you
please
2017 Aug 10
1
Import selected columns from sas7bdat file
hi, the sas universal viewer might be a free, non-R way to convert a
sas7bdat file to non-proprietary formats, not sure if it's windows-only.
those other formats should be easier to import only a subset of columns
into R..
https://support.sas.com/downloads/browse.htm?fil=&cat=74
On Thu, Aug 10, 2017 at 7:42 AM, peter dalgaard <pdalgd at gmail.com> wrote:
> I had a look at this
2017 Aug 10
0
Import selected columns from sas7bdat file
I had a look at this a while back and it didn't seem to be easy. The path of least resistance would seem to be to use SAS itself to create a data set with fewer columns, but of course that requires you to get access to SAS.
Otherwise, I think you'd have to modify sas7bdat::read.sas7bdat to drop unselected columns. That function is pure R code, so it might not be quite as hard as it
2009 Jun 02
2
bigmemory - extracting submatrix from big.matrix object
I am using the library(bigmemory) to handle large datasets, say 1 GB,
and facing following problems. Any hints from anybody can be helpful.
_Problem-1:
_
I am using "read.big.matrix" function to create a filebacked big matrix
of my data and get the following warning:
> x =
read.big.matrix("/home/utkarsh.s/data.csv",header=T,type="double",shared=T,backingfile
2009 May 18
2
intermediate iterations of stepwise regression
Hi all,
I am performing a stepwise regression by running the "step" function on
an "lm" object. Now I want to save the intermediate iterations. I know
the argument trace=T will print it on the console, but I rather want to
assign it to some R object or may be output it in a CSV or text file.
Any help will be appreciated.
Regards
Utkarsh
2010 Jan 05
2
why is object.size is more for constant numeric vector?
Hi All,
I ran the following lines in R:
print(object.size(a <- rep(1,10^6)),units="Mb")
print(object.size(a <- rep(3.542,10^6)),units="Mb")
print(object.size(b <- rep("x",10^6)),units="Mb")
print(object.size(b <- rep("xyzxyz xyz",10^6)),units="Mb")
print(object.size(b <- 1:10^6),units="Mb")
print(object.size(b
2009 May 04
4
Splitting a vector into equal groups
Hi All,
I have vector of length 52, say, x=sample(30,52,replace=T). I want to
sort x and split into five *nearly equal groups*. Note that the
observations are repeated in x so in case of a tie I want both the
observations to fall in same group.
This seems a very common task to do, but still I couldn't find an R
function to do this. Any help would be highly appreciated.
Regards
Utkarsh
2010 Aug 30
1
How to Remove Autocorrelation from Simple Moving Average time series
Hi R experts,
I am trying to remove autocorrelation from Simple Moving Average time series. I know that this can be done by using seasonal ARIMA like,
library(TTR)
data <- rnorm(252)
n=21
sma_data=SMA(data,n)
sma_data=sma_data[-1:-n]
acf(sma_data,length(sma_data))
2009 Jun 30
4
R version-2.9.1 for Linux
Hi All,
I am currently using R version 2.8.1 on linux cent os 4.4 (i386) and
want to upgrade to version 2.9.1. It seems to me that version-2.9.1 is
it not for my OS.
Am I right?
Regards
Utkarsh
[[alternative HTML version deleted]]
2008 May 06
2
To preserve the class "Matrix"
Hi,
Suppose
a=matrix(1:9,3,3)
> a
[,1] [,2] [,3]
[1,] 1 4 7
[2,] 2 5 8
[3,] 3 6 9
Now,
> class(a[1:2,])
[1] "matrix"
> class(a[1:3,])
[1] "matrix"
> class(a[,1:2])
[1] "matrix"
> class(a[,1:3])
[1] "matrix"
But,
> class(a[1,])
[1] "integer"
> class(a[,1])
[1]
2009 Nov 23
3
FUN argument to return a vector in aggregate function
Hi All,
I am currently doing the following to compute summary statistics of
aggregated data:
a = aggregate(warpbreaks$breaks, warpbreaks[,-1], mean)
b = aggregate(warpbreaks$breaks, warpbreaks[,-1], sum)
c = aggregate(warpbreaks$breaks, warpbreaks[,-1], length)
ans = cbind(a, b[,3], c[,3])
This seems unnecessarily complex to me so I tried
> aggregate(warpbreaks$breaks, warpbreaks[,-1],
2011 May 12
1
Saving misclassified records into dataframe within a loop
Greetings R world,
I know some version of the this question has been asked before, but i need
to save the output of a loop into a data frame to eventually be written to a
postgres data base with dbWriteTable. Some background. I have developed
classifications models to help identify problem accounts. The logic is this,
if the model classifies the record as including variable X and it turns out
2008 Mar 03
1
using 'lrm' for logistic regression
Hi R,
I am getting this error while trying to use 'lrm' function with nine
independent variables:
> res =
lrm(y1994~WC08301+WC08376+WC08316+WC08311+WC01001+WC08221+WC08106+WC0810
1+WC08231,data=y)
singular information matrix in lrm.fit (rank= 8 ). Offending
variable(s):
WC08101 WC08221
Error in j:(j + params[i] - 1) : NA/NaN argument
Now, if I take choose only four
2009 Apr 30
2
problem in as.date
I never understood that why is the value returned by as.date function in
the library(survival) never matches with the description given in the
help file:
Following is the extract from ?as.date
Description:
Converts any of the following character forms to a Julian date:
8/31/56, 8-31-1956, 31 8 56, 083156, 31Aug56, or August 31 1956.
Usage:
as.date(x, order = "mdy", ...)
2008 Feb 06
1
wilderSum
Hi,
Can somebody tell me the formula for "?wilderSum" in TTR package? I mean how are these calculated?
BR, Shubha
Shubha Karanth | Amba Research
Ph +91 80 3980 8031 | Mob +91 94 4886 4510
Bangalore * Colombo * London * New York * San José * Singapore * www.ambaresearch.com
This e-mail may contain confidential and/or privileged i...{{dropped:13}}
2008 Apr 09
11
Number of words in a string
Hi R,
A quick question: How do we find the number of words in a string?
Example:
C="Have a nice day"
And the number of words should be 4. any built in function or?...
Thanks, Shubha
Shubha Karanth | Amba Research
Ph +91 80 3980 8031 | Mob +91 94 4886 4510
Bangalore * Colombo * London * New York * San José * Singapore * www.ambaresearch.com
This e-mail may contain