Displaying 20 results from an estimated 10000 matches similar to: "reading only some columns from a table"
2006 Nov 20
3
Creating a new vector ( another problem)
Dear R Users,
Suppose we are interested for generating a new vector ( x ) from a current vector (y) of length 1000 so that x includes the sum of every 5 values in y respectively from the first to the end of length y. The same length of y for x is desired, so that other 4 positions (indices) in x are filled out with NA.
For generating such a new vector, I have no idea. I tried in some
2006 Jan 08
2
Filters in waveslim
Dear R Users,
For running wavelet functions using dwt( ), modwt( ), and mra( ), a wavelet filter algorithm is applied. For all these functions, default is "la8" and other possibility is "haar". In related documents, another possibilities like as symlet and coiflet ... are not cited.
Besides "la8" and "haar", which wavelet filters can be used?
Thank
2006 Mar 10
2
creating new vector
Hi R Users,
I don't know how much is difficult my problem and even it is possible to solve in R or not.
Given a vector with 2000 observations. I want to creat a new vector from that vector so that new vector be the sum of every 5 observations sequently. That is , each new observation is sum of every 5 sequent observations, from the first observation of previous vector to the end. So
2005 Jun 01
2
How to name variables in a single plot
Dear R Friends ,
I want to name my variables( more than 2 variables in a single plot) within a plot to distinct them from each other, but I cann't. How it is possible? I don't mean x and y axis using xlab or ylab. At the below , it follows some lines, only as an example that you could try please, if it is possible. I really thanks for your attention.
Amir
library(graphics)
y<-
2006 Nov 20
3
Creating a new vector
Dear R Users,
Suppose we want to creat a new vector ( x ) from a current vector (y) of length 1000. The current vector y includes negative, zero and positive values. We want our new vector x includes the negative values in y, otherwise NA with the same length as y.
For this, we have x=y[y<0] . Now x includes a subset of y with shorter length than y. With x=match(y,x) we would
2007 Aug 14
1
Slack variable in OR
Hi dear R users,
Is it basically correct that a problem is ( linearly on nonlinearly ) modeled so that the slack variable is bounded by an upper bound ?
If so, how it can be handled and coded practically ?
for example:
x1+ x2 =< b so ----> x1 + x2 + s=b
s=b- x1 - x2
b- x1 - x2 =< upper value
But algorithms can not calculate b- x1 - x2 , because
2005 May 30
2
How to access to sum of dissimilarities in CLARA
Dear All ,
Since dissimilarity is one of quality measures in clustering , I'm trying to access to the sum of dissimilarity as a whole measure. But after running my data using CLARA I obtain :
1128 dissimilarities, summarized :
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.033155 0.934630 2.257000 2.941600 4.876600 8.943700
But I can not find the sum of dissimilarity.How can i
2006 Feb 07
2
Prediction method for lowess,loess,lokerns,lpepa,ksmooth
Hi Every Body,
I don't know why some regression functions have no related prediction function. For example lowess, loess, lokerns, lpridge, lpepa, and ksmooth.
What could help? Is there any global or wrapper function so that can help?
Regards,
Amir Safari
---------------------------------
[[alternative HTML version deleted]]
2005 Jun 29
2
comparison of packages for Unit Root test
Dear R Users,
Could somebody please compare the packages of unit root test ( Uroot, Ucra, tseries and fseries ) regarding the type of test ( without constant and trend, with constant , and with constant and trend ) ?
Regards,
Amir Safari
---------------------------------
Rekindle the Rivalries. Sign up for Fantasy Football
[[alternative HTML version deleted]]
2005 Nov 29
2
Calculating the 2th power of a vector
Hi every body ,
I simply want to calculate the 2th power of a vector without changing the sign of values. How it is possible in R ?
Thanks a lot for any idea.
Amir
---------------------------------
[[alternative HTML version deleted]]
2010 Oct 04
3
read columns of quoted numbers as factors
Suppose I have a data file (possibly with a huge number of columns), where the
columns with factors are coded as "1", "2", "3", etc ... The default behavior of
read.table is to convert these columns to integer vectors.
Is there a way to get read.table to recognize that columns of quoted numbers
represent factors (while unquoted numbers are interpreted as
2005 Dec 07
2
Bandwidth selection for ksmooth( )
Dear R Users,
Before running ksmooth( ), a suitable bandwidth selection is needed. I use some functions for this task and receive these results for my data:
width.SJ(y,nb=100,method="ste") : 40.25
bcv(y,nb=100) : 40.53
ucv(y) : 41.26
bandwidth.nrd(y) : 45.43
After implementing the function ksmooth(x,y, bandwidth= each of abovementioned bandwidths), I have some NAs
2005 Jul 10
3
not supressing leading zeros when reading a table?
Dear R list,
I have a dataset with a column which should be read as character, like this:
name surname answer
1 xx yyy "00100"
2 rrr hhh "01"
When reading this dataset with read.table, I get
1 xx yyy 100
2 rrr hhh 1
The string column consists in answers to multiple choice questions, not all
having the same number of answers. I could format the
2006 Feb 23
2
locpoly
Dear R Users,
When using locpoly function, number of output values is smaller than the number of input values. How is it possible to get number of output component $y equal to the number of inputs.
Thanks a lot,
Amir
---------------------------------
[[alternative HTML version deleted]]
2005 Aug 24
1
Packages
Hi Dear All,
I want to instal some packages, but I can not find them in both lists of Package Index in internet ( http://www.maths.lth.se/help/R/.R/doc/html/packages.html ) and of Instalation of Packages window in the softwar. For example "modreg". Are they included in larger packages ?
Thanks for your help.
Best Regards,
Amir Safari
__________________________________________________
2006 Apr 05
1
Combination of Bias and MSE ?
Dear R Users,
My question is overall and not necessarily related to R.
Suppose we face to a situation in which MSE( Mean Squared Error) shows desired results but Bias shows undesired ones, Or in advers. How can we evaluate the results. And suppose, Both MSE and Bias are important for us.
The ecact question is that, whether there is any combined measure of two above metrics.
Thank you so
2006 Jun 26
1
How to generate a figure using par( ) with some densityplot( )'s
Hi Dear R users,
For a pair plotting, usaully we use par( ) function. Apparently it does not work anywhere. I want to have 3 plots in a single figure, like this:
par(mfrow=c(3,1))
densityplot( a)
densityplot(b)
densityplot(c)
But it does not work. How is it possible to have such a figure with densityplot( ) in a single figure?
So many thanks for any help.
Amir Safari
2011 Mar 15
1
How to read only specified columns from a data file
R-help,
I'm trying to read a data file with plenty of columns.
I just need the first 5 but it doe not work by doing something like:
> mycols <- rep(NULL, 430) ; mycols[c(1:4)] <- NA
> read.table(myfile, skip=2, colClasses=mycols)
Any suggestions?
Thanks in advance
2006 Feb 28
4
multiple keys table
probablly a newbie question:
Rails does not support a table with multiple keys ???
it seems that the ActiveRecord set_primary_key method can only set the
column name... (hope i''m wrong there)
example:
table A - P.K id, string name
table B - P.K id, string name
table C - P.K a_id and b_id, both are also foreign keys.
Thanks,
Amir.
--
Posted via http://www.ruby-forum.com/.
2014 Oct 22
2
[LLVMdev] Fetching the functions in C files
Thanks Markus.
Having llvm-as to turn the extracted function.bc file to .ll caused an
error saying:
*llvm-as-3.4: function_bc:1:1: error: expected top-level entity*
*BC! #AI29bEBB2I (some more binary)*
This error is just the same error that I received while using llvm-extract
on a .c file (not .bc or .ll).
Do I have to include other things in the command ? I mean generating a
function.ll