similar to: how do I separete coloumns by comma?

Displaying 20 results from an estimated 120 matches similar to: "how do I separete coloumns by comma?"

2017 Nov 22
3
Fw: modified mankendal
Hello DearI used modifiedmk package for trend analyses.this is my script ?require(modifiedmk)X1<-read.table("c:/elham/first article/r/Spring_NDVI-1.txt",skip=2,header=FALSE)d=dim(X1) outMK<-matrix(-999,nrow=4,ncol=d[2])for (c in
2012 Oct 26
2
Wrong output in R.14
Dear Sir/Madam, I am a MSc student of Biostatistics. For my thesis, I used R to simulate data. Surprisingly, when I wrote the code below in R14, the output was a vector full of "FALSE"s. Would you please check and let me know why this happend? ti=seq(1,10,by=0.1) ti==2.9 I'm looking forward to receiving your reply. Thank you Elham K.Moez [[alternative HTML version deleted]]
2012 May 30
2
Sorting a data set
I am a novice user of R and am stumbling on how to order a dataset produced during my session. I have a 1863 row X 14 column dataset that I want to put out to a file. I want the output sorted by the first column and then by the second column both in ascending order. The first column is character and the second is numeric (I hope). I used an "as.numeric" function to assign that
2012 May 13
1
Help writing function in R....
I need help writing function that takes three categorical inputs and returns a vector of summary statistics based on these inputs. The data set contains information on retail goods that can be specified by their retail segment, brand name, and type of good along with its retail price and what it actually sold for. I need to write a function that will take these inputs and average, count, and
2011 Apr 18
2
SQLDF syntax
Hi, I am new to R and trying to migrate from SAS. I am trying to use sqldf to create a new table from existed table and change some of the columns. I have table called DataOld with columns commodity, rate and total and I am trying to create new table called DataNew with columns commodity, ratenew and totalNew. > sqldf("create table datanew as select commodity, ratenew as rate * 10, >
2013 Apr 13
2
Comparison of Date format
Hi, ?In the example you provided, it looks like the dates in Date2 happens first.? So, I changed it a bit.? DataA<- read.table(text=" ID,Status,Date1,Date2 ??? ??? ?????? 1,A,3-Feb-01,15-May-01 ??? ??? 1,B,15-May-01,16-May-01 ??? ??? 1,A,16-May-01,3-Sep-01 ??? ??? ??? ??? ??? 1,B,3-Sep-01,13-Sep-01 ??? ??? ??? ??? ??? 1,C,13-Sep-01,26-Feb-04 ??? ??? ??? ??? ???
2009 Oct 26
2
help with linear model
Dear list, I have been searching for a week to fit a simple linear model to my data. I have looked into the previous posts but I haven't found anything relevant to my problem. I guess it is something simple...I just cannot see it. I have the following data frame, named "data", which is a subset of a microarray experiment. The columns are the samples and the rows are the probes. I
2010 Nov 17
3
stacking consecutive columns
I have a file, each column of which is a separate year, and each row of each column is mean precipitation for that month. Looks like this (except it goes back to 1964). month X2000 X2001 X2002 X2003 X2004 X2005 X2006 X2007 X2008 X2009 1 1.600 1.010 4.320 2.110 0.925 3.275 3.460 0.675 1.315 2.920 2 2.960 3.905 3.230 2.380 2.720 1.880 2.430 1.380
2003 Oct 16
1
princomp with more coloumns than rows: why not?
As of R 1.7.0, princomp no longer accept matrices with more coloumns than rows. I'm curious: Why was this decision made? I work a lot with data where more coloumns than rows is more of a rule than an exception (for instance spectroscopic data). To me, princomp have two advantages above prcomp: 1) It has a predict method, and 2) it has a biplot method. A biplot method shouldn't be too
2012 May 03
1
Simple plot loop
Trying to plot multiple lines from a simple matrix with headers (eight observations per column). I will be doing a number of these, with varying numbers of columns, and do not want to enter the header names for each one (I got frustrated and just wrote them out, which did work). Data reads fine, first plot is fine, but when i use the code at the bottom for a for i loop it tells me that x and y
2005 Mar 09
2
Dropping coloumns while redaing dtaa from text file.
Hi I have a huge text file and .dat file from which I want to read data. I do not need all the columns in the files. I want to extract only some columns from the .txt file or the .dat file, because reading the entire file is becoming very difficult due to memory issues. Is it possible to extract a few columns from .txt or .dat file while reading the data in R? Thanks Upasna -- "The past
2017 Nov 24
0
Fw: modified mankendal
Hi Elham, The error message: Error in if (S == 0) { : missing value where TRUE/FALSE needed means that for at least one S, the value is missing. The best advice I can give you is to load the data frame X1 as in your code above, and try something like: which.na<-function(x) return(which(is.na(x))) sapply(X1,which.na) You will then get a list of the positions of any NA values in X1. Jim On
2013 Dec 22
2
How do I separate elements of a vector by comma?
I have a vector like this (this vector is a colomn of a data set): > 3 5 2 3 7 4 7 8  8 9 0 1 4 I want to separate elements of the vector by comma like this: > 3,5,2,3,7,4,7,8,8,9,0,1,4 How can do this? Thanks. Elham [[alternative HTML version deleted]]
2009 Mar 02
2
R-code help for filtering with for loop
Dear Sir / Madam, I am new for R coding. Kindly help me out in sorting out the following problem. There are 50 rows with six coloumns(you could see in the attached .txt file). I wish to go for filtering this 50 rows for any one of the six coloumns satisfying the value >= 64. I need to have a final table with rows having >= 64 value in any one of the six coloumns and the rest could be
2011 Feb 08
2
Extrcat selected rows from a list
Hi, I have two lists 1) List1- 30,000 rows and 104 columns 2) List2- a list of 14000 selected rownames  from List 1 Now, I want to extract all the 104 columns of List1  matching with the 14000 selected rownames from List2.  Psedocode will be something like this: match rownames(List2) with rownames(List1) extract selected matched 104 coloumns from (List1) strore in-> List3 So the
2012 Mar 06
1
PLS Error message
Hi, I work with hyperspectral remote sensing data and I try to built a pls model with this data. I already built the model but if I try to calculate the RMSEP and R2 with a test data set I get the following error message: Error: variable 'subX' was fitted with type "nmatrix.501" but type "nmatrix.73" was supplied The problem is that I don't get the message for
2001 Aug 02
1
Package GSS for interpolation in more than 2D?
Dear all, There has been some time since I asked about interpolation in higher (>2) dimensions, and I must admit I failed to write a function to do this myself the last time, but eventually ended up doing it in MATLAB. I tried to translate the MATLAB code, but MATLAB code is so much more opaque than R (S) code, so I failed that too, mainly because I could only get one MATLAB session, I would
2005 Sep 16
2
help required on read.table
Hi all i am facing a peculiar problem for data input using read.table which i never faced previously. i have a data file by name abnew.txt with two coloumns data as depicted below. A B 420 422 314 321 the txt file is created using the excel save as option. i issued the statement as > a <- read.table("abnew.txt", header=TRUE) > a X.??S 1 NA 2 2 3 2
2011 Feb 16
2
distance between consecutive points
Dear R users, I have two coloumns of data, say x and y, referring to a list of points in 2D space. I am trying to develop a code that will give me the distances (using Pythagoras) between consecutive points (xi,yi) and (xi+1,yi+1). So far I have come up with the following: for (i in 1:length(x)) d<-sqrt((x[i+1]-x[i])^2+(y[i+1]-y[i])^2) For example, if I use the two points (note, I have
2020 Jan 05
3
(no subject)
Dear all, Please let me start by indicating that I am not from a technical background, so please be gentle and patient with me. I am trying to get a snapshot from my virtual machines (vm) and the following command works for all of them bar one: # virsh snapshot-create-as --quiesce --no-metadata --domain myvm myvm-state --diskspec vda,file=overlay.qcow2 --disk-only --atomic The only exception is