Displaying 20 results from an estimated 8000 matches similar to: "Using changing names in loop in R"
2012 Apr 04
2
extract data
HI,
I would like to extract data in a specific way. For example, the rainfall data
0,0,1.5,0,0, 3,1,2.5,0,0,0,0, 2.3,0,0,0, 2.1,1.4,0,0,0, 3,2,1,0,0,0...
data_1: 1.5, 2.3 ( a single nonzero data between zeros data)
data_2: 3.1, 2.5, 2.1,1.4 ( two nonzero data between zeros data)
data_3: 3,1,2.5, 3,2,1 ( three nonzero data between zeros data)
Thank you so much for any
2006 Jul 24
5
change the name of file
Dear R Users,
Is it possible to make file names dependent on a changing variable?
For instance. I generate random numbers in a loop and at each iteration I
want data to write to file (I do not want to write everything in one file
using 'append'):
for (i in 1:50){
x<-matrix(runif(100, min=0,max=1),nrow=5,ncol=20)
Write(t(x),file="Data_i.txt",ncolumns=5,sep="\t")
}
2016 Jan 11
2
tftp-hpa features?
On Fri, Jan 8, 2016 at 5:46 PM, Geert Stappers via Syslinux
<syslinux at zytor.com> wrote:
> On Fri, Jan 08, 2016 at 03:40:37PM -0600, Matt Zagrabelny via Syslinux wrote:
>> Greetings,
>>
>> Is this list (a|the best) place to make feature requests for tftp-hpa?
>
> Yes, it is.
> from email header List-Id: For discussion of Syslinux and tftp-hpa
2013 Feb 15
2
sprintf in system command
hi all
I am using r (2.15.2) in windows 7 32bit
I want to execute an external program from r console. the program is a
command line program which needs the following format to start
C:/Users/.../dssp-2.0.4-win32.exe -i
data_1.txt -o data_1.dssp
I used the system command as:
system
('C:/Users/.../dssp-2.0.4-win32.exe -i
2017 Sep 04
1
Merge by Range in R
Hi,?
I have two big data set.?
data _1 :?
> dim(data_1)
[1] 15820 5
> head(data_1)
? ?Chromosome ?????Start????????End????????Feature GroupA_3
1: ? ? ? ????????chr1 521369 ?750000 ????chr1-0001 ? ?????0.170
2: ? ? ? ????????chr1 750001 ?800000 ????chr1-0002 ? ????-0.086
3: ? ? ? ????????chr1 800001 ?850000 ????chr1-0003 ? ?????0.006
4: ? ? ? ????????chr1 850001 ?900000 ????chr1-0004 ?
2010 Dec 30
3
Boot Error GPT partition
Hi all,
I was using grub2 for booting Archlinux x86_64 in my GPT
Internal HDD (/dev/sda) then I switched to syslinux/extlinux. It was
working fine but suddenly it staring showing "Boot Error" message on
screen. I googled for a solution and tried all syslinux versions from
4.04-pre4 down to 4.03-stable but non of them worked. I don't know
what suddenly changed caused this
2010 Jan 20
3
Deleting rows based on duplicate entries in one columns in a data matrix
Hi everybody,
I would like to delete rows based on duplicate entries in column 3 in the
data matrix X (size 60000 x 57). I have tried the unique(x) command as
> data <- X[unique(X[,3]),]
however, for some reason the command introduces a lot of NA's into the
dataset.
So, now I'm looking for a function that eliminates rows, if they have
duplicate values in column 3.
Does anyone
2016 Jan 08
2
tftp-hpa features?
Greetings,
Is this list (a|the best) place to make feature requests for tftp-hpa?
If not, would you point me in the right direction, please?
Thanks much!
-m
2009 Dec 01
1
Multiple grouping on the X axis.
I am trying to plot data with multiple logical and physical groups using
R. Below is a sample of the kind of data I am working with and the desired
output. We have a jmp script that can do the same thing, but at ~$200 a
year the licensing is counterproductive. Thanks for any help.
Data input: Loaded from a CSV file.
Physical_1 Logical_1 Logical_2 Data_1 Data_2
x Y Z2
2010 Apr 13
1
WinBUGS Question
Hi:
Is there a way we can set up WINBUGS to run 100 simulated datasets on the
same model and output results? Or do we have to call in each dataset at a
time and repeat the process 100 times manually?
Thanks
Anamika
[[alternative HTML version deleted]]
2009 Nov 13
2
why the same values cannot be judged to be the same in R
Hi Rusers,
I found sometimes that the same values cannot be judged to be the same in
R. Anybody knows the probelm? I think i ignored some minor detail. Thanks.
Here is the example.
############
data1<-matrix(data=c(1,1.2,1.3,"3/23/2004",1,1.5,2.3,"3/22/2004",2,0.2,3.3,"4/23/2004",3,1.5,1.3,"5/22/2004"),nrow=4,ncol=4,byrow=TRUE)
2010 May 18
1
Maximization of quadratic forms
Dear R Help,
I am trying to fit a nonlinear model for a mean function $\mu(Data_i,
\beta)$ for a fixed covariance matrix where $\beta$ and $\mu$ are low-
dimensional. More specifically, for fixed variance-covariance matrices
$\Sigma_{z=0}$ and $\Sigma_{z=1}$ (according to a binary covariate $Z
$), I am trying to minimize:
$\sum_{i=1^n} (Y_i-\mu_(Data_i,\beta))' \Sigma_{z=z_i}^{-1} (Y_i-
2017 Oct 12
4
comparing two strings from data
Hi,
I have two columns that contain numbers along with letters (as shown below)
and have different lengths. Each entry in the first column is likely to be
found in the second column at most once.
For each entry of the first column, if that entry is found in the second
column, I would like to get the corresponding index. For instance, if the
first entry of the first column is 5th entry in the
2014 Oct 16
2
RCharts+Leaflet+Shiny
Daniel, muchas gracias por contestar y tan rápido.
Pues puede ser la solución, he hecho el cambio y sigue sin pintarme los
puntos ->
data_ <- toJSONArray(data_, json = F)
map$geoJson(
# leafletR::toGeoJSON(data_,
# # lat.lon = c('Lat', 'Long'),
# dest=output_geofile),
data_,
onEachFeature =
2012 Apr 18
1
Help with creating conditional categorical variables in R
Hi,
I am stuck with creating a conditional categorical variable in R
If my dataframe data_2 has 3 variables A,B,C I want to create variable D which would be something like :
data_2$D <- ifelse(data_2$A < data_2$B & promotion_ind =="N",1,0),
this throws up an error "In Ops.factor(data_2$A,data_2$B) :
< not meaningful for factors
I have tried converting the
2017 Oct 13
1
comparing two strings from data
Combining and completing the advice from Greg and Boris the complete
solution is two lines:
data_2 <- read.csv("excel_data.csv", stringsAsFactors = FALSE)
match_list <- match( data_2$data1, data_2$data2 )
The vector match_list will have the matching position when it exists and
NA's otherwise. Its length will be the same as the length of data_2$data1.
You should get
2014 Oct 15
2
RCharts+Leaflet+Shiny
Hola,
Ando un poco desesperado con los mapas interactivos de Rcharts
<https://github.com/ramnathv/rCharts>+Leaflet.
Estoy intentando pintar en un mapa las cámaras de tráfico de madrid, y las
estaciones de calidad del aire, simplemente donde están, es decir, aun no
estoy recogiendo los datos de medida.
Proyecto -> https://github.com/ADIRSE/maddata
He conseguido pintar ambos, con
2011 Jun 22
1
Appending to list
So im here now b/c im incredibly frustrated. Please consider the following:
#Try 1
Data_<-list()
Sn<-1:12
for(sn in Sn){
for(i in 1:10){
Data.X <- rnorm(100,0,10)
Data_[[paste(sn,i,sep="-")]]<-Data.X
}
}
##Try 2
Data_<-list()
Sn<-1:12
for(sn in Sn){
for(i in 1:10){
Data.X <- rnorm(100,0,10)
Data_[[sn]][[i]]<-Data.X
}
}
In Try 1 i am able to append
2017 Oct 12
0
comparing two strings from data
It's generally a very good idea to examine the structure of data after you have read it in. str(data2) would have shown you that read.csv() turned your strings into factors, and that's why the == operator no longer does what you think it does.
use ...
data_2 <- read.csv("excel_data.csv", stringsAsFactors = FALSE)
... to turn this off. Also, the %in% operator will achieve
2015 Jun 08
2
help awk y shells en R
Hola buenas,
a veces empleo desde R shells de unix, Existe alguna manera de utilizar
estos shelss desde windows o el lenguaje awk.
La idea es hacerlo siempre desde R, igual invoncando cygwin desde windows
es posible. Pero no me queda claro
Un abrazo y gracias por adelntado
Javier
#_____________________________________________________________________
# EJEMPLO, ¿Que habría que poner en
#